I am working on a small x86 core. I am browsing and trying to read the memory card that GRUB provides in the multiboot header. I have an Intel i3 processor and 4 gigabytes of RAM. While working on this computer, I read the following memory card:
--Base Address-- --Length-- --Type-- 0x0000000000000000 0x000000000009d000 0x1 0x000000000009d000 0x0000000000003000 0x2 0x00000000000e0000 0x0000000000020000 0x2 0x0000000000100000 0x00000000bb53f000 0x1 0x00000000bb63f000 0x0000000000080000 0x2 0x00000000bb6bf000 0x0000000000100000 0x4 0x00000000bb7bf000 0x0000000000040000 0x3 0x00000000bb7ff000 0x0000000000001000 0x1 0x00000000bb800000 0x0000000004800000 0x2 0x00000000e0000000 0x0000000010000000 0x2 0x00000000feb00000 0x0000000000004000 0x2 0x00000000fec00000 0x0000000000001000 0x2 0x00000000fed10000 0x0000000000004000 0x2 0x00000000fed18000 0x0000000000002000 0x2 0x00000000fed1b000 0x0000000000005000 0x2 0x00000000fee00000 0x0000000000001000 0x2 0x00000000ffe80000 0x0000000000180000 0x2 0x0000000100000000 0x0000000038000000 0x1
When I summarize the available memory areas, I get ...
0x1 (available) - 3893.8 MiB
Which seems correct, leaving the last 200ish MiB reserved for other devices. The only problem is the total number of other types of memory:
0x2, 0x3, 0x4 - 331.5 MiB
Putting my total amount of RAM on 4225.3 megabytes or a little more than 4.1 GB , which leads me to my questions:
Why do I type more than 4 GB of RAM when I only have 4GiB installed?
Why is the last base address on the memory card 0x0000000100000000? When using only 4 GB of RAM, 32 bits should be the maximum address size needed to solve all problems. I do not understand something?
c memory-management memory operating-system osdev
Joel
source share