![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
OpenVMS Alpha Guide to Upgrading Privileged-Code Applications
A.9 I/O Request Packet Extension (IRPE)This section describes the additions and changes to cells in the I/O Request Packet Extension (IRPE) structure. An IRPE structure can contain additional driver-specific information that needs to be associated with an IRP. It can also be used to manage additional buffers that are locked down for direct I/O. If the IRP$M_EXTEND bit is set in irp$l_sts then the irp$l_extend cell contains a pointer to an associated IRPE structure. Similarly, if the IRPE$M_EXTEND bit is set in the irpe$l_sts cell, then the irpe$l_extend cell contains a pointer to another IRPE. In general, if there is an IRPE cell with the name irpe$X and an IRP cell with the name irp$X , then the cells must be at the same offsets such that the IRP and the IRPE can be used interchangeably in contexts that depend only on these common cells. Currently, a single IRPE structure can be used to keep track of two separate regions of locked down pages. The new IRPE structure can only manage a single region of locked down pages and contains a single fixed-size primary DIOBM structure for that purpose (see Table A-10).
A.10 Process Header (PHD)This section describes the I/O-specific additions to cells in Process Header (PHD) structure (see Table A-11).
A.11 SCSI-2 Diagnose Buffer (S2DGB)For information about S2DGB 64-bit addressing support, see the OpenVMS Alpha Guide to 64-Bit Addressing and VLM Features2.
The VCRP structure is the VMS Communications Request Packet that is used by the OpenVMS LAN driver VMS Communications Interface (VCI). A VCRP is used to transfer data between an upper- and lower-level VCM. The VCRP is designed so that it can be used as an ACB by an upper-level VCM. Therefore, the VCRP has been enhanced such that it can be used either as an ACB or ACB64 structure by an upper-level VCM. This allows upper-level VCMs the flexibility of providing 64-bit AST support at some time in the future without requiring another VCRP change and the forced recompilation of all VCMs (see Table A-12).
Appendix B
|
int acp_std$readblk (IRP *irp, PCB *pcb, UCB *ucb, CCB *ccb) int acp_std$writeblk (IRP *irp, PCB *pcb, UCB *ucb, CCB *ccb) |
These routines obtain the address of the caller's buffer from
irp->irp$l_qio_p1
. These routines have been modified to obtain the full 64-bit buffer
address from
irp->irp$q_qio_p1
and pass it to EXE_STD$READLOCK or EXE_STD$WRITELOCK. Note, however,
that the buffer size remains a longword and is obtained from
irp->irp$l_qio_p2
without checking the upper 32-bits.
B.2 EXE_STD$ALLOC_BUFIO_32, EXE_STD$ALLOC_BUFIO_64
Routines EXE_STD$ALLOC_BUFIO_32 and EXE_STD$ALLOC_BUFIO_64 are new routines that device drivers can use to allocate and initialize simple buffered I/O (BUFIO) packets. The appropriate IRP and BUFIO header cells are initialized but it is up to the caller to copy any data into the packet.
The interfaces for these routines are:
int exe_std$alloc_bufio_32 (IRP *irp, PCB *pcb, void *uva, int pktsiz) int exe_std$alloc_bufio_64 (IRP *irp, PCB *pcb, VOID_PQ uva, int pktsiz) |
Table B-1 summarizes the use of the arguments.
Argument | Type | Access | Description |
---|---|---|---|
irp | IRP * | Input | Pointer to the current IRP. |
pcb | PCB * | Input | Pointer to the process PCB. |
uva | VOID_PQ | Input | User virtual address, EXE_STD$ALLOC_BUFIO_64 |
void * | Input | User virtual address, EXE_STD$ALLOC_BUFIO_32 | |
pktsiz | int | Input | Required size of the packet including the packet header. |
These routines use the EXE_STD$DEBIT_BYTCNT_ALO routine to allocate the packet and charge the process for the required BYTCNT quota. Any failure status from this routine is returned to the caller.
Table B-2 lists all the implicit outputs that are valid on successful return from these routines.
Field | Value on Successful Completion |
---|---|
irp$ps_bufio_pkt | Pointer to the allocated BUFIO packet. |
irp$l_boff | Number of charged bytes and size of allocated packet. |
bufio$ps_pktdata | Pointer to the packet data region in the allocated BUFIO packet. |
bufio$ps_uva32 |
For EXE_STD$ALLOC_BUFIO_32, value of uva.
For EXE_STD$ALLOC_BUFIO_64, BUFIO$K_64. |
bufio$w_size | Size of allocated packet. |
bufio$b_type | DYN$C_BUFIO. |
bufio$pq_uva64 | For EXE_STD$ALLOC_BUFIO_64, value of uva. |
Routine EXE_STD$ALLOC_DIAGBUF is a new routine that allocates either a 32-bit or 64-bit diagnostic buffer packet and initializes the diagnostic buffer packet header. Diagnostic buffer packets use the same layout as BUFIO packets. This routine initializes the appropriate IRP and BUFIO header cells in the diagnostic buffer packet header but it is up to the caller to copy any data into the packet.
The allocation of a 32-bit or 64-bit format diagnostic buffer packet is controlled by a flag bit in the packet size value that is passed to this routine. This allows callers to simply pass in the value of the ddt$w_diagbuf cell directly to this routine.
The interface for this routine is:
int exe_std$alloc_diagbuf (IRP *irp, VOID_PQ *uva, int pktsiz) |
Table B-3 summarizes the use of the arguments.
Argument | Type | Access | Description |
---|---|---|---|
irp | IRP * | Input | Pointer to the current IRP. |
uva | VOID_PQ | Input | User virtual address. |
pktsiz | int | Input | The low-order 15-bits of this parameter specify the required size of the packet including the diagnostic packet header. If bit-16 (DDT$M_DIAGBUF64) is set a 64-bit diagnostic buffer packet is allocated. Otherwise a 32-bit diagnostic buffer packet is allocated. |
This routine uses the EXE_STD$ALLOCBUF routine to allocate the packet. Any failure status from this routine is returned to the caller of EXE_STD$ALLOC_DIAGBUF. Note that the EXE_STD$ALLOCBUF routine may put the process in a resource wait state and there is no additional process quota charge for a diagnostic buffer packet.
Table B-4 lists all the implicit outputs that are valid on successful return from this routine.
Field | Value on Successful Completion |
---|---|
irp$l_diagbuf | Pointer to the allocated diagnostic buffer packet. |
irp$l_sts | Status flag IRP$M_DIAGBUF is set to indicate that the IRP has an associated diagnostic buffer packet. |
bufio$ps_pktdata | Pointer to the packet data region in the allocated diagnostic BUFIO packet. |
bufio$ps_uva32 |
If DDT$M_DIAGBUF64 clear, value of uva.
If DDT$M_DIAGBUF64 set, BUFIO$K_64. |
bufio$w_size | Size of allocated diagnostic buffer packet. |
bufio$b_type | DYN$C_BUFIO |
bufio$pq_uva64 | If DDT$M_DIAGBUF64 set, value of uva. |
Routine EXE_STD$LOCK_ERR_CLEANUP is a new routine. This routine unlocks any previously locked down buffers that are associated with the specified IRP or any IRPEs that are attached to it. Additionally, all the attached IRPEs are deallocated.
This routine is designed to be called in a driver-supplied error callback routine that is called if any error is encountered in the EXE_STD$READLOCK, EXE_STD$WRITELOCK, or EXE_STD$MODIFY_LOCK routines.
The interface for this routine is:
void exe_std$lock_err_cleanup (IRP *irp) |
Table B-5 summarizes the use of the arguments.
Argument | Type | Access | Description |
---|---|---|---|
irp | IRP * | Input | Pointer to the current IRP. |
Table B-6 lists all the implicit inputs and outputs that are used by this routine.
Implicit Inputs from the IRP | |
---|---|
Field | Use |
irp$l_svapte | If non-zero, points to the first PTE for a set of pages that will be unlocked. |
irp$l_bcnt | Used only if irp$l_svapte is non-zero to calculate number of pages that will be unlocked. |
irp$l_boff | Used only if irp$l_svapte is non-zero to calculate number of pages that will be unlocked. |
irp$v_extend | If set, the IRPE pointed to by irp$l_extend will be processed. |
irp$l_extend | Used only if irp$v_extend is set to find the first IRPE. |
Implicit Inputs from Each IRPE | |
Field | Use |
irpe$l_svapte | If non-zero, points to the first PTE for a set of pages that will be unlocked. |
irpe$l_bcnt | Used only if irpe$l_svapte is non-zero to calculate number of pages that will be unlocked. |
irpe$l_boff | Used only if irpe$l_svapte is non-zero to calculate number of pages that will be unlocked. |
irpe$v_extend | If set, the IRPE pointed to by irpe$l_extend will be processed. |
irpe$l_extend | Used only if irpe$v_extend is set to find the next IRPE. |
Implicit Outputs in the IRP | |
Field | Value Written |
irp$l_svapte | Cleared to indicate no locked pages. |
irp$v_extend | Cleared to indicate no attached IRPEs. |
Previous | Next | Contents | Index |