diff options
author | Star Zeng <star.zeng@intel.com> | 2015-10-29 01:10:18 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2015-10-29 01:10:18 +0000 |
commit | 3c394a67756f4c98515c57a3ff83e8d5f139904c (patch) | |
tree | 4d31c339a77f51ba45ee0280f52235e7e40802b1 /MdeModulePkg/Universal/SmbiosMeasurementDxe | |
parent | d26a7a3fa251e1c2e93bdb834207643eabb847de (diff) | |
download | edk2-3c394a67756f4c98515c57a3ff83e8d5f139904c.zip edk2-3c394a67756f4c98515c57a3ff83e8d5f139904c.tar.gz edk2-3c394a67756f4c98515c57a3ff83e8d5f139904c.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg/Universal/SmbiosMeasurementDxe')
-rw-r--r-- | MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c index 2152827..8596381 100644 --- a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c +++ b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c @@ -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
|