SCO OpenServer
pci_transbase(D3oddi)
pci_transbase --
remap I/O base address to a bus specific address
Synopsis
#include <sys/pci.h>
int pci_transbase(unsigned long *iobase, struct pci_devinfo *infoptr);
Description
The
pci_transbase( )
function remaps an I/O base address
to a value that can be used on the PCI bus
specified in the busnum member of the
pci_devinfo(D4oddi)
structure.
Arguments
iobase-
I/O base address as read from the
PCI configuration I/O base address registers.
infoptr-
Pointer to a
pci_devinfo(D4oddi)
structure.
Return values
pci_transbase( )
returns 1 if the I/O base is
successfully remapped, 0 otherwise.
Usage
pci_transbase must be called
by all PCI device drivers
that communicate with their devices
using the I/O address map.
This ensures correct operation on architectures
that cannot broadcast all I/O address ranges
to all PCI buses.
If the device driver uses
more than one I/O base address per device.
then pci_transbase must be called
for each I/O base address that is used.
pci_transbase( )
may return the same I/O base
address as input; this is not an error.
Context and synchronization
Initialization
context
Hardware applicability
PCI bus
Version applicability
oddi:
3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
DDI drivers access PCI configuration information
through the resource manager database.
Use the
cm_getval(D3)
function to access information
supported by the parameters documented on the
cm_params(D5)
manual page and function such as
cm_read_devconfig(D3)
and
cm_write_devconfig(D3)
to access other configuration information.
Note that DDI drivers cannot access
all the PCI configuration information
that SCO OpenServer 5 drivers can access.
References
pci(D4oddi)
``PCI'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005