dmi_intel_mei

Synopsis

#include <opendmi/entity/intel/mei.h>

typedef struct dmi_intel_mei {
    uint8_t version;
    size_t device_count;
    dmi_intel_mei_device_t *devices;
    dmi_intel_me_state_t state;
    dmi_intel_me_mode_t mode;
    dmi_intel_me_error_t error_code;
    bool is_init_complete;
    bool is_manufacturing;
    dmi_intel_me_sku_t sku;
} dmi_intel_mei_t;

Description

The dmi_intel_mei_t structure holds the decoded Intel Management Engine interface information: the firmware status registers of the Host Embedded Controller Interfaces (HECI) of the Management Engine, as the firmware of the host has read them at boot.

The state of the Management Engine firmware is told from the first and the third registers of the first interface, which the host talks to the firmware through, and whose layout is the same in all generations of the Management Engine. The rest of the registers are kept as they are, since their layouts differ between generations, e.g. the sixth one tells the state of Intel Boot Guard on the generations which have it.

The structure is told by its version, 1, and by the name of the first interface, MEI1, which every known structure holds, so that the structures vendors give the same types are not taken for it.

The structure is returned by dmi_entity_info for the structures decoded by dmi_intel_mei_spec, of type DMI_TYPE(intel_mei), declared in <opendmi/module/intel.h>, once the Intel extension module (dmi_intel_module) is enabled, which is done for any platform with Intel processors when the context has DMI_CONTEXT_FLAG_AUTO_MODULES. It lives as long as the context it has been decoded in.

The Intel reference code gives the structures type 219, but vendors who give that type to structures of their own place them elsewhere or not at all: Dell places them at type 203, or at type 235 on some platforms, e.g. Precision Tower 3620, and HP servers carry none. Most tables hold a group association (type 14) named $MEI, which is not a reliable way to find the structure: in about half of the tables of the data corpus the group gives handle 0, and in some it refers to other structures.

Fields

version

Version of the structure, 1 in all known data.

device_count

Number of elements of devices. Smaller than the number the structure declares when the data ends before the last interface.

devices

Interfaces, see dmi_intel_mei_device. May be nullptr when device_count is 0.

state

Working state of the firmware, see dmi_intel_me_state.

mode

Operation mode of the firmware, see dmi_intel_me_mode.

error_code

Error code of the firmware, see dmi_intel_me_error.

is_init_complete

Whether the firmware has completed its initialization.

is_manufacturing

Whether the firmware is in the manufacturing mode, in which the platform has not been locked down yet.

sku

SKU of the firmware, see dmi_intel_me_sku.

Examples

dmi_entity_t *entity = dmi_registry_lookup_first(dmi_get_registry(context),
                                                 DMI_TYPE(intel_mei), true);
const dmi_intel_mei_t *info = dmi_entity_info(entity, DMI_TYPE(intel_mei));

if ((info != nullptr) && (info->sku != DMI_INTEL_ME_SKU_UNSPEC))
    printf("ME firmware: %s, %s\n", dmi_intel_me_sku_name(info->sku),
           dmi_intel_me_state_name(info->state));

Standards

Not part of the SMBIOS specification. Defined by the Intel reference code, which gives the structures type 219 by default. The layouts of the firmware status registers are the ones of the Intel Management Engine, as coreboot describes them.