AIX device drivers
Many computer programs are dedicated to work with devices that are attached to the computer in some way. For example, some programs send control characters to a printer, some programs receive characters from a console, and some programs read data from a tape. Each of these programs is a device driver program because the program is dedicated to handle input from or output to a device. Such programs are a part of, or an extension of, the computer’s operating system.
Any operating system that supports multitasking, such as the AIX® operating system, needs a mechanism to prevent one program from writing data to, or changing the state of, a device that is already being accessed by another program. So, a multitasking operating system depends on the computer’s processors to distinguish between privileged and non-privileged execution of instructions. Therefore, you must distinguish between programs that run in privileged mode (kernel mode) and programs that run in user mode. The AIX kernel consists of all software programs that run in kernel mode.
Some AIX programs that run in user mode, such as a network adapter or a device that is attached to a USB port, can access device driver programs. However, these AIX programs can access the device driver programs only by using software that is part of the kernel. Because kernel device drivers are more complex than the device drivers that run in user mode, the device driver term refers to the software that controls a device when the program is running in kernel mode.
The routines for the device driver programs are written in C and compiled to produce one or two Extended Object File Format (XCOFF or XCOFF64) object files. Beginning with AIX Version 6.1, all device driver programs are 64-bit (XCOFF64). The 32-bit device driver programs are not supported. The object files are linked to enable the kernel loader to resolve the kernel symbols. When the object files are linked, the kernel loader section is updated with a list of symbols to import from the kernel. The kernel symbols are in the /lib/kernex.exp file. This linking also establishes the configuration routine of the device driver as the default entry point for beginning execution.
- Overview of AIX device drivers, entry points, and types
- Programmed I/O operations and Direct Memory Access (DMA) for PCI adapters
- Interrupts and interrupt handling
- Memory management
- Serialization and synchronization, locking, and timers
- Device configuration methods
For information about ODM for PCI/PCIe adapters, see Customizing AIX ODM for PCI/PCIe adapters.