From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com []) by mx.groups.io with SMTP id smtpd.web09.558.1577774671219253761 for ; Mon, 30 Dec 2019 22:44:32 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: jiewen.yao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Dec 2019 22:44:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,378,1571727600"; d="scan'208";a="419160645" Received: from jyao1-mobl2.ccr.corp.intel.com ([10.254.209.225]) by fmsmga005.fm.intel.com with ESMTP; 30 Dec 2019 22:44:30 -0800 From: "Yao, Jiewen" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Dandan Bi , Star Zeng Subject: [PATCH 3/6] MdeModulePkg/Smbios: Done measure Smbios multiple times. Date: Tue, 31 Dec 2019 14:44:09 +0800 Message-Id: <20191231064412.22988-4-jiewen.yao@intel.com> X-Mailer: git-send-email 2.19.2.windows.1 In-Reply-To: <20191231064412.22988-1-jiewen.yao@intel.com> References: <20191231064412.22988-1-jiewen.yao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Hao A Wu Cc: Dandan Bi Cc: Star Zeng Signed-off-by: Jiewen Yao --- .../Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c index 7b5d473146..5ec2aca095 100644 --- a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c +++ b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c @@ -577,8 +577,8 @@ MeasureSmbiosTable ( TableAddress, // HashData TableLength // HashDataLen ); - if (EFI_ERROR (Status)) { - return ; + if (!EFI_ERROR (Status)) { + gBS->CloseEvent (Event) ; } } -- 2.19.2.windows.1