| - Copyright
- Preface
- 1. Solaris Kernel and Device Tree
- 2. Overview of Solaris Device Drivers
- 3. Multithreading
- 4. Properties and Events
- 5. Driver Autoconfiguration
- 6. Device Access -- Programmed I/O
- 7. Interrupt Handlers
- 8. Direct Memory Access (DMA)
- 9. Power Management
- 10. Drivers for Character Devices
- 11. Drivers for Block Devices
- 12. Mapping Device and Kernel Memory
- 13. Device Context Management
- 14. SCSI Target Drivers
- 15. SCSI Host Bus Adapter Drivers
- 16. Drivers for Network Devices
- 17. Compiling, Loading, Packaging, and Testing Drivers
- 18. Debugging
- 19. Recommended Coding Practices
- Debugging
- Use cmn_err() to Log Driver Activity
- Use ASSERT() to Catch Invalid Assumptions
- Use mutex_owned() to Validate and Document Locking Requirements
- Use Conditional Compilation to Toggle Costly Debugging Features
- Defensive Programming
- Using Separate Device Driver Instances
- Exclusive Use of DDI Access Handles
- Detecting Corrupted Data
- DMA Isolation
- Handling Stuck Interrupts
- Additional Programming Considerations
- Declaring a Variable Volatile
- Serviceability
- Periodic Health Checks
- A. Hardware Overview
- B. Summary of Solaris 9 DDI/DKI Services
- C. Making a Device Driver 64-Bit Ready
- Index
| |