Specifications

PCI Bus Support
13.9 Mapping a PCI Physical Address
SS$_BADPARAM Bad input argument. For example, the requested
bus address may not be accessible from the CPU, or the
attribute may be unrecognized.
SS$_UNSUPPORTED Address space with the requested attributes
not available on this platform. For example, the DEC 2000
Model 150 platform does not support EISA memory dense space.
SS$_INSFSPTS Not enough PTEs to satisfy mapping request.
Routine ioc$unmap_io is provided to unmap a previously mapped
space, returning the iohandle and the PTEs to the system.
The callers quadword cell containing the IOHANDLE is
cleared.
The routine prototype is shown below:
int ioc$unmap_io (ADP *adp,
uint64 *iohandle)
IOC$MAP_IO may acquire the MMG spinlock. Thus it must be called
at IPL 8 or below, and the caller cannot be holding any spinlocks
of higher rank than MMG.
An example call to IOC$MAP_IO is shown below. This call maps 64
KB of PCI I/O space in a region that offers byte granularity,
starting at PCI I/O address 0.
int status;
uint64 iohandle;
uint64 pci_physical_address = 0;
status = ioc$map_io (pci_adp,
crb->crb$l_node,
&pci_physical_address,
16*4096,
IOC$K_BUS_IO_BYTE_GRAN,
&iohandle);
13.10 PCI Configuration Space Base Address Register Format
A PCI Configuration space Base Address register can specify a PCI memory space
address or a PCI I/O space address. The two forms of a Base Address register are
as follows:
Memory Format Base Address Register
43210
+----------------------------------+
| Base Address | | | |0|
+----------------------------------+
Bit 3 Prefetchable. Set to 1 if there are no side effects
on reads, the device returns all bytes on reads regardless of
the byte enables, and host bridges can merge processor writes
into this range without causing errors. Bit must be set to
zero otherwise.
Bits 2:1 Type.
00 Locate anywhere in 32 bit address space.
01 Locate below 1 MB.
10 Locate anywhere in 64 bit address space.
11 reserved.
Bit 0 Set to zero to indicate memory format Base Address
register.
I/O Format Base Address Register
13–8