GRUB doesn't supply mmap_* fields
Posted: Thu Jan 29, 2004 2:14 pm
Hey everyone.
Maybe someone here has come across this problem, or something similar.
I boot my OS using GRUB, and so far this has worked very well. However, when I tried to add memory paging and needed to access the mmap_* fields of the Multiboot information structure, I found that GRUB wasn't supplying them. It provides the mem_* fields with information about the amount of RAM (even though the flags say it shouldn't), but the mmap_length is 0.
I'm supplying GRUB the header flag 0x00000003 (i.e, bits 0 and 1 set, which should enable page alignment and memory information). It gives back the information structure with the flag 0x000003D7, which has bit 6 (mmap_* fields) not set. This doesn't make any sense, because I'm telling it to give me memory information, and the Multiboot specification says that if the bootloader does not understand any bit that is in the header flag, or if it can't satisfy it, then it should error out. Yet, it merrily boots the kernel. Every example I've seen of this uses the same header flags.
The Multiboot specification leaves much do be desired in this area. I'm sure whatever is wrong is something silly on my behalf, but I'm at a loss to figure out what it is. What header flags do people in here use? Any help would be much appreciated.
Thanks in advance,
Gnome
Maybe someone here has come across this problem, or something similar.
I boot my OS using GRUB, and so far this has worked very well. However, when I tried to add memory paging and needed to access the mmap_* fields of the Multiboot information structure, I found that GRUB wasn't supplying them. It provides the mem_* fields with information about the amount of RAM (even though the flags say it shouldn't), but the mmap_length is 0.
I'm supplying GRUB the header flag 0x00000003 (i.e, bits 0 and 1 set, which should enable page alignment and memory information). It gives back the information structure with the flag 0x000003D7, which has bit 6 (mmap_* fields) not set. This doesn't make any sense, because I'm telling it to give me memory information, and the Multiboot specification says that if the bootloader does not understand any bit that is in the header flag, or if it can't satisfy it, then it should error out. Yet, it merrily boots the kernel. Every example I've seen of this uses the same header flags.
The Multiboot specification leaves much do be desired in this area. I'm sure whatever is wrong is something silly on my behalf, but I'm at a loss to figure out what it is. What header flags do people in here use? Any help would be much appreciated.
Thanks in advance,
Gnome