When working with the MMIO approach, the peripheral I/O memory is mapped to the kernel VAS, and thus appears to you – the driver author – as plain old memory, just like RAM. We need to be careful here: there are caveats and cautions to be observed. You are not expected to treat the region as plain old RAM and access it directly via the usual C routines!
In the upcoming sections, we'll show you how to perform I/O (reads and writes) for any peripheral I/O region that's been remapped via the MMIO approach. We'll begin with the very common case of performing small (1- to 8-byte) I/O, then move on to repeating I/O, before looking at how to memset and memcpy an MMIO region.