GRUB2 Multiboot Information tags

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
zerosum
Member
Member
Posts: 63
Joined: Wed Apr 09, 2008 6:57 pm

GRUB2 Multiboot Information tags

Post 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
User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

Post 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:
"Sufficiently advanced stupidity is indistinguishable from malice."
zerosum
Member
Member
Posts: 63
Joined: Wed Apr 09, 2008 6:57 pm

Post 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
User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

Post 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.
"Sufficiently advanced stupidity is indistinguishable from malice."
Post Reply