Specifications
Data Structures
1.19 Unit Control Block (UCB)
Table 1–22 (Cont.) Contents of Unit Control Block
Field Name Contents
UCB$L_DUETIM* Due time for I/O completion. Stored as the low-order 32-bit absolute time
(time in seconds since the operating system was booted) at which the device
will time out. IOC$WFIKPCH and IOC$WFIRLCH write this value when
they suspend a driver to wait for an interrupt or timeout.
EXE$TIMEOUT examines this field in each UCB in the I/O database once
per second. If the timeout has occurred and timeouts are enabled for the
device, EXE$TIMEOUT calls the device driver timeout handler.
UCB$L_OPCNT* Count of operations completed on device unit since last bootstrap of the
system. IOC$REQCOM writes this field every time the routine inserts an
IRP into the I/O postprocessing queue.
UCB$L_SVPN* Index to the virtual address of the system PTE that the driver loading
procedure has permanently allocated to the device. The system virtual
address of the page described by this index can be calculated by the following
formula:
(index * 200
16
) + 80000000
16
If a DPT specifies DPT$M_SVP in the flags argument to the DPTAB macro,
the driver-loading procedure allocates a page of nonpaged system memory to
the device. The procedure writes the system PTE’s index into UCB$L_SVPN
when the procedure creates the UCB.
Disk drivers use this field for ECC error correction.
UCB$L_SVAPTE For a direct-I/O transfer, the virtual address of the system PTE for the
first page to be used in the transfer; for a buffered-I/O transfer, the virtual
address of the system buffer used in the transfer.
IOC$INITIATE writes this field from IRP$L_SVAPTE before calling a driver
start-I/O routine. Drivers read this value to compute the starting address of
a transfer.
UCB$W_BOFF For a direct-I/O transfer, the byte offset in the first page of the transfer
buffer; for a buffered-I/O transfer, the number of bytes charged to the
process for the transfer.
IOC$INITIATE copies this field from the IRP. Drivers read the field in
calculating the starting address of a DMA transfer. If only part of a DMA
transfer succeeds, the driver adjusts the value in this field to be the byte
offset in the first page of the data that was not transferred.
UCB$W_BCNT Count of bytes in the I/O transfer. IOC$INITIATE copies this field from the
IRP. Drivers read this field to determine how many bytes to transfer in an
I/O operation.
UCB$B_ERTCNT Error retry count of the current I/O transfer. The driver sets this field to
the maximum retry count each time it begins I/O processing. Before each
retry, the driver decreases the value in this field. During error logging,
IOC$REQCOM copies the value into the error message buffer.
UCB$B_ERTMAX Maximum error retry count allowed for single I/O transfer. The DPT of
some drivers specifies a value for this field. The driver-loading procedure
writes the field when the procedure creates the UCB. During error logging,
IOC$REQCOM copies the value into the error message buffer.
(continued on next page)
1–94