In order to solve this issue, we must understand that modern processors provide two broad ways by which they can access and work with hardware I/O (peripheral chip) memory:
- By reserving some region(s) of the processor's address space for these peripheral devices; that is, by using memory-mapped I/O (MMIO) as a mapping type for I/O.
- By providing distinct assembly (and the corresponding machine) CPU instructions to directly access the I/O memory. Using such a mapping type for I/O is called port-mapped I/O (PMIO or simply PIO).
We shall consider both of these techniques in the Understanding and using memory-mapped I/O and Understanding and using port-mapped I/O sections, respectively. Before we do that, though, we need to learn how to politely ask the kernel for permission to use these I/O resources!