I'm relatively sure this has been talked about before, but a search didn't get me anywhere.
I'm booting with GRUB straight into protected mode. What's an effective way of getting the total system memory?
Thanks for any help.
Getting total system memory.
Did you read the Multiboot specification? Specifically, the section on the boot information format?
Since you use GRUB I agree with urxae. Use the multiboot information. Otherwise read How do I determine the amount of RAM? on OsFaq2.
Thanks, I got the info from the multiboot specification to work nicely. I'm just curious if anyone knows the following, in regaurds to the memory map structure:
Thanks.
The multiboot specification says that the type number of 1 represents available. Does anyone know what 2-4 mean. I mean beyond the definition of reserved.where `size' is the size of the associated structure in bytes, which can be greater than the minimum of 20 bytes. `base_addr_low' is the lower 32 bits of the starting address, and `base_addr_high' is the upper 32 bits, for a total of a 64-bit starting address. `length_low' is the lower 32 bits of the size of the memory region in bytes, and `length_high' is the upper 32 bits, for a total of a 64-bit length. `type' is the variety of address range represented, where a value of 1 indicates available ram, and all other values currently indicated a reserved area.
Thanks.
Hi,
I think it's the same as in int15 ah=0xE820 (http://www.ctyme.com/intr/rb-1741.htm) - at least, this method and GRUB both seem to give me the same memory regions on both Bochs and VPC...
HTH
Adam
I think it's the same as in int15 ah=0xE820 (http://www.ctyme.com/intr/rb-1741.htm) - at least, this method and GRUB both seem to give me the same memory regions on both Bochs and VPC...
HTH
Adam