Page 1 of 1

[SOLVED] Bochs not behaving nicely with GRUB2.

Posted: Thu Aug 18, 2011 9:18 pm
by ethereal
Hello again everyone.

I've made some progress with my experiments (nothing exciting yet), but now I have a question for anyone who may be able to answer it.

My problem: GRUB2 doesn't work in Bochs. When booting, I get the following entries in the Bochs error log (duplicates removed for clarity):

Code: Select all

00061784021i[BIOS ] *** int 15h function AX=e820, BX=d1b8 not yet supported!
00064178460i[BIOS ] *** int 15h function AX=e820, BX=0000 not yet supported!
00064193246i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064216138i[BIOS ] *** int 15h function AX=e820, BX=0000 not yet supported!
00064230924i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064261499i[BIOS ] *** int 15h function AX=e820, BX=0000 not yet supported!
00064276285i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064308584i[BIOS ] *** int 15h function AX=e820, BX=0000 not yet supported!
00064314018i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064496490i[BIOS ] *** int 15h function AX=e820, BX=eb10 not yet supported!
00064511276i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064534267i[BIOS ] *** int 15h function AX=e820, BX=eb10 not yet supported!
00064549053i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064575347i[BIOS ] *** int 15h function AX=e820, BX=0042 not yet supported!
00064590133i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
00064613081i[BIOS ] *** int 15h function AX=e820, BX=0042 not yet supported!
00064627867i[BIOS ] *** int 15h function AX=e820, BX=bb36 not yet supported!
I looked these up, and according to Ralf Brown's interrupt list, INT 15h with AX=E820h is a function to get the system memory map. A few Google queries show that it is very common for it to be supported (the Wiki entry [0] states "This function is available on all PCs built since 2002, and on most existing PCs before then."). [0] even gives "Typical Output by a call to INT 15h, EAX=E820 in Bochs"!

Digging around in Boch's source code, bios/rombios.c (lines 4568-4677) gives me Bochs' implementation of the e820 function. From what I can see, INT 15h, AX=e820 seems to be defined for BX = {0..7}, not 0xeb10, 0xbb36, 0x0042 or 0xd1b8. It should work for 0x0000, though, which is something that I also do not understand . . .

Does anyone have any suggestions as to how I could fix this? Thoughts as to what am I doing wrong?

My thanks for your time.

- ethereal

[0] http://wiki.osdev.org/Detecting_Memory_(x86)

Re: Bochs not behaving nicely with GRUB2.

Posted: Fri Aug 19, 2011 12:53 am
by egos
My GRUB2 works fine in my Bochs. The problem in GRUB2 or/and in Bochs that you use.

Re: Bochs not behaving nicely with GRUB2.

Posted: Fri Aug 19, 2011 6:26 am
by xenos
This looks indeed a bit strange. For me GRUB2 works fine with Bochs as well...

Re: Bochs not behaving nicely with GRUB2.

Posted: Fri Aug 19, 2011 3:28 pm
by ethereal
Very interesting . . . I should have expected something of the sort. I will try setting up my GRUB2 image again, and additionally find another version of GRUB2 to test.

Thanks!

- ethereal

Re: Bochs not behaving nicely with GRUB2.

Posted: Fri Aug 19, 2011 3:41 pm
by ethereal
Gah. My apologies for my stupidity: the shell script I have set up to generate my El-Torito ISO and launch Bochs was using my system-wide Bochs installation from the Arch Linux repositories, not my hand-compiled version, which works perfectly.

I apologize for being a bother.

- ethereal