0

When we say that a device is memory mapped,

  1. Who maps the addresses to the devices?
  2. How are these address spaces decided in terms of location and size?
  3. Where are these maps stored?
  4. Do these address spaces vary across system boots?
3
  • Are you interested in a specific operating system like Linux or Windows? Commented May 17, 2016 at 14:22
  • I am trying to get the general understanding of memory mapped IO. If you have a specific OS implementation, that'd be useful too! Commented May 17, 2016 at 14:31
  • Address decoding logic hardware handles the mapping. The adresses and ranges may be configurable or fixed. The exact mechanisms are architecture/OS dependent. Commented May 17, 2016 at 16:43

1 Answer 1

1

Roughly,

  1. The MMU hardware.
  2. The kernel manages the MMU tables used by the MMU hardware.
  3. In a per-process structure. Under Linux, look at /proc/<pid>/maps to see all memory-mapped files and devices.
  4. They can, so you should not count on them being fixed.

For further reading, I suggest the Memory Mapping and DMA chapter from Linux Device Drivers, this FAQ, and this stackoverflow question.

2
  • Linux? MMU? Don't see them mentioned in the question. Commented May 18, 2016 at 9:06
  • @MartinJames: Absence of some terms in the question doesn't prohibit their usage in the answer.
    – Tsyvarev
    Commented May 18, 2016 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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