multi-boot memory map!?!

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
Brill

multi-boot memory map!?!

Post by Brill »

        +-------------------+
-4      | size              |
        +-------------------+
0       | base_addr_low     |
4       | base_addr_high    |
8       | length_low        |
12      | length_high       |
16      | type              |
        +-------------------+

where `size' is the size of the associated structure in bytes, which can be greater than the minimum of 20 bytes. < -- I presume this means the imediate structure for one particular area of ram? How can it get bigger than 20 bytes.

When i boot with bochs Grub says i have a 48byte limit. So thats to strucutures of the same style above except the possibility of being slightly bigger. But what is bigger or newly included though?

Thanks, Brill.
Brill

RE:multi-boot memory map!?!

Post by Brill »

woops. my memory map is 48 bytes long because 4 bytes gets added to each mapped structure.
But still, how can it be bigger than 20 bytes of ram?
carbonBased

RE:multi-boot memory map!?!

Post by carbonBased »

This is just a guess... I don't remember how Grub sets up the memory map table, and I'm not sure I totally understand the question... but 48 is evenly divisable by 16.  So, wouldn't "size" be referring to the end of the memory map structures?  In other words, starting right after the 4 byte size variable, you'll find three memory map structures (48/16 = 3), each 16 bytes a piece.

Again, just a guess...
Jeff
Brill

RE:multi-boot memory map!?!

Post by Brill »

No for each struture or block of memory map a size value heads it. The size value is 4 bytes and the structure itself is 20 bytes.

Base low
Base High
Limit low
Limit high
Type

each 4 bytes long.

Now, in the documentation for multi-boot it says the structure can be bigger than the minimum 20 bytes. But i wanted to know was how can it be bigger. What makes it bigger. But what i have now come to think or realise is that's a backwards compatibility thing which is why each structure has a size header to it. So the kernel can see that and load the values it does understand the use that size as an offset with the base address to find the next structure in the memory map. But as it goes, i don't think multi-boot has a mmap structure bigger than 20bytes. At least not yet.
Post Reply