Specifications

PCI Bus Support
13.12 Direct Memory Access (DMA) on the PCI Bus
Current AXP platforms define two PCI DMA windows, which can be thought of as
the PCI memory address space assigned to system memory. A PCI DMA window
can be configured to be a direct mapped window or a scatter/gather mapped
window. In a direct mapped window, the PCI memory address is passed directly
to system memory (perhaps with an address offset from a hardware register). In
a scatter/gather mapped window, the PCI memory address undergoes a scatter
/gather map translation. A translated address is eventually passed to system
memory. The PCI DMA windows are set up during system boot and are never
changed.
You must check the platform address map for each platform to see how the DMA
windows are set up on that machine. All platforms with a PCI bus will have at
least one scatter/gather PCI DMA window. Thus, for maximum driver portability,
you should code your driver to use the scatter/gather map for DMA. In OpenVMS
AXP, scatter/gather support (also known as map register support) is accomplished
through the use of generic counted resource management routines IOC$ALLOC_
CRCTX, IOC$ALLOC_CNT_RES, and IOC$LOAD_MAP. For detailed information
about these routines, see Appendix A.
13.13 Configuring a PCI Device and Loading A Driver
To configure a PCI device and load its driver, you can write an IOGEN
Configuration Building Module (ICBM), and set up the SYSMAN utility to
call your autoconfiguration routine. Or, you can use the SYSMAN IO CONNECT
command to manually configure your device and load its driver.
For PCI, manual configuration of a device using the SYSMAN IO CONNECT
command is similar to configuration of devices on other I/O buses. The differences
are in the specification of the /CSR qualifier and the /VECTOR qualifier.
To configure your device, use the followng command to invoke SYSMAN utility:
$ mc sysman
SYSMAN>
Use the IO SHOW BUS command to see what is installed on the PCI. If your
device is not recognized by OpenVMS AXP, it will display as ‘‘Unknown’’. You will
need the TR# and the Node from the IO SHOW BUS display.
SYSMAN> IO SHOW BUS
Enter the IO CONNECT command as follows. (The CONNECT command
qualifiers are explained later.)
SYSMAN> IO CONNECT xxa0 /ADAPTER=a /CSR=0 /VECTOR=v /NODE=n -
/driver=filename
xxa0 is the device name. Specify the device name in the standard OpenVMS
format— a 2 letter device code, a controller letter, and a unit number.
/ADAPTER specifies the ADP that represents the bus to which your device is
connected. Use the TR# from the IO SHOW BUS display that is associated
with your device.
/CSR The /CSR qualifier is required by the driver loading program. The value
specified in the /CSR qualifier is copied to IDB$Q_CSR by the driver loading
program. On some buses, this qualifier is used to tell the driver the physical
address at which the device is located. However, for PCI, the physical address
information is stored in the Configuration Space header of the device, as
13–10