Chethan Ravindranath
Chethan Ravindranath

Reputation: 2061

Memory mapped IO - who maps the addresses to the physical address space?

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?

Upvotes: 0

Views: 573

Answers (1)

jamieguinan
jamieguinan

Reputation: 1690

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.

Upvotes: 1

Related Questions