Page 1 of 1

kernel works in real computer but not qemu

Posted: Wed Feb 14, 2007 8:19 pm
by iammisc
I know there are many posts about kernels working in qemu but not on real computers, but i have the opposite problem. I'm currently writing my memory management code which goes through the whole memory marking which pages are used or not. On a real computer, everything works. in qemu, however, it just stops at the grub booting prompt. Also, it works ok in bochs.

What are my solutions except restarting my computer or using bochs(which uses a horrible configuration file)?

Thanks.

If you want I will attach the code in a subsequent post.

Posted: Wed Feb 14, 2007 8:50 pm
by Brynet-Inc
QEMU supports debugging connections via GDB...

Also you can use QEMU Monitor, Inside of that you can do lots of neat things.

Show the CPU registers..
Physical/Virtual memory dumps..
etc..

Code: Select all

Ctrl-Alt-n
    Switch to virtual console 'n'. Standard console mappings are:
    1) Target system display 
    2) Monitor 
    3) Serial port
http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC12

Hope this helps out in your debugging efforts :lol:

Posted: Thu Feb 15, 2007 9:09 am
by os64dev
i my case i found that hangup during boot time was mostly related to the keyboard input. Do you use time-outs when waiting for input or programming the keyboard controller?

Posted: Thu Feb 15, 2007 12:34 pm
by iammisc
no, i do not use the keyboard yet. I also have figured out the problem: the memory size. I was not allocating the right amount of page tables.