Specifications
Accessing Device Interface Registers
Note
In register access discussions, the term control and status register
(CSR) is sometimes used instead of the generic term interface register.
In this manual, the terms are equivalent.
2.1 Mapping I/O Device Registers
Unlike OpenVMS VAX systems (where the operating system maps device register
space into the processors’ virtual address space) before you access device registers
on OpenVMS AXP systems, you must map the registers into the processor’s
virtual address space. OpenVMS AXP provides the IOC$MAP_IO routine, which
allows a caller to request mapping based on device characteristics without regard
to the platform hardware implementation of I/O space access.
Note
Register mapping is not required on XMI devices on DEC 7000/10000
systems, and IOC$READ_IO and IOC$WRITE_IO are not supported. If
you are porting an OpenVMS VAX XMI device driver to an OpenVMS
AXP system, you must use CRAMs.
Once your device is mapped, you can access it using a CRAM data structure and
associated routines, or the IOC$READ_IO and IOC$WRITE_IO routines.
2.2 Platform Independent I/O Bus Mapping
The platform independent I/O bus mapping routine is called IOC$MAP_IO. This
routine 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 swizzling, dense space,
sparse space. IOC$MAP_IO is supported on PCI, EISA, TURBochannel, and
Futurebus+. It is not supported on XMI.
In additon to IOC$MAP_IO, the following platform independent mapping and
access routines exist:
• IOC$READ_IO
• IOC$WRITE_IO
• IOC$UNMAP_IO
The IOC$MAP_IO routine maps I/O bus physical address space into an address
region accessible by the processor. The IOC$UNMAP_IO routine is provided to
unmap a previously mapped space. IOC$READ_IO and IOC$WRITE_IO are I/O
access routines that provide a platform independent way to read and write I/O
space without the overhead of CRAM allocation and initialization. These routines
require that the I/O space that is to be accessed have been previously mapped by
a call to IOC$MAP_IO. For more information about these routines, see OpenVMS
AXP Device Support: Reference.
2–2










