[SOLVED] Bochs not behaving nicely with GRUB2.

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
ethereal
Posts: 6
Joined: Mon Aug 08, 2011 11:28 pm

[SOLVED] Bochs not behaving nicely with GRUB2.

Post 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)
Last edited by ethereal on Fri Aug 19, 2011 3:42 pm, edited 1 time in total.
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: Bochs not behaving nicely with GRUB2.

Post by egos »

My GRUB2 works fine in my Bochs. The problem in GRUB2 or/and in Bochs that you use.
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Bochs not behaving nicely with GRUB2.

Post by xenos »

This looks indeed a bit strange. For me GRUB2 works fine with Bochs as well...
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
ethereal
Posts: 6
Joined: Mon Aug 08, 2011 11:28 pm

Re: Bochs not behaving nicely with GRUB2.

Post 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
ethereal
Posts: 6
Joined: Mon Aug 08, 2011 11:28 pm

Re: Bochs not behaving nicely with GRUB2.

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