Specifications

Data Structures
1.12 I/O Request Packet (IRP)
Table 1–14 (Cont.) Contents of an I/O Request Packet
Field Name Contents
IRP$L_SEGVBN Virtual block number of the current segment of a virtual I/O transfer.
IOC$IOPOST writes this field after a partial virtual transfer.
IRP$L_DIAGBUF* Address of a diagnostic buffer in system address space. If the I/O request call
specifies a diagnostic buffer and if a diagnostic buffer length is specified in the
DDT, and if the process has diagnostic privilege, EXE$QIO copies the buffer
address into this field.
EXE$QIO allocates a diagnostic buffer in system address space to be filled
by IOC$DIAGBUFILL during I/O processing. During I/O postprocessing, the
special kernel-mode AST routine copies diagnostic data from the system buffer
into the process diagnostic buffer.
IRP$L_SEQNUM* I/O transaction sequence number. If an error is logged for the request, this
field contains the universal error log sequence number.
IRP$L_EXTEND Address of an IRPE linked to this IRP. FDT routines write an extension
address to this field when a device requires more context than the IRP can
accommodate. This field is read by IOC$IOPOST. IRP$V_EXTEND in IRP$W_
STS is set if this extension address is used.
IRP$L_ARB* Address of access rights block (ARB). This block is located in the PCB and
contains the process privilege mask and UIC, which are set up as follows:
ARB$Q_PRIV Quadword containing process privilege mask
SPARE$L Unused longword
ARB$L_UIC Longword containing process UIC
IRP$L_KEYDESC Address of encryption key.
1.13 I/O Request Packet Extension (IRPE)
I/O request packet extensions (IRPEs) hold additional I/O request information
for devices that require more context than the standard IRP can accommodate.
IRP extensions are also used when more than one buffer (region) must be locked
into memory for a direct-I/O operation, or when a transfer requires a buffer that
is larger than 64K. An IRPE provides space for two buffer regions, each with a
32-bit byte count.
FDT routines allocate IRPEs by calling EXE$ALLOCIRP. Driver routines link
the IRPE to the IRP, store the IRPE’s address in IRP$L_EXTEND, and set the
bit field IRP$V_EXTEND in IRP$W_STS to show that an IRPE exists for the
IRP. The FDT routine initializes the contents of the IRPE. Any fields within the
extension not described in Table 1–15 can store driver-dependent information.
If the IRP extension specifies additional buffer regions, the FDT routine must
use those buffer locking routines that perform coroutine calls back to the driver
if the locking procedure fails (EXE$READLOCKR, EXE$WRITELOCKR, and
EXE$MODIFYLOCKR). If an error occurs during the locking procedure, the
driver must unlock all previously locked regions using MMG$UNLOCK and
deallocate the IRPE before returning to the buffer locking routine.
1–49