mirror of https://github.com/acidanthera/audk.git
ArmPkg/ProcessorSubClassDxe: Get serial and part number from OemMiscLib
Currently, the serial and part number of a processor are filled with fixed PCDs. However, they may be updated dynamically according to the information being passed from a the pre-UEFI firmware during booting. So, this patch is to support updating these string fields from OemMiscLib if the PCDs are empty. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
45e3842970
commit
b451c69088
|
@ -56,6 +56,8 @@ typedef enum {
|
|||
ChassisTypeType03,
|
||||
ManufacturerType03,
|
||||
SkuNumberType03,
|
||||
ProcessorPartNumType04,
|
||||
ProcessorSerialNumType04,
|
||||
SmbiosHiiStringFieldMax
|
||||
} OEM_MISC_SMBIOS_HII_STRING_FIELD;
|
||||
|
||||
|
|
|
@ -513,9 +513,19 @@ AllocateType4AndSetProcessorInformationStrings (
|
|||
|
||||
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu);
|
||||
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion);
|
||||
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorSerialNumber, SerialNumber);
|
||||
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag);
|
||||
SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorPartNumber, PartNumber);
|
||||
|
||||
if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) {
|
||||
HiiSetString (mHiiHandle, SerialNumber, (CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber), NULL);
|
||||
} else {
|
||||
OemUpdateSmbiosInfo (mHiiHandle, SerialNumber, ProcessorSerialNumType04);
|
||||
}
|
||||
|
||||
if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorPartNumber)) > 0) {
|
||||
HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)FixedPcdGetPtr (PcdProcessorPartNumber), NULL);
|
||||
} else {
|
||||
OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04);
|
||||
}
|
||||
|
||||
// Processor Designation
|
||||
StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;
|
||||
|
|
Loading…
Reference in New Issue