In this chapter, you learned why we can't just work directly with peripheral I/O memory. Next, we covered how, within the Linux device driver framework, to access and perform I/O (reads and writes) on hardware (or peripheral) I/O memory. You learned that there are two broad ways to do this: via MMIO (the common approach) and P(M)IO.
We learned that systems such as the x86 often employ both approaches as that's how the peripherals are designed. MMIO and/or PMIO access is a key task for any driver – after all, this is how we talk to and control hardware! Not only that, but many of the underlying bus drivers (for various buses on Linux, such as I2C, USB, SPI, PCI, and more) internally use MMIO/PMIO for performing peripheral I/O. So, good job on completing this chapter!
In the next chapter, we'll look at another critical hardware-related area of importance: understanding, dealing with, and working with hardware interrupts.