]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Smbios: Done measure Smbios multiple times.
authorJiewen Yao <jiewen.yao@intel.com>
Tue, 31 Dec 2019 01:02:52 +0000 (09:02 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 6 Jan 2020 06:23:19 +0000 (06:23 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2439

In current implementation, the SMBIOS table is measured multiple
time in every readytoboot event.

This causes Smbios Table record appears multiple time in the TCG event log
and confuses people.

This issue makes it hard to implement 800-155 reference measurement.

This patch closes the event to make sure Smbios is measured only once.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c

index 7b5d4731466daa682dff4f97146027f93ab70719..5ec2aca0953ff05c205d684d8425c68a35433bd5 100644 (file)
@@ -577,8 +577,8 @@ MeasureSmbiosTable (
                TableAddress,            // HashData\r
                TableLength              // HashDataLen\r
                );\r
-    if (EFI_ERROR (Status)) {\r
-      return ;\r
+    if (!EFI_ERROR (Status)) {\r
+      gBS->CloseEvent (Event) ;\r
     }\r
   }\r
 \r