Content-type: text/html Man page of Intro

Intro

Section: Kernel Functions for Drivers (9F)
Updated: 11 Mar 2008
Index Return to Main Contents
 

NAME

Intro, intro - introduction to DDI/DKI functions  

DESCRIPTION

Section 9F describes the kernel functions available for use by device drivers. See Intro(9E) for an overview of device driver interfaces.

In this section, the information for each driver function is organized under the following headings:

o NAME summarizes the function's purpose.
o SYNOPSIS shows the syntax of the function's entry point in the source code. #include directives are shown for required headers.
o INTERFACE LEVEL describes any architecture dependencies.
o ARGUMENTS describes any arguments required to invoke the function.
o DESCRIPTION describes general information about the function.
o RETURN VALUES describes the return values and messages that can result from invoking the function.
o CONTEXT indicates from which driver context (user, kernel, interrupt, or high-level interrupt) the function can be called.
o A driver function has user context if it was directly invoked because of a user thread. The read(9E) entry point of the driver, invoked by a read(2) system call, has user context.
o A driver function has kernel context if was invoked by some other part of the kernel. In a block device driver, the strategy(9E) entry point may be called by the page daemon to write pages to the device. The page daemon has no relation to the current user thread, so in this case strategy(9E) has kernel context.
o Interrupt context is kernel context, but also has an interrupt level associated with it. Driver interrupt routines have interrupt context.

Note that a mutex acquired in user or kernel context that can also be acquired in interrupt context means that the user or kernel context thread holding that mutex is subject to all the restrictions imposed by interrupt context, for the duration of the ownership of that mutex. Please see the mutex(9F) man page for a more complete discussion of proper mutex handling for drivers.

o High-level interrupt context is a more restricted form of interrupt context. If a driver interrupt priority returned from ddi_intr_get_pri(9F) is greater than the priority returned from ddi_intr_get_hilevel_pri(9F) this indicates the interrupt handler will run in high-level interrupt context. These interrupt routines are only allowed to call ddi_intr_trigger_softint(9F), mutex_enter(9F), and mutex_exit(9F). Furthermore, mutex_enter(9F) and mutex_exit(9F) may only be called on mutexes initialized with the interrupt priority returned by ddi_intr_get_pri(9F).
o SEE ALSO indicates functions that are related by usage and sources, and which can be referred to for further information.
o EXAMPLES shows how the function can be used in driver code.

Every driver MUST include <sys/ddi.h> and <sys/sunddi.h>, in that order, and as the last files the driver includes.  

STREAMS KERNEL FUNCTION SUMMARY

The following table summarizes the STREAMS functions described in this section.

RoutineType

adjmsgDDI/DKI
allocb
allocb_tmpl
backq
bcanput
bcanputnext
bufcall
canput
canputnext
clrbuf
copyb
copymsg
DB_BASE
DB_LIM
DB_REF
DB_TYPE
datamsg
dupb
dupmsg
enableok
esballoc
esbbcall
flushband
flushq
freeb
freemsg
freezestr
getq
IOC_CONVER_FROM
insq
linkb
MBLKHEAD
MBLKIN
MBLKL
MBLKSIZE
MBLKTAIL
mcopyin
mcopymsg
mcopyout
merror
mexchange
mioc2ack
miocack
mexchange
miocpullup
mkiocb
msgdsize
msgpullup
msgsize
mt-streams
noenable
OTHERQ
pullupmsg
put
putbq
putctl
putctl1
putnext
putnextctl
putq
qassociate
qbufcall
qenable
qprocson
qprocsoff
qreply
qsize
qtimeout
qunbufcall
quntimeout
qwait
qwait_sig
qwriter
RD
rmvb
rmvq
SAMESTR
strlog
strqget
strqset
testb
unbufcall
unfreezestr
unlinkb
WR

The following table summarizes the functions not specific to STREAMS.

RoutineType

