Writing Device Drivers

Bus Architectures

This section describes device identification, device addressing, and interrupts.

Device Identification

Device identification is the process of determining which devices are present in the system. Some devices are self-identifying—the device itself provides information to the system so that it can identify the device driver that needs to be used. SBus and PCI local bus devices are examples of self-identifying devices. On SBus, the information is usually derived from a small Forth program stored in the FCode PROM on the device. Most PCI devices provide a configuration space containing device configuration information. See the sbus(4) and pci(4) man pages for more information.

All modern bus architectures require devices to be self-identifying.

Supported Interrupt Types

Solaris supports both polling and vectored interrupts. The Solaris 9 DDI/DKI interrupt model is the same for both. See Chapter 7, Interrupt Handlers for more information about interrupt handling.