DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

pci(D4oddi)


pci -- PCI structures

Syntax

   #include <sys/types.h>
   #include <sys/pci.h>
   

Description

The pci_businfo structure is defined as:
   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; };

Structure members

The pci_businfo members are defined as:

numbuses
number of PCI buses in the system

mechanism
configuration space access method supported by the system's PCI chip set. PCI access mechanisms are defined in the PCI specifications listed in ``PCI'' in HDK Technical Reference.

The pci_devinfo members are defined as:


slotnum
the slot number at which the device resides on the PCI bus (not necessarily the physical slot)

funcnum
the function number of the device

busnum
the bus number of the PCI bus to which the device is attached. This value can be remapped by the pci_transbase(D3oddi) function.

PCI configuration space

The figure below depicts the layout of the 64-byte predefined header portion of the 256-byte configuration space that every PCI device supports:

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.

Usage

Hardware applicability

Systems configured with a PCI bus.

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 6, 6mp

SVR5 DDI compatibility

See the pci(D5) manual page for information about how DDI drivers access PCI configuration space.

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.

References

pci(HW) , pci_buspresent(D3oddi), pci_findclass(D3oddi), pci_finddevice(D3oddi), pci_read(D3oddi), pci_search(D3oddi), pci_specialcycle(D3oddi), pci_transbase(D3oddi) pci_write(D3oddi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005