'\"macro stdmacro
.if n .pH ddi_dki.init @(#)init	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} init D2D "3B2" "DDI" "\&"
.if \nX=1 .ds x} init D2D "3B2" "DDI"
.if \nX=2 .ds x} init D2D "" "\&"
.if \nX=3 .ds x} init "" "" "\&"
.TH \*(x}
.IX "\f4init\fP(D2D)"
.SH "NAME"
\f4init\f1 \- initialize a device
.SH "SYNOPSIS"
.nf
.na
\f4void \f2prefix\f1\f4init();\f1
.ad
.fi
.SH "DESCRIPTION"
\f4init\f1 and \f4start\f1(D2D) routines are used to initialize
drivers and the devices they control.  \f4init\f1 routines are
executed during system initialization, and can be used in drivers that
do not require low level system services in order to be initialized. 
\f4start\f1 routines are executed after low level services are
enabled, such as interrupts and lower level kernel interfaces, but
before file systems are available.  Most drivers can use either an
\f4init\f1 or a \f4start\f1 routine, or they can be used in
combination.  However, an \f4init\f1 routine must be used in any
driver controlling a device required to bring the system up. 
.P
Not all drivers need an \f4init\f1 or a \f4start\f1 routine. 
However, a driver must have either an \f4init\f1 or \f4start\f1 routine if
it needs to allocate any data structures.
.P
\f4init\f1 and \f4start\f1 routines can perform functions such as:
.IP
allocating buffers for private buffering schemes
.IP
mapping a device into virtual address space
.IP
initializing hardware (for example, system generation or resetting the board)
.IP
initializing a serial device in a character driver
.P
Because the \f4init\f1 and \f4start\f1 routines are executed before
there is user context, no functions that require user-context, such as
\f4sleep\f1(D3DK), may be called. 
.SH "SEE ALSO"
.na
\f4start\f1(D2D)
.ad
