JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Writing Device Drivers
search filter icon
search icon

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)

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

Numbers and Symbols

A

B

C

D

E

F

G

H

I

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

I

I/O
asynchronous data transfers
Differences Between Synchronous and Asynchronous I/O
Asynchronous Data Transfers (Block Drivers)
byte stream, Entry Points for Character Device Drivers
disk controls, Disk ioctls
DMA transfers, DMA Transfers (Synchronous)
file system structure, File I/O
miscellaneous control of, Miscellaneous I/O Control
multiplexing, Multiplexing I/O on File Descriptors
polled I/O interfaces
Polled I/O Interfaces
Implementing Polled I/O in Console Frame Buffer Drivers
programmed transfers, Programmed I/O Transfers
scatter/gather structures, Vectored I/O
synchronous data transfers
Differences Between Synchronous and Asynchronous I/O
Synchronous Data Transfers (Block Drivers)
visual I/O interfaces, Console Visual I/O Interfaces
IEEE 802.3, Ethernet V2 and ISO 8802-3 (IEEE 802.3)
IEEE 802.5, TPR and FDDI: SNAP Processing
ILP32
use in devmap(), Data Sharing in devmap()
use in ioctl(), Data Sharing in ioctl()
use in mmap(), Data Sharing in mmap()
ILP64, use in mmap(), Data Sharing in mmap()
_info() entry point
example of, _info() Example
required implementation, Loadable Module Entry Points
_init() entry point
network drivers, GLDv3 MAC Registration Functions
example of, _init() Example
required implementation, Loadable Module Entry Points
instance numbers, Device Instances and Instance Numbers
internal mode registers, Internal Sequencing Logic
internal sequencing logic, Internal Sequencing Logic
interrupt functions, Interrupt Functions
interrupt handlers
functionality, Interrupt Handler Functionality
registering, Registering Interrupts
interrupt handling, Interrupt Handlers
callback handler function, Callback Interfaces
clearing masks, Interrupt Function Examples
ddi_cb_register() function, Callback Interfaces
ddi_cb_unregister() function, Callback Interfaces
ddi_intr_add_handler() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
Registering Interrupts
ddi_intr_add_softint() function, Soft Interrupt Functions
ddi_intr_alloc() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
Interrupt Request Interfaces
ddi_intr_block_disable() function, Interrupt Initialization and Destruction Functions
ddi_intr_block_enable() function, Interrupt Initialization and Destruction Functions
ddi_intr_clr_mask() function
Interrupt Initialization and Destruction Functions
Interrupt Function Examples
ddi_intr_disable() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
ddi_intr_dup_handler() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
ddi_intr_enable() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
ddi_intr_free() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
ddi_intr_get_cap() function, Interrupt Capability Functions
ddi_intr_get_hilevel_pri() function
Priority Management Functions
Handling High-Level Interrupts
ddi_intr_get_navail() function, Interrupt Capability Functions
ddi_intr_get_nintrs() function, Interrupt Capability Functions
ddi_intr_get_pending() function
Interrupt Initialization and Destruction Functions
Interrupt Function Examples
ddi_intr_get_pri() function
Priority Management Functions
Handling High-Level Interrupts
ddi_intr_get_softint_pri() function, Soft Interrupt Functions
ddi_intr_get_supported_types() function, Interrupt Capability Functions
ddi_intr_hilevel() function, High-Level Interrupts
ddi_intr_remove_handler() function
MSI-X Interrupts
Interrupt Initialization and Destruction Functions
ddi_intr_remove_softint() function, Soft Interrupt Functions
ddi_intr_set_cap() function, Interrupt Initialization and Destruction Functions
ddi_intr_set_mask() function
Interrupt Initialization and Destruction Functions
Interrupt Function Examples
ddi_intr_set_nreq() function, Interrupt Request Interfaces
ddi_intr_set_pri() function, Priority Management Functions
ddi_intr_set_softint_pri() function
Soft Interrupt Functions
Interrupt Function Examples
ddi_intr_trigger_softint() function
High-Level Interrupts
Soft Interrupt Functions
gld_intr() function, gld_intr() Function
high-level interrupts
High-Level Interrupts
Software Interrupts
Handling High-Level Interrupts
overview, Interrupt Handling
pending interrupts, Interrupt Function Examples
setting masks, Interrupt Function Examples
software interrupts
Software Interrupts
Interrupt Function Examples
Handling High-Level Interrupts
interrupt property, definition, Interrupt Handling
Interrupt Resource Management, Interrupt Resource Management
interrupts
allocating, Interrupt Request Interfaces
callback support, Callback Interfaces
capability functions, Interrupt Capability Functions
changing soft interrupt priority example, Interrupt Function Examples
checking pending interrupts example, Interrupt Function Examples
clearing interrupt masks example, Interrupt Function Examples
common problems with, Interrupt Issues
description of, Interrupt Handler Overview
handling high-level interrupts examples, High-Level Interrupt Handling Example
handling low-level interrupts example, High-Level Interrupt Handling Example
high-level mutexes, High-Level Mutexes
initialization and destruction functions, Interrupt Initialization and Destruction Functions
interrupt handling example, Interrupt Handler Functionality
invalid, Handling Stuck Interrupts
legacy defined, Device Interrupts
message-signaled defined, Device Interrupts
MSI defined, Device Interrupts
MSI implementation, MSI Interrupts
MSI-X defined, Device Interrupts
MSI-X implementation, MSI-X Interrupts
network drivers, GLDv2 Driver Requirements
priority levels, High-Level Interrupts
priority management functions, Priority Management Functions
registering legacy interrupt example, Registering Legacy Interrupts
registering legacy interrupts, Registering Legacy Interrupts
registering MSI interrupts, Registering MSI Interrupts
registering MSI interrupts example, Registering MSI Interrupts
removing legacy interrupt example, Registering Legacy Interrupts
removing MSI interrupts example, Registering MSI Interrupts
requesting, Interrupt Request Interfaces
setting interrupt masks example, Interrupt Function Examples
soft interrupt functions, Soft Interrupt Functions
software interrupts, Handling High-Level Interrupts
types of, Device Interrupts
using legacy, Legacy Interrupts
writing handlers, Interrupt Handlers
ioctl(9E) driver entry point, SPARC Platform Console Communication
ioctl() function
character drivers, ioctl() Entry Point (Character Drivers)
commands, Well Known ioctl Interfaces
DLIOCRAW, GLDv2 I/O Control Functions
IOMMU, DMA Isolation
iovec structure, Vectored I/O
IRM, See Interrupt Resource Management
ISO 8802-3, Ethernet V2 and ISO 8802-3 (IEEE 802.3)
ISO 9314-2, TPR and FDDI: SNAP Processing
ISR (interrupt service routine), Interrupt Handler Functionality