dmi_processor_ex
Synopsis
#include <opendmi/entity/processor-ex.h>
typedef struct dmi_processor_ex {
dmi_handle_t processor_handle;
dmi_entity_t *processor;
dmi_processor_arch_t architecture;
dmi_binary_t data;
} dmi_processor_ex_t;
Description
The dmi_processor_ex_t structure holds a decoded processor additional
information structure (type 44) of SMBIOS, which completes a processor
structure (type 4) with data specific to the architecture of the processor.
Several such structures may refer to the same processor, for example to
describe cores which are not all alike.
The data are kept as the structure carries them. Their format is defined for
each architecture by the architecture workgroups or the vendors;
dmi_processor_aarch64_data_t, dmi_processor_amd64_data and
dmi_processor_rv64_data describe the layouts of some of them.
The structure is returned by dmi_entity_info for the structures of type
DMI_TYPE(processor_ex), and lives as long as the context it has been decoded
in.
Fields
processor_handle-
Handle of the processor structure (type 4) the information is about.
processor-
Processor structure the information is about, whose information is a
dmi_processor_t. Set when linking;nullptrif the handle refers to no processor structure. architecture-
Processor architecture the data are about.
data-
Processor-specific data: a pointer into the structure, and their length in bytes, as the processor-specific block gives it. The pointer is
nullptrif the block holds no data.
Examples
dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t *entity =
dmi_registry_lookup_first(registry, DMI_TYPE(processor_ex), true);
dmi_processor_ex_t *info =
dmi_entity_info(entity, DMI_TYPE(processor_ex));
if ((info != nullptr) && (info->architecture == DMI_PROCESSOR_ARCH_AARCH64) &&
(info->data.length >= sizeof(dmi_processor_aarch64_data_t))) {
const dmi_processor_aarch64_data_t *data =
(const dmi_processor_aarch64_data_t *)info->data.data;
printf("AArch64 data, revision %u.%u, sub-type %u\n",
data->revision.major, data->revision.minor, data->subtype);
}