Specifications

OpenVMS System Routines Called by OpenVMS AXP Device Drivers
IOC$MAP_IO
IOC$MAP_IO
IOC$MAP_IO maps I/O bus physical address space into an address region
accessible by the processor. The caller of this routine can express the mapping
request in terms of the bus address space without regard to address swizzle
space, dense space, or sparse space.
IOC$MAP_IO is supported on PCI, EISA, TURBOchannel, and Futurebus+
systems. It is not supported on XMI systems.
Description
The routine prototype is as follows:
int ioc$map_io (ADP *adp,
int node,
uint64 *physical_offset,
int num_bytes,
int attributes,
uint64 *iohandle)
Inputs
adp Address of bus ADP. Driver can get this from
IDB$PS_ADP.
node Bus node number of device. Bus specific
interpretation. Available to driver in
CRB$L_NODE (driver must be loaded with /NODE
qualifier).
physical_offset Address of a quadword cell. For EISA, PCI,
and Futurebus, the quadword cell should contain
the starting bus physical address to be mapped. For
Turbochannel, the quadword cell should contain the
physical offset from the Turbochannel slot base
address.
num_bytes Number of bytes to be mapped. Expressed in terms
of the bus/device without regard to the platform
hardware addressing tricks.
attributes Specifies desired attributes of space to be
mapped. From [lib]iocdef. One of the following:
IOC$K_BUS_IO_BYTE_GRAN
Request mapping in a platform address space which
corresponds to bus I/O space and provides byte
granularity access. In general, if you are mapping
device control registers that exist in bus I/O space,
you should specify this attribute. For example,
drivers for PCI devices with registers in PCI I/O
space or EISA devices with EISA I/O port addresses
should request mapping with this attribute.
IOC$K_BUS_MEM_BYTE_GRAN
Request mapping in a platform address space which
corresponds to bus memory space and provides byte
granularity access. In general, if you are mapping
device registers that exist in bus memory space, you
should specify this attribute. For example, drivers
for PCI devices with registers in PCI memory space
should request mapping with this attribute.
IOC$K_BUS_DENSE_SPACE
A–28