Document Information
Preface
Part I Designing Device Drivers for the Solaris Platform
1. Overview of Solaris Device Drivers
2. Solaris Kernel and Device Tree
3. Multithreading
4. Properties
5. Managing Events and Queueing Tasks
6. Driver Autoconfiguration
7. Device Access: Programmed I/O
8. Interrupt Handlers
9. Direct Memory Access (DMA)
10. Mapping Device and Kernel Memory
11. Device Context Management
12. Power Management
13. Hardening Solaris Drivers
14. Layered Driver Interface (LDI)
Kernel Interfaces
User Interfaces
Part II Designing Specific Kinds of Device Drivers
15. Drivers for Character Devices
16. Drivers for Block Devices
17. SCSI Target Drivers
18. SCSI Host Bus Adapter Drivers
19. Drivers for Network Devices
20. USB Drivers
Part III Building a Device Driver
21. Compiling, Loading, Packaging, and Testing Drivers
22. Debugging, Testing, and Tuning Device Drivers
23. Recommended Coding Practices
Part IV Appendixes
A. Hardware Overview
B. Summary of Solaris DDI/DKI Services
C. Making a Device Driver 64-Bit Ready
D. Console Frame Buffer Drivers
Index
|
LDI Overview
The LDI includes two categories of interfaces:
Kernel interfaces. User applications use system calls to open, read, and write to devices that are managed by a device driver within the kernel. Kernel modules can use the LDI kernel interfaces to open, read, and write to devices that are managed by another device driver within the kernel. For example, a user application might use read(2) and a kernel module might use ldi_read(9F) to read the same device. See Kernel Interfaces.
User interfaces. The LDI user interfaces can provide information to user processes regarding which devices are currently being used by other devices in the kernel. See User Interfaces.
The following terms are commonly used in discussing the LDI:
Target Device. A target device is a device within the kernel that is managed by a device driver and is being accessed by a device consumer.
Device Consumer. A device consumer is a user process or kernel module that opens and accesses a target device. A device consumer normally performs operations such as open, read, write, or ioctl on a target device.
Kernel Device Consumer. A kernel device consumer is a particular kind of device consumer. A kernel device consumer is a kernel module that accesses a target device. The kernel device consumer usually is not the device driver that manages the target device that is being accessed. Instead, the kernel device consumer accesses the target device indirectly through the device driver that manages the target device.
Layered Driver. A layered driver is a particular kind of kernel device consumer. A layered driver is a kernel driver that does not directly manage any piece of hardware. Instead, a layered driver accesses one of more target devices indirectly through the device drivers that manage those target devices. Volume managers and STREAMS multiplexers are good examples of layered drivers.
|