Specifications

System Macros Invoked by Drivers
SPI$ALLOCATE_COMMAND_BUFFER
SPI$ALLOCATE_COMMAND_BUFFER
Allocates a port command buffer for a SCSI command descriptor block.
Format
SPI$ALLOCATE_COMMAND_BUFFER
Description
The SPI$ALLOCATE_COMMAND_BUFFER macro allocates a port command
buffer for a SCSI command descriptor block.
Typically a SCSI class driver requests two additional longwords when specifying
the size of the requested buffer, the first for the SCSI status byte and the second
for the length of the SCSI command. The port command buffer allows the SCSI
port driver to access both the SCSI command descriptor block and the SCSI
status byte during the SCSI COMMAND and STATUS phases.
Inputs to the SPI$ALLOCATE_COMMAND_BUFFER macro include the
following:
Location Contents
R1 Size of requested buffer. This value should include
the size of the SCSI command, plus 4 bytes reserved
for the SCSI status byte and 4 bytes in which
the SCSI class driver places the size of the SCSI
command.
R4 Address of the SPDT.
R5 Address of the SCDRP.
SCDRP$L_CDT Address of the SCDT.
SCDRP$W_CMD_
MAPREG
Page number of the first port DMA buffer page
allocated for the port command buffer.
SCDRP$W_CMD_
NUMREG
Number of port DMA buffer pages allocated for the
port DMA buffer.
The port driver returns the following values to the class driver, preserving the
contents of R3, R4, and R5:
Location Contents
R0 SS$_NORMAL
R1 Size of port command buffer
R2 Address of port command buffer
2–69