From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com []) by groups.io with SMTP; Sun, 21 Jul 2019 21:52:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2019 21:52:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,293,1559545200"; d="scan'208";a="188527065" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 21 Jul 2019 21:52:56 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming gao , Sean Brogan , Michael Turner Subject: [PATCH 5/5] MdeModulePkg/PiSmmIpl: Use SecurityLockAuditLib for debug Date: Mon, 22 Jul 2019 12:02:04 +0800 Message-Id: <20190722040204.33108-6-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190722040204.33108-1-zhichao.gao@intel.com> References: <20190722040204.33108-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2006 Use SecurityLockAuditLib in PiSmmIpl to output debug message while lock the SMRAM. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao --- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 2 ++ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf | 1 + 2 files changed, 3 insertions(+) diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c index 1cf8c93227..604eb1b98e 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "PiSmmCorePrivateData.h" @@ -780,6 +781,7 @@ SmmIplReadyToLockEventNotify ( // Lock the SMRAM (Note: Locking SMRAM may not be supported on all platforms) // mSmmAccess->Lock (mSmmAccess); + SECURITY_LOCK_REPORT_EVENT ("Lock SMRAM", HARDWARE_LOCK); // // Close protocol and event notification events that do not apply after the diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf index b6b1bbcdac..2240ab3c5f 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf @@ -46,6 +46,7 @@ DxeServicesLib PcdLib ReportStatusCodeLib + SecurityLockAuditLib [Protocols] gEfiSmmBase2ProtocolGuid ## PRODUCES -- 2.21.0.windows.1