About This Book 1 Header Files Related to Device Drivers 2 Kernel Interfaces, ioctls, and Global Variables That Device Drivers Use 3 Structures Related to Device Drivers 4 Device Driver and Bus Configuration Interfaces
Table of Contents
Audience
New and Changed Features
Chapter 1: Header Files Related to Device Drivers
Chapter 2: Kernel Interfaces, ioctls, and Global Variables That Device Drivers Use
Chapter 3: Structures Related to Device Drivers
Chapter 4: Device Driver and Bus Configuration Interfaces
Organization
Related Documentation
Hardware Documentation
Bus-Specific Device Driver Documentation
Operating System Overview Documentation
Programming Tools Documentation
Network Programming Documentation
System Management Documentation
Porting Documentation
Reference Pages
Reader's Comments
1.1 Conventions for Header Files
1.2 Header Files
buf.h
conf.h
cpu.h
devdriver.h
devdriver_loadable.h
devgetinfo.h
devio.h
disklabel.h
errno.h
fcntl.h
ioctl.h
iotypes.h
kernel.h
lock.h
malloc.h
map.h
mman.h
mode.h
mtio.h
param.h
poll.h
proc.h
sched_prim.h
security.h
select.h
sysconfig.h
systm.h
task.h
thread.h
time.h
types.h
uio.h
user.h
vm.h
vmmac.h
2.1 Conventions
2.1.1 Conventions for Kernel Interfaces
2.1.2 Conventions for ioctl Commands
2.1.3 Conventions for Global Variables
2.2 Kernel Support Interfaces
adjmsg
allocb
assert_wait_mesg
atoi
backq
BADADDR
bcanput
bcmp
bcopy
biodone
blkclr, bzero
brelse
btop
bufcall
BUF_LOCK
BUF_UNLOCK
busphys_to_iohandle
canput
cfgmgr_get_state
cfgmgr_set_status
clear_wait
configure_driver
contig_free
contig_malloc
copyb
copyin
copyinstr
copymsg
copyout
copyoutstr
copystr
copy_to_phys
create_controller_struct
create_device_struct
current_task
current_thread
datamsg
decl_simple_lock_data
DELAY
devsw_add
devsw_del
devsw_get
dma_get_curr_sgentry
dma_get_next_sgentry
dma_get_private
dma_kmap_buffer
dma_map_alloc
dma_map_dealloc
dma_map_load
dma_map_unload
dma_min_boundary
dma_put_curr_sgentry
dma_put_prev_sgentry
dma_put_private
do_config
drvr_register_flush
drvr_register_shutdown
dupb
dupmsg
enableok
esballoc
ffs
flushband
flushq
FREE
freeb
freemsg
fubyte
fuibyte
fuiword
fuword
get_config
get_def_partitionmap
get_info
getnewbuf
getq
gsignal
handler_add
handler_del
handler_disable
handler_enable
htonl, htons
insq
insque, remque
io_copyin
io_copyio
io_copyout
io_zero
iodone
iohandle_to_phys
IS_KSEG_VA, IS_SEG0_VA, IS_SEG1_VA
kernel_isrthread
kernel_thread_w_arg
KSEG_TO_PHYS
linkb
lock_done
lock_init
lock_read
lock_terminate
lock_try_read
lock_try_write
lock_write
major
makedev
MALLOC
mb
minor
minphys
mpsleep
msgdsize
noenable
ntohl, ntohs
OTHERQ
ovbcopy
panic
physio
PHYS_TO_KSEG
pmap_extract
pmap_kernel
pmap_set_modify
printf, uprintf
privileged
psignal
pullupmsg
putbq
putctl
putctl1
putnext
putq
qenable
qreply
qsize
queue_init
RD
READ_BUS_D8, READ_BUS_D16, READ_BUS_D32, READ_BUS_D64
readdisklabel
read_io_port
register_callback
rmalloc
rmfree
rmget
rminit
rmvb
rmvq
round_page
select_dequeue
select_dequeue_all
select_enqueue
select_wakeup
setdisklabel
simple_lock
simple_lock_init
simple_lock_terminate
simple_lock_try
simple_unlock
sleep
spl
strcmp
strcpy
strlen
strlog
strncmp
strncpy
strqget
strqset
subyte
suibyte
suiword
suser
suword
svatophys
swap_lw_bytes, swap_word_bytes, swap_words
testb
thread_block
thread_halt_self
thread_set_timeout
thread_terminate
thread_wakeup
thread_wakeup_one
timeout
trunc_page
uiomove
unbufcall
unconfigure_driver
unix_master
unix_release
unlinkb
unregister_callback
untimeout
vm_map_pageable
vtop
wakeup
WR
WRITE_BUS_D8, WRITE_BUS_D16, WRITE_BUS_D32, WRITE_BUS_D64
writedisklabel
write_io_port
2.3 ioctl Commands
DEVGETGEOM
DEVGETINFO
DEVIOCGET
DIOCGCURPT
DIOCGDEFPT
DIOCGDINFO
DIOCGPART
DIOCSDINFO
DIOCWDINFO
DIOCWLABEL
_IO
_IOR
_IOW
_IOWR
2.4 Global Variables
cpu
hz
lbolt
page_size
3.1 Conventions for Data Structures
3.2 Data Structures
buf
bus
cfg_attr_t
cfg_subsys_attr_t
controller
controller_config
DEVGEOMST
devget
device
device_config
device_info_t
disklabel
driver
dsent
handler_intr_info
ihandler_t
item_list
lock
port
pt_tbl
sel_queue
sg_entry
slock
task
thread
uio
v1_bustype_info_t
v1_device_info_t
v1_devtype_info_t
v1_disk_dev_info_t
v1_tape_dev_info_t
4.1 Conventions for Device Driver and Bus Configuration Interfaces
4.2 Block and Character Device Driver Interfaces
xxcallback
xxcattach, xxdattach
xxclose
xxconfigure
ctrl_unattach
xxdev_unattach
xxdump
xxflush
xxintr
xxioctl
xxmmap
xxopen
xxprobe
xxpsize
xxread
xxreset
xxselect
xxshutdown
xxslave
xxstop
xxstrategy
xxwrite
4.3 Bus Configuration Interfaces
adp_handler_add
adp_handler_del
adp_handler_disable
adp_handler_enable
adp_unattach
bus_search
conn_bus
conn_ctlr
conn_device
ctlr_search
get_bus
get_ctlr
get_ctlr_num
get_device
get_sys_bus
perf_init
xxconfl1, xxconfl2
Figures
2-1 Byte Swapping