Writing Device Drivers
  Search only this book
Download this book in PDF

Index

A

adb(1) command246
add_drv(1M) command227
address spaces2, 18
attach(9E) entry point95
autoconfiguration
.....of block devices171
.....of character devices148
.....of SCSI drivers199
.....routines49
autovectored interrupts107

B

binary compatibility4
block driver
.....autoconfiguration171
.....entry points50
.....slice number171
block interrupt cookie52
burst sizes135
bus
.....architectures14
.....interrupt levels106
.....SCSI189
bus nexus device drivers5
bus-master DMA124
byte-stream I/O42

C

cache140
callback functions51, 102, 134
cb_ops(9S) structure88, 170
character device drivers42, 147
.....entry points for50
compiler modes65
compiling/linking a driver226
condition variables344
.....and interface functions344
.....and mutex locks77, 277
.....routines for,78
configuration file, device
.....attach(9E)95
.....detach(9E)100
.....getinfo(9E)102
.....identify(9E)91
.....probe(9E)93
configuration file, hardware226
context of device driver52
control registers
.....device context management of213
cookie
.....DMA120
.....types of52

D

data structures
.....cb_ops(9S)88, 170
.....dev_ops(9S)87, 170
.....for device drivers60
.....overview of86
data, storage classes of74
DDI/DKI
.....and disk performance300
.....compliance testing263
.....interface summary307
.....kernel support routines270
ddi_ functions307
.....ddi_add_intr(9F)97, 112
.....ddi_create_minor_node(9F)98
.....ddi_dma_free(9F)123
.....ddi_dma_nextseg(9F)124
.....ddi_dma_nextwin(9F)123
.....ddi_dma_segtocookie(9F)124
.....ddi_get_instance(9F)97
.....ddi_iblock_cookie_t52
.....ddi_idevice_cookie_t52
.....ddi_map_regs(9F)98
.....ddi_prop_create(9F)58
.....ddi_prop_op(9F)58
.....ddi_remove_intr(9F)101
.....ddi_unmap_regs(9F)101
detach(9E) entry point100
dev_ops(9S) structure87, 170
device access system calls173
device addressing15
device driver
.....converting to 5.x269
.....debugging
............coding hints236
............configuration231
............existing drivers241
............tools243
.....definition of41
.....entry points48
.....for character-oriented devices147
.....header files60
.....layout structure60
.....loadable interface89
......module configuration62
......overview41
......register mapping98
......source files62
......standard character42
......testing263
......types of42
device information
......dev_info node97
......self-identifying14
......tree structure5, 6
device interrupt cookie52
device interrupt handling
......ddi_add_intr(9F)97, 112
......ddi_remove_intr(9F)101
......interrupt block cookie97
device interrupts, types of107
device memory
......accessing44
......mapping43, 331
device polling
......overview44
......poll(2) system call44
device registers
......accessing44
......ddi_map_regs(9F)98
......ddi_unmap_regs(9F)101
......examples of45
......mapping95
device tree5
devlinks(1M) command227
disk
......I/O controls299
......performance300
DKI, See DDI/DKI
DMA
......buffer allocation143
......burst sizes135
......callbacks138
......cookie120
......engine programming136
......engine restrictions126
......freeing resources137
......handle119
.....limits127
.....locking131
.....object119
.....operations124
.....private buffer allocation143
.....register structure134
.....resource allocation131
.....resource interfaces315
.....segment120
.....transfers156
.....types of122
.....window120
driver entry points313
.....attach(9E)95
.....definition of48
.....detach(9E)100
.....identify(9E)91
.....probe(9E)93
.....prop_op(9E)58
DVMA
.....SBus slots that support17
dynamic loading3
dynamic memory allocation54

E

entry points, See driver entry points
external registers25

F

filesystem I/O169
fini(9E)49, 91
first-party DMA125

G

geographical addressing15
graphics devices
.....device context management of213

H

hardware configuration file226
header files for device drivers60

I

I/O
......control overview43
......disk controls299
......filesystem structure169
......miscellaneous control of165
......multiplexing162
......port access331
......programmed transfers154
......scatter/gather structures153
identify(9E) entry point91
info(9E)49
init(9E)49, 91
instance numbers92
internal mode registers25
internal sequencing logic25
interrupt cookie, See cookie
interrupt handling
......block interrupt cookie52
......device interrupt cookie52
......interfaces for322
......overview52
......registering a handler95
interrupts
......common problems with25
......registering97
......specification of106
......types of107
inumber97

K

kadb(1M) command246
kernel modules
......directory of227
......dynamic loading3
kernel threads72
kernel, definition of1
keywords, new66

L

leaf device drivers5
lightweight process71
linking a driver226
loading drivers
.....add_drv(1M) command227
.....compiling a driver226
.....hardware configuration file226
.....linking a driver226
.....overview3
loading modules49, 227
lock granularity295
locking primitives, types of74
LWP71

M

memory mapping
.....device context management of43, 213
memory model
.....SPARC13
.....store buffers12
memory, allocation of54, 326
minor device node98
modldrv87
modlinkage87
module directory227
module ID, getting228
modunload(1M) command229
mount(2) system call173
multithreaded kernel73
multithreading2
.....and condition variables78
.....and lock granularity295
.....and locking primitives74
.....application threads71
.....thread synchronization77
mutex
.....functions76, 344
.....locking order296
.....locks75, 344
.....related panics298
......routines75

N

node types99
non-self-identifying devices15

O

object locking131
open(2) system call173

P

padding structures47
peripheral devices26
physical DMA122
physical SBus addresses
......in SPARCstation 117
poll(2) system call44
polled interrupts107
polling, See device polling
printing messages53
probe(9E) entry point93
programmed I/O154
prop_op(9E) entry point58
properties
......ddi_prop_create(9F)58
......ddi_prop_op(9F)58
......overview of,57
......prop_op(9E)entry point58
......types of57
PTE masks37

Q

queueing302

R

readers/writer locks77
registers, See control registers and deviceregisters
rnumber98

S

S_IFCHR99
SBus
.....geographical addressing15
.....physical SBus addresses17
.....slots supporting DVMA17
scatter/gather I/O153
SCSA189
.....functions, types of194
.....global data definitions301
.....interfaces334
SCSI
.....architecture191
.....flow of control192
.....interfaces334
.....resource allocation205
.....simple driver code listing355
.....target driver overview189
.....target drivers102, 195
self-identifying devices14
semaphores344
slice number
.....for block devices171
soft state structure55, 341
source compatibility4
source files for device drivers62
SPARC processor
.....byte ordering10, 12
.....data alignment9, 11
.....floating point operations11, 12
.....multiply and divide instructions11
.....register windows10
.....structure member alignment10, 11
special files3
sst_getinfo() entry point102
state structure
.....description of55
.....management routines56
store buffers12
STREAMS
.....drivers44
.....interfaces308
string manipulation342
structure padding47
SunDDI/DKI
......interface summary307
......overview3, 170
synchronization of threads344
system call, description of1

T

tagged queueing302
third-party DMA126
thread synchronization344
......condition variables77
......mutex locks75
......mutex_init(9F)76
......per instance mutex95
......readers/writer locks77
threads
......preemption of74
......types of71
timing routines349

U

uio(9S) data structure350
unloading drivers
......getting the module ID228
untagged queuing303
user threads71
utility functions350

V

vectored interrupts107
virtual addresses2
virtual DMA122
virtual memory
......address spaces2
......memory management unit (MMU)2
......overview2
VMEbus
......address spaces20
......machine architecture18