Working with Hardware I/O Memory

In this chapter, we will focus on an important hardware-related aspect of writing a device driver: how exactly to access and perform I/O (input/output, reads and writes) to hardware (or peripheral) I/O memory – the peripheral hardware chip that you are writing the driver for.

The motivation behind the knowledge you will gain in this chapter is straightforward: without this, how will you actually control the device? Most devices are driven by carefully calibrated writes and reads to their hardware registers and/or peripheral memory, also called hardware I/O memory. Linux, being a virtual memory-based OS, requires some abstraction in the way it works with peripheral I/O memory.

In this chapter, we will cover ...

Get Linux Kernel Programming Part 2 - Char Device Drivers and Kernel Synchronization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.