dmi_sun_pcie_root_complex

Synopsis

#include <opendmi/entity/sun/pcie-root-complex.h>

typedef struct dmi_sun_pcie_root_complex {
    dmi_handle_t baseboard_handle;
    uint8_t bus_number;
    uint8_t device_number;
    uint8_t function_number;
} dmi_sun_pcie_root_complex_t;

Description

The dmi_sun_pcie_root_complex_t structure holds the decoded Sun PCI Express root complex information structure (type 138), which gives the PCI address of a PCI Express root complex or root port and the board holding it. It is not part of SMBIOS: Sun firmware provides it, and the library decodes it only when the Sun extension module (dmi_sun_module, declared in <opendmi/module/sun.h>) is enabled in the context with dmi_add_extension.

The structure is returned by dmi_entity_info for the structures of type DMI_TYPE(sun_pcie_root_complex), and lives as long as the context it has been decoded in.

Fields

baseboard_handle

Handle of the baseboard information structure (type 2) of the board holding the root complex or root port.

bus_number

PCI bus number of the root complex or root port.

device_number

PCI device number of the root complex or root port, 0 to 31.

function_number

PCI function number of the root complex or root port, 0 to 7.

Examples

dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t   *entity   = dmi_registry_lookup_first(registry,
                               DMI_TYPE(sun_pcie_root_complex), true);
dmi_sun_pcie_root_complex_t *info =
        dmi_entity_info(entity, DMI_TYPE(sun_pcie_root_complex));

if (info != nullptr)
    printf("root complex at %02X:%02X.%u\n", (unsigned)info->bus_number,
           (unsigned)info->device_number, (unsigned)info->function_number);

Standards

Not part of the SMBIOS specification. Defined by Sun firmware, see the Sun PCI-Express Root Complex Information (Type 138) chapter of the reference manual.