Skip Navigation Links | |
Exit Print View | |
Writing Device Drivers Oracle Solaris 11.1 Information Library |
Part I Designing Device Drivers for the Oracle Solaris Platform
1. Overview of Oracle Solaris Device Drivers
2. Oracle Solaris Kernel and Device Tree
5. Managing Events and Queueing Tasks
7. Device Access: Programmed I/O
10. Mapping Device and Kernel Memory
13. Hardening Oracle Solaris Drivers
14. Layered Driver Interface (LDI)
Layered Identifiers - Kernel Device Consumers
Layered Driver Handles - Target Devices
Opening and Closing Target Devices
Retrieving Target Device Information
Retrieving Target Device Property Values
Receiving Asynchronous Device Event Notification
How to Build and Load the Layered Driver
Device Information Library Interfaces
Print System Configuration Command Interfaces
Device User Command Interfaces
Part II Designing Specific Kinds of Device Drivers
15. Drivers for Character Devices
18. SCSI Host Bus Adapter Drivers
19. Drivers for Network Devices
Part III Building a Device Driver
22. Compiling, Loading, Packaging, and Testing Drivers
23. Debugging, Testing, and Tuning Device Drivers
24. Recommended Coding Practices
B. Summary of Oracle Solaris DDI/DKI Services
C. Making a Device Driver 64-Bit Ready
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.