Specifications
Operating System Routines
IOC$REQMAPREG
ADP$L_MRQBL Updated
UCB$L_FR3 R3 of caller
UCB$L_FR4 R4 of caller
UCB$L_FPC 00(SP)
Synchronization
A driver fork process calls IOC$REQMAPREG at fork IPL, holding the
corresponding fork lock in a multiprocessing environment.
Description
A driver fork process calls IOC$REQMAPREG to allocate a contiguous set
of UNIBUS map registers or a set of the first 496 Q22–bus map registers to
service the DMA transfer described by UCB$W_BCNT and UCB$W_BOFF.
IOC$REQMAPREG calls IOC$ALOUBAMAP.
If map registers have been permanently allocated to the controller,
IOC$REQMAPREG returns successfully to its caller without allocating map
registers. Otherwise, it searches the map register descriptor arrays for the
required number of map registers.
IOC$ALOUBAMAP determines the required number of map registers from
the contents of UCB$W_BOFF and UCB$W_BCNT. It allocates one extra map
register; this register is marked invalid when the driver fork process subsequently
calls IOC$LOADUBAMAP, thus preventing a transfer overrun. If an odd number
of map registers is required, IOC$ALOUBAMAP rounds this value up to an even
multiple.
If sufficient map registers are available, IOC$REQMAPREG assigns them to its
caller, records the allocation in the ADP and CRB, and returns successfully to its
caller.
If IOC$REQMAPREG cannot allocate a sufficient number of contiguous map
registers, it saves process context by placing the contents of R3, R4, and the
PC into the UCB fork block and R5 into the standard-map-register wait queue
(ADP$L_MRQBL). It then returns to its caller’s caller.
3–136