Specifications

TURBOchannel Bus Support
12.2 TURBOchannel on DEC 3000 Model 500
Figure 12–9 TURBOchannel DMA Address
ZK6720AGE
discarded SG map index byte in page
33 028 27 13 12
029 13 12
byte in pageppn
Turbochannel DMA address
Scatter/Gather Map
SG entry
v f p ppn
DMA address sent to memory system
For virtual DMA, the programmer sets up the Scatter/Gather map to properly
map the DMA buffer in system memory. The DMA buffer need not be physically
contiguous in system memory. The TURBOchannel DMA addresses emitted
by the TURBOchannel option are intercepted by the Scatter/Gather map and
translated as shown above.
A "SG Enable" bit must also be set in the IOSLOT register. The following sections
explain how to allocate and initialize Scatter/Gather map entries.
12.2.3.6 Scatter/Gather Map Management
The Scatter/Gather map is an example of a counted resource. Counted resource
management is accomplished using a Counted Resource Context Block (CRAB),
which is pointed to by the ADP$L_CRAB field in the TURBOchannel ADP. The
CRAB contains a count of the number of Scatter/Gather entries, the allocation
granularity, and an allocation array, which keeps track of the allocated entries.
12.2.3.7 Allocating Scatter/Gather Map Entries
Allocating Scatter/Gather entries for a DMA operation involves two routines.
The programmer first must allocate a Counted Resource Context Block
(CRCTX), which is used to describe the request for a counted resource. A call
to IOC$ALLOC_CRCTX is shown below:
status = ioc$alloc_crctx (crab_address, !Address of CRAB
crctx_ref); !Address of longword cell to
!receive address
!of CRCTX
12–10