Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
Deutsch
docs.sun.com - Startseite
>
Solaris 7 Software Developer Collection
> Writing Device Drivers
Writing Device Drivers
Suchtext Nur in diesem Buch
Suche Hilfe
Innerhalb
Solaris 7 Software Developer Collection
Nach weiteren Dokumenten suchen
Dokumentation nach Titel durchsuchen
Produktdokumentation durchsuchen
Support-Ressourcen
Sun Schulungen
BigAdmin System Administration Portal
Sun Supportcenter
Sun Solve
Dieses Buch im PDF-Format herunterladen (1004 KB)
Writing Device Drivers
Book Information
Preface
Who Should Use This Book
How This Book Is Organized
Related Books
Ordering Sun Documents
What Typographic Changes Mean
1. SunOS Kernel and Device Tree
What Is the Kernel?
Overview of the Solaris 7 DDI/DKI
Device Tree
2. Hardware Overview
SPARC Processor Issues
x86 Processor Issues
Store Buffers
System Memory Model
Bus Architectures
Bus Specifics
Device Issues
PROM on SPARC Machines
3. Overview of SunOS Device Drivers
What Is a Device Driver?
Types of Device Drivers
Bus Address Spaces
Driver Interfaces
Callback Functions
Interrupt Handling
Driver Context
Printing Messages
Dynamic Memory Allocation
Software State Management
Properties
Driver Layout
64-Bit-Safe Device Drivers
C Language and Compiler Modes
4. Multithreading
Threads
Multiprocessing Changes Since the SunOS 4.1 System
Locking Primitives
Thread Synchronization
Choosing a Locking Scheme
5. Autoconfiguration
Autoconfiguration Overview
Autoconfiguration Additions to the State Structure
Driver Loading and Configuration
Data Structures
Loadable Driver Interface
Device Configuration
6. Interrupt Handlers
Interrupt Handler Overview
Types of Interrupts
Registering Interrupts
Responsibilities of an Interrupt Handler
Interrupt Handling Additions to the State Structure
Handling High-Level Interrupts
7. DMA
DMA Model
Types of Device DMA
Types of Host Platform DMA
DMA Software Components: Handles, Windows, and Cookies
DMA Operations
DMA Windows
Allocating Private DMA Buffers
8. Power Management
Power Management Overview
Power Management Additions to the State Structure
Device Power Management Model
System Power Management Model
Power Management Flow of Control
9. Drivers for Character Devices
Character Driver Structure Overview
Entry Points
Autoconfiguration
Controlling Device Access
I/O Request Handling
Mapping Device Memory
Multiplexing I/O on File Descriptors
Miscellaneous I/O Control
10. Drivers for Block Devices
Block Driver Structure Overview
File I/O
Block Driver Additions to the State Structure
Entry Points
Autoconfiguration
Controlling Device Access
Data Transfers
Synchronous Data Transfers
Asynchronous Data Transfers
Miscellaneous Entry Points
11. Mapping Device or Kernel Memory
Memory Mapping Operations
Exporting the Mapping
Associating Device Memory With User Mappings
Associating Kernel Memory With User Mappings
12. Device Context Management
What Is a Device Context?
Context Management Model
Context Management Additions to the State Structure
Context Management Operation
13. SCSI Target Drivers
SCSI Target Driver Overview
Reference Documents
Sun Common SCSI Architecture Overview
SCSI Target Drivers
Building and Transporting a Command
14. SCSI Host Bus Adapter Drivers
SCSI HBA Driver Overview
SCSA HBA Interfaces
HBA Driver Dependency and Configuration Issues
SCSA HBA Entry Points
Driver Installation
15. Loading and Unloading Drivers
Preparing for Installation
Installing and Removing Drivers
Removing the Driver
Loading Drivers
Getting the Driver Module's ID
Unloading Drivers
Driver Packaging
16. Debugging
Machine Configuration
Coding Hints
Debugging Tools
Testing
A. Converting a SunOS 4.1 Device Driver to SunOS 5.7
Before Starting the Conversion
Development Environment
Summary of Changes
Conversion Notes
SunOS 4.1 to SunOS 5.7 Differences
B. Interface Transition List
C. Summary of Solaris 7 DDI/DKI Services
buf(9S) Handling
Copying Data
Device Access
Device Configuration
Device Information
DMA Handling
Flow of Control
Interrupt Handling
Kernel Statistics
Memory Allocation
Memory Space Access
Common Device Access Functions
Polling
Power Management
Printing System Messages
Process Signaling
Properties
Register and Memory Mapping
Device Context Management
PCI Configuration
I/O Port Access
SCSI and SCSA
Soft State Management
String Manipulation
System Information
Thread Synchronization
Timing
uio(9S) Handling
Utility Functions
D. Sample Driver Source Code
Sample Drivers
E. Driver Code Layout Structure
Header Files
xx.c Files
driver .conf Files
F. Making a Device Driver 64-Bit Ready
How 64-Bit Drivers Differ From 32-Bit Drivers
General Conversion Steps
Data Structure Macros
G. Advanced Topics
Multithreading
Sun Disk Device Drivers
SCSA
H. Converting Device Drivers to Support Hotplugging
Introduction
Overview of Hotplugging
Solaris Hotplugging Driver Issues
Hotplug-Capable Device Driver Development
Device Driver Testing
Conclusion
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.