[Help]: Kernel works on BOCHS not on 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.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: [Help]: Kernel works on BOCHS not on Qemu

Post by turdus »

Sounds like stack corruption. I had the same problem when a certain bios call required different amount of space on stack on bochs and virtualbox, so one vm was overwriting some data below the stack, the other worked fine. Just a tip.
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Re: [Help]: Kernel works on BOCHS not on Qemu

Post by LegendDairy »

turdus wrote:Sounds like stack corruption. I had the same problem when a certain bios call required different amount of space on stack on bochs and virtualbox, so one vm was overwriting some data below the stack, the other worked fine. Just a tip.
That could be it, my stack code is really primitive, I'll improve that and try again, else it'll probably be a bad pointer...
immibis
Posts: 19
Joined: Fri Dec 18, 2009 12:38 am

Re: [Help]: Kernel works on BOCHS not on Qemu

Post by immibis »

It could be almost anything. I had a similar problem yesterday, and it turns out it was because QEMU was lucky enough to fire the PIT interrupt right when interrupts should've been disabled but weren't (in the middle of a context switch).
User avatar
hgesser
Posts: 1
Joined: Sat Jul 16, 2011 9:08 am
Location: Erlangen, Germany
Contact:

Re: [Help]: Kernel works on BOCHS not on Qemu

Post by hgesser »

Just a note on the "bochs works, qemu doesn't" theme: When I made a mistake in paging setup (I wrote virtual addresses instead of physical ones into the page directory), qemu correctly noticed a page fault (when accessing one of the addresses from the wrong pd entry), but bochs did not: it accessed some (which?) memory area and continued happily.
Post Reply