ASSERTDDI/DKI
anocancel
aphysio
atomic_add
atomic_and
atomic_bits
atomic_cas
atomic_dec
atomic_inc
atomic_ops
atomic_or
atomic_swap
bcmp
bcopy
bioclone
biodone
biofini
bioinit
biomodified
biosize
bioerror
bioreset
biowait
bp_copyin
bp_copyout
bp_mapin
bp_mapout
btop
btopr
bzero
cmn_err
condvar
copyin
copyout
csx_AccessConfigurationRegister
csx_ConvertSize
csx_ConvertSpeed
csx_CS_DDI_Info
csx_DeregisterClient
csx_DupHandle
csx_Error2Text
csx_Event2Text
csx_FreeHandle
csx_Get8
csx_GetFirstClient
csx_GetFirstTuple
csx_GetHandleOffset
csx_GetMappedAddr
csx_GetStatus
csx_GetTupleData
csx_MakeDeviceNode
csx_MapLogSocket
csx_MapMemPage
csx_ModifyConfiguration
csx_ModifyWindow
csx_Parse_CISTPL_BATTERY
csx_Parse_CISTPL_BYTEORDER
csx_Parse_CISTPL_CFTABLE_ENTRY
csx_Parse_CISTPL_CONFIG
csx_Parse_CISTPL_DATE
csx_Parse_CISTPL_DEVICE
csx_Parse_CISTPL_DEVICEGEO
csx_Parse_CISTPL_DEVICEGEO_A
csx_Parse_CISTPL_FORMAT
csx_Parse_CISTPL_FUNCE
csx_Parse_CISTPL_FUNCID
csx_Parse_CISTPL_GEOMETRY
csx_Parse_CISTPL_JEDEC_C
csx_Parse_CISTPL_LINKTARGET
csx_Parse_CISTPL_LONGLINK_A
csx_Parse_CISTPL_LONGLINK_MFC
csx_Parse_CISTPL_MANFID
csx_Parse_CISTPL_ORG
csx_Parse_CISTPL_SPCL
csx_Parse_CISTPL_SWIL
csx_Parse_CISTPL_VERS_1
csx_Parse_CISTPL_VERS_2
csx_ParseTuple
csx_Put8
csx_RegisterClient
csx_ReleaseConfiguration
csx_RepGet8
csx_RepPut8
csx_RequestConfiguration
csx_RequestIO
csx_RequestIRQ
csx_RequestSocketMask
csx_RequestWindow
csx_ResetFunction
csx_SetEventMask
csx_SetHandleOffset
csx_ValidateCIS
cv_broadcast
cv_destroy
cv_init
cv_signal
cv_timedwait
cv_wait
cv_wait_sig
ddi_add_event_handler
ddi_add_intr
ddi_add_softintr
ddi_binding_name
ddi_btop
ddi_btopr
ddi_can_receive_sig
ddi_check_acc_handle
ddi_copyin
ddi_copyout
ddi_create_minor_node
ddi_cred
ddi_dev_is_sid
ddi_dev_nintrs
ddi_dev_nregs
ddi_dev_regsize
ddi_device_copy
ddi_device_zero
ddi_devmap_segmap
ddi_dma_addr_bind_handle
ddi_dma_addr_setup
ddi_dma_alloc_handle
ddi_dma_buf_bind_handle
ddi_dma_buf_setup
ddi_dma_burstsizes
ddi_dma_coff
ddi_dma_curwin
ddi_dma_devalign
ddi_dma_free
ddi_dma_free_handle
ddi_dma_getwin
ddi_dma_get_attr
ddi_dma_htoc
ddi_dma_mem_alloc
ddi_dma_mem_free
ddi_dma_movwin
ddi_dma_nextcookie
ddi_dma_nextseg
ddi_dma_nextwin
ddi_dma_numwin
ddi_dma_segtocookie
ddi_dma_set_sbus64
ddi_dma_setup
ddi_dma_sync
ddi_dma_unbind_handle
ddi_dmae
ddi_dmae_1stparty
ddi_dmae_alloc
ddi_dmae_disable
ddi_dmae_enable
ddi_dmae_getattr
ddi_dmae_getcnt
ddi_dmae_getlim
ddi_dmae_prog
ddi_dmae_release
ddi_dmae_stop
ddi_driver_major
ddi_driver_name
ddi_enter_critical
ddi_exit_critical
ddi_ffs
ddi_fls
ddi_fm_acc_err_clear
ddi_fm_acc_err_get
ddi_fm_ereport_post
ddi_fm_handler_register
ddi_fm_init
ddi_fm_service_impact
ddi_get16
ddi_get32
ddi_get64
ddi_get8
ddi_get_cred
ddi_get_devstate
ddi_get_driver_private
ddi_get_eventcookie
ddi_get_iblock_cookie
ddi_get_iminor
ddi_get_instance
ddi_get_kt_did
ddi_get_lbolt
ddi_get_name
ddi_get_parent
ddi_get_pid
ddi_get_soft_iblock_cookie
ddi_get_soft_state
ddi_getb
ddi_getl
ddi_getll
ddi_getlongprop
ddi_getlongprop_buf
ddi_getprop
ddi_getproplen
ddi_getw
ddi_intr_add_handler
ddi_intr_add_softint
ddi_intr_alloc
ddi_intr_block_disable
ddi_intr_block_enable
ddi_intr_clr_mask
ddi_intr_dup_handler
ddi_intr_disable
ddi_intr_enable
ddi_intr_free
ddi_intr_get_cap
ddi_intr_get_hilevel_pri
ddi_intr_get_navail
ddi_intr_get_nintrs
ddi_intr_get_pending
ddi_intr_get_pri
ddi_intr_get_softint_pri
ddi_intr_get_supported_types
ddi_intr_remove_handler
ddi_intr_remove_softint
ddi_intr_set_cap
ddi_intr_set_mask
ddi_intr_set_pri
ddi_intr_set_softint_pri
ddi_intr_trigger_softint
ddi_io_get16
ddi_io_get32
ddi_io_get8
ddi_io_getb
ddi_io_getl
ddi_io_getw
ddi_io_put16
ddi_io_put32
ddi_io_put8
ddi_io_putb
ddi_io_putl
ddi_io_putw
ddi_io_rep_get16
ddi_io_rep_get32
ddi_io_rep_get8
ddi_io_rep_getb
ddi_io_rep_getl
ddi_io_rep_getw
ddi_io_rep_put16
ddi_io_rep_put32
ddi_io_rep_put8
ddi_io_rep_putb
ddi_io_rep_putl
ddi_io_rep_putw
ddi_iomin
ddi_iopb_alloc
ddi_iopb_free
ddi_log_sysevent
ddi_map_regs
ddi_mapdev
ddi_mapdev_intercept
ddi_mapdev_nointercept
ddi_mapdev_set_device_acc_attr
ddi_mem_alloc
ddi_mem_free
ddi_mem_get16
ddi_mem_get32
ddi_mem_get64
ddi_mem_get8
ddi_mem_getb
ddi_mem_getl
ddi_mem_getll
ddi_mem_getw
ddi_mem_put16
ddi_mem_put32
ddi_mem_put64
ddi_mem_put8
ddi_mem_putb
ddi_mem_putl
ddi_mem_putll
ddi_mem_putw
ddi_mem_rep_get16
ddi_mem_rep_get32
ddi_mem_rep_get64
ddi_mem_rep_get8
ddi_mem_rep_getb
ddi_mem_rep_getl
ddi_mem_rep_getll
ddi_mem_rep_getw
ddi_mem_rep_put16
ddi_mem_rep_put32
ddi_mem_rep_put64
ddi_mem_rep_put8
ddi_mem_rep_putb
ddi_mem_rep_putl
ddi_mem_rep_putll
ddi_mem_rep_putw
ddi_mmap_get_model
ddi_model_convert_from
ddi_modopen
ddi_no_info
ddi_node_name
ddi_peek16
ddi_peek32
ddi_peek64
ddi_peek8
ddi_peekc
ddi_peekd
ddi_peekl
ddi_peeks
ddi_periodic_add
ddi_periodic_delete
ddi_poke16
ddi_poke32
ddi_poke64
ddi_poke8
ddi_pokec
ddi_poked
ddi_pokel
ddi_pokes
ddi_prop_create
ddi_prop_exists
ddi_prop_free
ddi_prop_get_int
ddi_prop_lookup
ddi_prop_lookup_byte_array
ddi_prop_lookup_int_array
ddi_prop_lookup_string
ddi_prop_lookup_string_array
ddi_prop_modify
ddi_prop_op
ddi_prop_remove
ddi_prop_remove_all
ddi_prop_undefine
ddi_prop_update
ddi_prop_update_byte_array
ddi_prop_update_int
ddi_prop_update_int_array
ddi_prop_update_string
ddi_prop_update_string_array
ddi_ptob
ddi_put16
ddi_put32
ddi_put64
ddi_put8
ddi_putb
ddi_putl
ddi_putll
ddi_putw
ddi_regs_map_free
ddi_regs_map_setup
ddi_remove_event_handler
ddi_remove_intr
ddi_remove_minor_node
ddi_remove_softintr
ddi_removing_power
ddi_rep_get16
ddi_rep_get32
ddi_rep_get64
ddi_rep_get8
ddi_rep_getb
ddi_rep_getl
ddi_rep_getll
ddi_rep_getw
ddi_rep_put16
ddi_rep_put32
ddi_rep_put64
ddi_rep_put8
ddi_rep_putb
ddi_rep_putl
ddi_rep_putll
ddi_rep_putw
ddi_report_dev
ddi_root_node
ddi_segmap
ddi_segmap_setup
ddi_set_driver_private
ddi_slaveonly
ddi_soft_state
ddi_soft_state_fini
ddi_soft_state_free
ddi_soft_state_init
ddi_soft_state_zalloc
ddi_strlol
ddi_strloul
ddi_trigger_softintr
ddi_umem_alloc
ddi_umem_free
ddi_umem_iosetup
ddi_umem_lock
ddi_unmap_regs
delay
devmap_default_access
devmap_devmem_setup
devmap_do_ctxmgt
devmap_load
devmap_set_ctx_timeout
devmap_setup
devmap_umem_setup
devmap_unload
disksort
dlbindack
drv_getparm
drv_hztousec
drv_priv
drv_usectohz
drv_usecwait
free_pktiopb
freerbuf
get_pktiopb
geterror
gethrtime
getmajor
getminor
getrbuf
gld
hat_getkpfnum
id32_alloc
inb
inl
inw
kiconv
kiconv_close
kiconv_open
kiconvstr
kmem_alloc
kmem_cache_create
kmem_free
kmem_zalloc
kstat_create
kstat_delete
kstat_install
kstat_named_init
kstat_queue
kstat_runq_back_to_waitq
kstat_runq_enter
kstat_runq_exit
kstat_waitq_enter
kstat_waitq_exit
kstat_waitq_to_runq
ldi_add_event_handler
ldi_aread
ldi_devmap
ldi_dump
ldi_ev_finalize
ldi_ev_get_cookie
ldi_ev_get_type
ldi_ev_notify
ldi_ev_register_callbacks
ldi_ev_remove_callbacks
ldi_get_dev
ldi_get_eventcookie
ldi_get_size
ldi_ident_from_dev
ldi_ioctl
ldi_open_by_dev
ldi_poll
ldi_prop_exists
ldi_prop_get_int
ldi_prop_get_lookup_int_array
ldi_putmsg
ldi_read
ldi_remove_event_handler
ldi_strategy
makecom_g0
makecom_g0_s
makecom_g1
makecom_g5
makedevice
max
max
membar_ops
memchr
minphys
mod_info
mod_install
mod_remove
mutex_destroy
mutex_enter
mutex_exit
mutex_init
mutex_owned
mutex_tryenter
nochpoll
nodev
nulldev
numtos
nvlist_add_boolean
nvlist_alloc
nvlist_lookup_boolean
nvlist_lookup_nvpair
nvlist_next_nvpair
nvlist_remove
nvlist_value_byte
outb
outl
outw
pci_config_get16
pci_config_get32
pci_config_get64
pci_config_get8
pci_config_getb
pci_config_getl
pci_config_getw
pci_config_put16
pci_config_put32
pci_config_put64
pci_config_put8
pci_config_putb
pci_config_putl
pci_config_putw
pci_config_setup
pci_config_teardown
pci_ereport_setup
pci_report_pmcap
pci_save_config_regs
physio
pm_busy_component
pm_power_has_changed
pm_raise_power
pm_trans_check
pollwakeup
pci_config_teardown
pci_config_teardown
priv_getbyname
priv_policy
proc_signal
proc_unref
ptob
repinsb
repinsd
repinsw
repoutsb
repoutsd
repoutsw
rmalloc
rmalloc_wait
rmallocmap
rmallocmap_wait
rmfree
rmfreemap
rw_destroy
rw_downgrade
rw_enter
rw_exit
rw_init
rw_read_locked
rw_tryenter
rw_tryupgrade
scsi_abort
scsi_alloc_consistent_buf
scsi_cname
scsi_destroy_pkt
scsi_dmafree
scsi_dmaget
scsi_dname
scsi_errmsg
scsi_ext_sense_fields
scsi_find_sense_descr
scsi_free_consistent_buf
scsi_get_device_type_scsi_options
scsi_get_device_type_string
scsi_hba_attach
scsi_hba_attach_setup
scsi_hba_detach
scsi_hba_fini
scsi_hba_init
scsi_hba_lookup_capstr
scsi_hba_pkt_alloc
scsi_hba_pkt_free
scsi_hba_probe
scsi_hba_tran_alloc
scsi_hba_tran_free
scsi_ifgetcap
scsi_ifsetcap
scsi_init_pkt
scsi_log
scsi_mname
scsi_pktalloc
scsi_pktfree
scsi_poll
scsi_probe
scsi_resalloc
scsi_reset
scsi_reset_notify
scsi_resfree
scsi_rname
scsi_sense_key
scsi_setup_cdb
scsi_slave
scsi_sname
scsi_sync_pkt
scsi_transport
scsi_unprobe
scsi_unslave
scsi_validate_sense
scsi_vu_errmsg
sema_destroy
sema_init
sema_p
sema_p_sig
sema_tryp
sema_v
sprintf
stoi
strchr
strcmp
strcpy
strlen
strncmp
strncpy
STRUCT_DECL
swab
taskq
timeout
u8_strcmp
u8_textprep_str
u8_validate
uconv_u16tou32
uiomove
untimeout
ureadc
usb_alloc_request
usb_client_attach
usb_clr_feature
usb_create_pm_components
usb_get_addr
usb_get_alt_if
usb_get_cfg
usb_get_current_frame_number
usb_get_dev_data
usb_get_max_pkts_per_ioc_request
usb_get_status
usb_get_string_desc
usb_handle_remote_wakeup
usb_lookup_ep_data
usb_parse_data
usb_pipe_bulk_xfer
usb_pipe_close
usb_pipe_ctrl_xfer
usb_pipe_drain_reqs
usb_pipe_get_max_bulk_transfer_size
usb_pipe_get_state
usb_pipe_intr_xfer
usb_pipe_isoc_xfer
usb_pipe_open
usb_pipe_reset
usb_pipe_set_private
usb_register_hotplug_cbs
usb_reset_device
uwritec
va_arg
va_end
va_start
vcmn_err
vsprintf

 

SEE ALSO

Intro(9E), mutex(9F)


 

Index

NAME
DESCRIPTION
STREAMS KERNEL FUNCTION SUMMARY
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:39:46 GMT, October 02, 2010