Page 1 of 1

GRUB2 Multiboot Information tags

Posted: Thu Apr 10, 2008 11:25 pm
by zerosum
Hi all,

I'm sure you're all getting sick of my questions by now, but I have a question regarding the GRUB2 multiboot draft specification.

In the old specification it states upon entry to the loaded OS, EAX will contain a magic number and EBX will contain a pointer to the GRUB Multiboot information structure, which it does, and this is all good.

In the new specification, however, it just says that EAX will contain a magic number, and doesn't say where the pointer to the Multiboot Information tags is.

I tried the obvious (EBX), but either EBX doesn't point to a Multiboot Start tag, or the start tag is corrupt. Further, EBX doesn't seem to point to a Multiboot Information structure either (as per old specification).

So what I'd like to know is, where can I find either a pointer to the old information structure, or a pointer to the new tags, upon entry?

Thanks in advance,
Lee

Posted: Fri Apr 11, 2008 7:16 am
by Zenith
The Multiboot Draft also defines a new multiboot struct...

Yes, EBX does contain the pointer to the structure.

Like I vaguely mentioned in an earlier post, GRUB2 doesn't implement the struct part properly. Make sure you're using the latest CVS build (not necessary, but helpful), and even with that, GRUB2 has the key for the start tag at 1, bootloader name at 2, etc. I found this out the hard way...

Good luck! :wink:

Posted: Fri Apr 11, 2008 7:35 am
by zerosum
karekare0 wrote:GRUB2 has the key for the start tag at 1, bootloader name at 2, etc. I found this out the hard way...
First off, thanks for responding, I do appreciate it :-)

Could you clarify that for me though, please? Do you mean the key for the start tag IS 1, or it's offset?

My code checked if the first key value (from the information pointed to by EBX) contained zero as per the draft specs, and when it didn't, I had no idea what to do--so I gracefully errored out.

Cheers,
Lee

Posted: Fri Apr 11, 2008 7:15 pm
by Zenith
I mean that GRUB2 has the key for the start tag at 1, while the spec has it at 0. Try that and see if it works.