INtime SDK Help
PciGetConfigRegister, PcieGetConfigRegister
INtime SDK v7 > About INtime > Other system libraries > PCI Library > PciGetConfigRegister, PcieGetConfigRegister

Reads a value from a given PCI configuration register. The register address is computed from the wBusNum, wDeviceNum, and wfunction fields of the PCIDEV structure, and the byOffset/wOffset parameter. The register size is determined by the bySize parameter.

The PciGetConfigRegister call uses the PCI 2.2 method for accessing the configuration space reigster. The PciegetConfigRegister call uses the PCIe 1.1 method for accessing the registers.

DWORD PciGetConfigRegister(
    PCIDEV *pPciDevice, 
    BYTE byOffset, 
    BYTE bySize

DWORD PcieGetConfigRegister(
    PCIDEV *pPciDevice, 
    WORD wOffset, 
    BYTE bySize


A pointer to a PCIDEV structure, initialized as described above.
byOffset, wOffset
A byte offset to the desired register in the given PCI device header
A value of T_BYTE, T_WORD or T_DWORD sets the word size to be read.

Return Values

The value of the register read. The number of valid bits is determined by the value of the bySize parameter.

If the PciGetCOnfigRegister call is not supported on a system, this call will return 0xffffffff. See Remarks section.

Note: if the PCI Express access method is not available, PcieGetConfigRegister will always return 0xffffffff. See PciGetMemoryInfo.


The PCI 2.2. specification defines a method of accessing the configuration space using a pair of I/O registers. The configuration header for each device extends for up to 256 bytes in this space per device function. The PCI Express 1.1 specification defines a method of accessing the configuration space by mapping the space to physical memory. Each device header extends for up to 4096 bytes per device function. The first 256 bytes are common to both methods.

Note that the extended PCI Express calls are only available in the ACPI MCFG record is presented to the operating system by the system firmware.


Versions Defined in Include Link to
INtime 3.0 intime/rt/include/pcibus.h pcibus.h pcibus.lib
See Also