Specifications

Device Driver Entry Points
Controller Initialization Routine
Controller Initialization Routine
Prepares a controller for operation.
Specified in
Use the DPT_STORE macro to place the address of the controller initialization
routine into CRB$L_INTD+VEC$L_INITIAL.
Called by
The System Generation utility (SYSGEN) calls a driver’s controller initialization
routine when processing a CONNECT command. Also, the operating system calls
this routine if the device, controller, processor, or adapter to which the device is
connected experiences a power failure.
Synchronization
The operating system calls a controller initialization routine at IPL$_POWER.
If it must lower IPL, the controller initialization routine cannot explicitly
do so. Rather, it must fork. Because SYSGEN calls the unit initialization
routine immediately after the controller initialization returns control to it, the
driver’s initialization routines must synchronize their activities. If the controller
initialization routine forks, the unit initialization routine must be prepared to
execute before the controller initialization routine completes.
The portion of the controller initialization that services power failure cannot
acquire any spinlocks. As a result, the routine cannot fork to perform power
failure servicing.
Context
Because a controller initialization routine executes within system context, it can
refer only to those virtual addresses that reside in system (S0) space.
Register usage
A controller initialization routine must preserve the contents of all registers
except R0, R1, and R2.
Input
Location Contents
R4 Address of device’s CSR
R5 Address of IDB associated with the controller
R6 Address of DDB associated with the controller
R8 Address of controller’s CRB
4–8