Just to clarify: I'm not asking about the size of the structure pointed to by the value in the EBX register, I'm asking about the total size of all the information in memory.
I'm currently working on an x86 Multiboot 1 compatible Kernel. The standard offers no guarantees about where GRUB will place this information or its total size. The specification states:
In practice this seems to be loaded within the lowest 1MB of memory. Up until this point, during boot I initialise my boot paging structures with identity mapping for the lowest 1MB as a way to ensure that the Multiboot information is accessible by the higher-half kernel main. Finding out the location of this structure is trivial, but I haven't found any information about finding an accurate size. ( Ideally without walking the entire structure ).The Multiboot information structure and its related substructures may be placed anywhere in memory by the boot loader (with the exception of the memory reserved for the kernel and boot modules, of course). It is the operating system’s responsibility to avoid overwriting this memory until it is done using it.
It looks like the Multiboot 2 information structure provides this information very clearly. Moving to Multiboot 2 in the long run sounds like a good idea.
I asked this question on StackOverflow, and haven't received any responses yet. I understand if people would rather answer there and get the reputation reward. Here's the link to my question:
https://stackoverflow.com/questions/588 ... total-size