Working on qemu, rebooting real machine
Posted: Tue Dec 27, 2011 5:06 pm
Hi. I wrote my 2 stages bootloader which enable protected mode with A20 and jump to kernel in C. (0x100000)
In this kernel I have functions printf-like to print memory map (got from bios-int in bootloader). In qemu everything is working and kernel halt after printfs.
In real machine (laptop about 200MHz, Pentium?, something like that), computer is restarting probably after displaying messages (I'm able to see "Memory map count: bla bla"). At the end of main I have only "for(;;);".
But if I add calling Delay function (which is "for(a=0; a < 10000000; a++);"), I'm not able to see any message from kernel. Looks like this Delay function is rebooting PC. Can You help me?
I attached my floppy image and source codes. Probably bootloader is good enough and problem is in kernel (kernel.c) (compiled via cross-gcc) or in stack settings?
I will be grateful if You help me
Attachment is there: http://www.cybek.cba.pl/_asm/cybOS32.rar
PS: cybfs.img is fdd image, cybFSman is my "filesystem" manager
In this kernel I have functions printf-like to print memory map (got from bios-int in bootloader). In qemu everything is working and kernel halt after printfs.
In real machine (laptop about 200MHz, Pentium?, something like that), computer is restarting probably after displaying messages (I'm able to see "Memory map count: bla bla"). At the end of main I have only "for(;;);".
But if I add calling Delay function (which is "for(a=0; a < 10000000; a++);"), I'm not able to see any message from kernel. Looks like this Delay function is rebooting PC. Can You help me?
I attached my floppy image and source codes. Probably bootloader is good enough and problem is in kernel (kernel.c) (compiled via cross-gcc) or in stack settings?
I will be grateful if You help me
Attachment is there: http://www.cybek.cba.pl/_asm/cybOS32.rar
PS: cybfs.img is fdd image, cybFSman is my "filesystem" manager