|
|
#include <sys/types.h> #include <sys/pci.h>
struct pci_businfo{ unsigned short numbuses; unsigned short mechanism; };The pci_devinfo structure is defined as: struct pci_devinfo{ unsigned short slotnum; unsigned short funcnum; unsigned short busnum; };
numbuses
mechanism
The pci_devinfo members are defined as:
slotnum
funcnum
busnum
NOTE: This is PCI 2.0 -- needs to be updated for PCI 2.1
31 16 15 0 ------------------------------------------------- | Device ID | Vendor ID | 0x00 ------------------------------------------------- | Status | Command | 0x04 ------------------------------------------------- | Class Code | Rev ID. | 0x08 ------------------------------------------------- | BIST | Hdr_Type | Lat_Timer |Cache_Ln_Sz| 0x0c ------------------------------------------------- | | 0x10 ------------------------------------------------- | | 0x14 ------------------------------------------------- | | 0x18 ------------------------------------------------- | | 0x1c ------------------------------------------------- | | 0x20 ------------------------------------------------- | | 0x24 ------------------------------------------------- | Reserved | 0x28 ------------------------------------------------- | Reserved | 0x2c ------------------------------------------------- | Expansion ROM base address | 0x30 ------------------------------------------------- | Reserved | 0x34 ------------------------------------------------- | Reserved | 0x38 ------------------------------------------------- | Max_Lat | Min_Gnt | Intr Pin. | Intr line | 0x3c -------------------------------------------------
Please refer to PCI Local Bus Specification, Revision 2.0 for details on the configuration header fields.
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 drivers can access.