pci_bdf_t

Base type that encodes a Bus/Device/Function

Synopsis:

#include <pci/pci.h>

typedef uint32_t                pci_bdf_t;

Description:

The pci_bdf_t data type is a base type that encodes a Bus/Device/Function, which uniquely identifies a PCI device node. The encoding is as follows:

xxxx xxxx xxxx xxxa bbbb bbbb dddd dfff

The ARI (Alternate Routing ID Interpretation) encoding is as follows:

xxxx xxxx xxxx xxxa bbbb bbbb ffff ffff

There's no device field in the ARI encoding; it's implied to be 0.

Note that bit 16 is used to determine whether the BDF encoding should be interpreted as in ARI format (1) or not (0). You can use the PCI_IS_ARI(_bdf_) macro to check this bit.

You can use the following macros to build a BDF:

You can use the following macros to obtain the bus, device, and function numbers from a BDF:

PCI_BDF_NONE indicates a nonexistent or illegal device.

Classification:

QNX Neutrino