mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
DynamicTablesPkg: Add SMBIOS Type 4 operating information
Extend the processor hierarchy CM object with the SMBIOS Type 4 Voltage, External Clock, Max Speed, Current Speed, and Status fields. Update the CM object parser and Type 4 generator to populate these fields from the physical processor package. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
This commit is contained in:
parent
44bd51118b
commit
73769f5ea6
3 changed files with 39 additions and 22 deletions
|
|
@ -502,62 +502,72 @@ typedef struct CmArchCommonLpiInfo {
|
|||
*/
|
||||
typedef struct CmArchCommonProcHierarchyInfo {
|
||||
/// A unique token used to identify this object
|
||||
CM_OBJECT_TOKEN Token;
|
||||
CM_OBJECT_TOKEN Token;
|
||||
/// Processor structure flags (ACPI 6.3 - January 2019, PPTT, Table 5-155)
|
||||
UINT32 Flags;
|
||||
UINT32 Flags;
|
||||
/// Token for the parent CM_ARCH_COMMON_PROC_HIERARCHY_INFO object in the processor
|
||||
/// topology. A value of CM_NULL_TOKEN means this node has no parent.
|
||||
CM_OBJECT_TOKEN ParentToken;
|
||||
CM_OBJECT_TOKEN ParentToken;
|
||||
/// Token of the associated object which has the corresponding ACPI Processor
|
||||
/// ID, e.g. for Arm systems this is a reference to CM_ARM_GICC_INFO object.
|
||||
/// A value of CM_NULL_TOKEN means this node represents a group of associated
|
||||
/// processors and it does not have an associated CPU interface.
|
||||
CM_OBJECT_TOKEN AcpiIdObjectToken;
|
||||
CM_OBJECT_TOKEN AcpiIdObjectToken;
|
||||
/// Number of resources private to this Node
|
||||
UINT32 NoOfPrivateResources;
|
||||
UINT32 NoOfPrivateResources;
|
||||
/// Token of the array which contains references to the resources private to
|
||||
/// this CM_ARCH_COMMON_PROC_HIERARCHY_INFO instance. This field is ignored if
|
||||
/// the NoOfPrivateResources is 0, in which case it is recommended to set
|
||||
/// this field to CM_NULL_TOKEN.
|
||||
CM_OBJECT_TOKEN PrivateResourcesArrayToken;
|
||||
CM_OBJECT_TOKEN PrivateResourcesArrayToken;
|
||||
/// Optional field: Reference Token for the Lpi state of this processor.
|
||||
/// Token identifying a CM_ARCH_COMMON_OBJ_REF structure, itself referencing
|
||||
/// CM_ARCH_COMMON_LPI_INFO objects.
|
||||
CM_OBJECT_TOKEN LpiToken;
|
||||
CM_OBJECT_TOKEN LpiToken;
|
||||
/// Set to TRUE if UID should override index for name and _UID
|
||||
/// for processor container nodes and name of processors.
|
||||
/// This should be consistently set for containers or processors to avoid
|
||||
/// duplicate values
|
||||
BOOLEAN OverrideNameUidEnabled;
|
||||
BOOLEAN OverrideNameUidEnabled;
|
||||
/// If OverrideNameUidEnabled is TRUE then this value will be used for name of
|
||||
/// processors and processor containers.
|
||||
UINT16 OverrideName;
|
||||
UINT16 OverrideName;
|
||||
/// If OverrideNameUidEnabled is TRUE then this value will be used for
|
||||
/// the UID of processor containers.
|
||||
UINT32 OverrideUid;
|
||||
UINT32 OverrideUid;
|
||||
/// SMBIOS: Processor ID. See SMBIOS "Processor ID field format" for format details.
|
||||
UINT64 ProcessorId;
|
||||
UINT64 ProcessorId;
|
||||
/// SMBIOS: Designation of this CM_ARCH_COMMON_PROC_HIERARCHY_INFO instance.
|
||||
/// This string (and all that follow) are intended only for instances with
|
||||
/// EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL set, ie describing physical sockets.
|
||||
CHAR8 SocketDesignation[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 SocketDesignation[SMBIOS_MAX_STRING_SIZE];
|
||||
/// SMBIOS: String stating processor manufacturer.
|
||||
CHAR8 ProcessorManufacturer[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 ProcessorManufacturer[SMBIOS_MAX_STRING_SIZE];
|
||||
/// SMBIOS: String stating processor version / device name.
|
||||
CHAR8 ProcessorVersion[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 ProcessorVersion[SMBIOS_MAX_STRING_SIZE];
|
||||
/// SMBIOS: String stating processor serial number.
|
||||
CHAR8 SerialNumber[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 SerialNumber[SMBIOS_MAX_STRING_SIZE];
|
||||
/// SMBIOS: String stating processor asset tag.
|
||||
CHAR8 AssetTag[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 AssetTag[SMBIOS_MAX_STRING_SIZE];
|
||||
/// SMBIOS: String stating processor part number.
|
||||
CHAR8 PartNumber[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 PartNumber[SMBIOS_MAX_STRING_SIZE];
|
||||
/// SMBIOS: String stating processor socket type.
|
||||
CHAR8 SocketType[SMBIOS_MAX_STRING_SIZE];
|
||||
CHAR8 SocketType[SMBIOS_MAX_STRING_SIZE];
|
||||
|
||||
/** Optional field: Reference Token for _STA info of this processor.
|
||||
i.e. a token referencing a CM_ARCH_COMMON_STA_INFO object.
|
||||
*/
|
||||
CM_OBJECT_TOKEN StaToken;
|
||||
CM_OBJECT_TOKEN StaToken;
|
||||
/// SMBIOS: Processor voltage information.
|
||||
PROCESSOR_VOLTAGE Voltage;
|
||||
/// SMBIOS: External clock frequency in MHz.
|
||||
UINT16 ExternalClock;
|
||||
/// SMBIOS: Maximum processor speed supported by the system, in MHz.
|
||||
UINT16 MaxSpeed;
|
||||
/// SMBIOS: Processor speed at system boot, in MHz.
|
||||
UINT16 CurrentSpeed;
|
||||
/// SMBIOS: Processor status.
|
||||
UINT8 Status;
|
||||
} CM_ARCH_COMMON_PROC_HIERARCHY_INFO;
|
||||
|
||||
/** A structure that describes the Cache Type Structure (Type 1) in PPTT
|
||||
|
|
|
|||
|
|
@ -358,6 +358,11 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonProcHierarchyInfoParser[] = {
|
|||
{ "PartNumber", SMBIOS_MAX_STRING_SIZE, "%a", PrintString },
|
||||
{ "SocketType", SMBIOS_MAX_STRING_SIZE, "%a", PrintString },
|
||||
{ "StaToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "Voltage", 1, "0x%x", NULL },
|
||||
{ "ExternalClock", 2, "0x%x", NULL },
|
||||
{ "MaxSpeed", 2, "0x%x", NULL },
|
||||
{ "CurrentSpeed", 2, "0x%x", NULL },
|
||||
{ "Status", 1, "0x%x", NULL },
|
||||
};
|
||||
|
||||
/** A parser for EArchCommonObjCacheInfo.
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ BuildSmbiosType4TableEx (
|
|||
UINTN ObjIndex;
|
||||
UINTN CpuIndex;
|
||||
UINTN CpuIndex2;
|
||||
PROCESSOR_STATUS_DATA *StatusData;
|
||||
PROCESSOR_CHARACTERISTIC_FLAGS *CharacteristicFlags;
|
||||
CM_OBJECT_TOKEN *CmObjectList;
|
||||
|
||||
|
|
@ -495,8 +494,11 @@ BuildSmbiosType4TableEx (
|
|||
DEBUG ((DEBUG_ERROR, "SmbiosType4Generator needs extending for your CPU\n"));
|
||||
#endif
|
||||
|
||||
StatusData = (PROCESSOR_STATUS_DATA *)&SmbiosRecord->Status;
|
||||
StatusData->Bits.SocketPopulated = 1;
|
||||
SmbiosRecord->Voltage = ProcHierarchyNodeList[Index].Voltage;
|
||||
SmbiosRecord->ExternalClock = ProcHierarchyNodeList[Index].ExternalClock;
|
||||
SmbiosRecord->MaxSpeed = ProcHierarchyNodeList[Index].MaxSpeed;
|
||||
SmbiosRecord->CurrentSpeed = ProcHierarchyNodeList[Index].CurrentSpeed;
|
||||
SmbiosRecord->Status = ProcHierarchyNodeList[Index].Status;
|
||||
|
||||
CharacteristicFlags = (PROCESSOR_CHARACTERISTIC_FLAGS *)&SmbiosRecord->ProcessorCharacteristics;
|
||||
#if defined (MDE_CPU_AARCH64)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue