I have a query regarding the below information in http://duartes.org/gustavo/blog/post/motherboard-chipsets-memory-map/

"In 64-bit mode it is possible to use physical addresses above the total RAM in the system to access the RAM regions that correspond to physical addresses stolen by motherboard devices. This is called reclaiming memory and it’s done with help from the chipset."

Let's say if the RAM size is of 4GB. In 64-bit mode or with PAE enabled for 32-bit mode, if the address space above the total RAM 0x10000012C is assigned to some assorted device on the mother board, then how that assorted device can get hold of some memory region on RAM?


closed as off-topic by David Richerby, Yuval Filmus, fade2black, Evil, Luke Mathieson Dec 13 '17 at 12:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about computer science, within the scope defined in the help center." – David Richerby, Yuval Filmus, fade2black, Evil, Luke Mathieson
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Unless I've misunderstood, this question is "How does this actual computer hardware achieve some specific thing?" That's not a question about computer science. $\endgroup$ – David Richerby Dec 12 '17 at 14:02

I am not entirely sure what your question is but I will try to answer. I think your confusion comes from the fact that some peripherals (typically PCI and APIC) use memory-mapped registers that "steal" memory from the physical address space (the famous 1GB hole described in the blog post). But those memory-mapped registers do not use RAM at all. They simply steal part of the address space and thus some physical addresses that would normally refer to RAM now serve another purpose. Now if you only have 4GB of RAM and the RAM is mapped at 0, a peripheral at 0x10000012C cannot create a hole in the RAM address space because the RAM is mapped from 0 to 0xffffffff. I attached a picture that hopefully makes this clearer.

enter image description here

In summary: when we say "memory-mapped register" what we really mean is "physical-address-space-mapped register", this has nothing to do with RAM.

Note, however, that any peripheral (memory-mapped or not), could also use some RAM, through DMA. But this is a totally different thing because by doing so it does not steal any physical address (and thus does not create a hole).

Finally note that all of this is simplified anyway because there isn't necessarily a unique physical address space in the system, each device may have a different view of the system. See 1 for a relatively clear explanation. Thus in the picture above, I am really referring to the CPU's physical address space.

1: Not your parents’ physical address space, Gerber et al, PDF


Not the answer you're looking for? Browse other questions tagged or ask your own question.