kernel works in real computer but not qemu

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

kernel works in real computer but not qemu

Post 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.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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:
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post 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?
Author of COBOS
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

Post 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.
Post Reply