Specifications

Device Driver Entry Points
Start-I/O Routine
Start-I/O Routine
Activates a device to process a requested I/O function.
Specified in
Specify the name of the start-I/O routine in the start argument of the DDTAB
macro. This macro places the address of the routine into DDT$L_START.
Called by
The start-I/O routine is called by IOC$INITIATE and IOC$REQCOM in module
IOSUBNPAG.
Synchronization
A start-I/O routine is placed into execution at fork IPL, holding the associated
fork lock in a multiprocessing environment. It must relinquish control of the
processor in the same context.
For many devices, the start-I/O routine raises IPL to IPL$_POWER to check
that a power failure has not occurred on the device prior to loading the device’s
registers. The start-I/O routine initiates device activity at device IPL, after
acquiring the corresponding device lock in a multiprocessing environment. An
invocation of the WFIKPCH or WFIRLCH macro to wait for a device interrupt
releases this device lock.
Context
Because a start-I/O routine gains control of the processor in the context of a fork
process, it can refer only to those addresses that reside in system (S0) space.
Register usage
A start-I/O routine must preserve the contents of all registers except R0, R1, R2,
and R4. If the start-I/O routine uses the stack, it must restore the stack before
completing the request, waiting for an interrupt, or requesting system resources.
Input
Location Contents
R3 Address of IRP
R5 Address of UCB
UCB$W_BCNT Number of bytes to be transferred, copied from the
low-order word of IRP$L_BCNT
UCB$W_BOFF Byte offset into first page of direct-I/O transfer;
for buffered-I/O transfers, number of bytes to be
charged to the process allocating the buffer
4–17