mirror of https://github.com/acidanthera/audk.git
MdeModulePkg SmbiosMeasurementDxe: Use SMBIOS table and GUID correctly
1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table. 2. Use correct VendorGuid and VendorTable to measure. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18691 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d26a7a3fa2
commit
3c394a6775
|
@ -478,6 +478,8 @@ MeasureSmbiosTable (
|
|||
DEBUG ((EFI_D_INFO, " TableAddress - 0x%016lx\n", Smbios3Table->TableAddress));
|
||||
}
|
||||
}
|
||||
|
||||
if (Smbios3Table == NULL) {
|
||||
Status = EfiGetSystemConfigurationTable (
|
||||
&gEfiSmbiosTableGuid,
|
||||
(VOID **) &SmbiosTable
|
||||
|
@ -485,10 +487,10 @@ MeasureSmbiosTable (
|
|||
if (!EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_INFO, "SmbiosTable:\n"));
|
||||
DEBUG ((EFI_D_INFO, " AnchorString - '%c%c%c%c'\n",
|
||||
Smbios3Table->AnchorString[0],
|
||||
Smbios3Table->AnchorString[1],
|
||||
Smbios3Table->AnchorString[2],
|
||||
Smbios3Table->AnchorString[3]
|
||||
SmbiosTable->AnchorString[0],
|
||||
SmbiosTable->AnchorString[1],
|
||||
SmbiosTable->AnchorString[2],
|
||||
SmbiosTable->AnchorString[3]
|
||||
));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointStructureChecksum - 0x%02x\n", SmbiosTable->EntryPointStructureChecksum));
|
||||
DEBUG ((EFI_D_INFO, " EntryPointLength - 0x%02x\n", SmbiosTable->EntryPointLength));
|
||||
|
@ -516,6 +518,7 @@ MeasureSmbiosTable (
|
|||
DEBUG ((EFI_D_INFO, " NumberOfSmbiosStructures - 0x%04x\n", SmbiosTable->NumberOfSmbiosStructures));
|
||||
DEBUG ((EFI_D_INFO, " SmbiosBcdRevision - 0x%02x\n", SmbiosTable->SmbiosBcdRevision));
|
||||
}
|
||||
}
|
||||
|
||||
if (Smbios3Table != NULL) {
|
||||
SmbiosTableAddress = (VOID *)(UINTN)Smbios3Table->TableAddress;
|
||||
|
@ -542,8 +545,13 @@ MeasureSmbiosTable (
|
|||
InternalDumpHex (TableAddress, TableLength);
|
||||
|
||||
HandoffTables.NumberOfTables = 1;
|
||||
HandoffTables.TableEntry[0].VendorGuid = gEfiSmbiosTableGuid;
|
||||
HandoffTables.TableEntry[0].VendorTable = SmbiosTable;
|
||||
if (Smbios3Table != NULL) {
|
||||
CopyGuid (&(HandoffTables.TableEntry[0].VendorGuid), &gEfiSmbios3TableGuid);
|
||||
HandoffTables.TableEntry[0].VendorTable = Smbios3Table;
|
||||
} else {
|
||||
CopyGuid (&(HandoffTables.TableEntry[0].VendorGuid), &gEfiSmbiosTableGuid);
|
||||
HandoffTables.TableEntry[0].VendorTable = SmbiosTable;
|
||||
}
|
||||
Status = TpmMeasureAndLogData (
|
||||
1, // PCRIndex
|
||||
EV_EFI_HANDOFF_TABLES, // EventType
|
||||
|
|
Loading…
Reference in New Issue