From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5DE2F21962301 for ; Mon, 24 Dec 2018 17:23:53 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2018 17:23:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,394,1539673200"; d="scan'208";a="113070533" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.9]) by orsmga003.jf.intel.com with ESMTP; 24 Dec 2018 17:23:52 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Michael A Kubacki , Jiewen Yao Date: Tue, 25 Dec 2018 09:23:49 +0800 Message-Id: <20181225012349.7496-1-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 Subject: [PATCH v1] MinPlatformPkg/Test: Update to consume SpeculationBarrier X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2018 01:23:54 -0000 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1417 Since BaseLib API AsmLfence() is a x86 arch specific API and should be avoided using in generic codes, this commit replaces the usage of AsmLfence() with arch-generic API SpeculationBarrier(). Cc: Michael A Kubacki Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu --- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c | 6 +++--- Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointCommunication.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c index dc40dae6d5..2d051bb6bb 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/SmmTestPointCheckLib.c @@ -376,11 +376,11 @@ TestPointSmmReadyToBootSmmPageProtectionHandler ( if (CommData->UefiMemoryMapSize != 0) { // - // The AsmLfence() call here is to ensure the previous range/content checks - // for the CommBuffer (copied in to CommData) have been completed before + // The SpeculationBarrier() call here is to ensure the previous range/content + // checks for the CommBuffer (copied in to CommData) have been completed before // calling into TestPointCheckSmmCommunicationBuffer(). // - AsmLfence (); + SpeculationBarrier (); Result = TRUE; Status = TestPointCheckSmmCommunicationBuffer ( diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointCommunication.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointCommunication.c index b4757da046..d2387f6244 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointCommunication.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointCommunication.c @@ -253,11 +253,11 @@ SmmTestPointSmiHandlerGetDataByOffset ( } // - // The AsmLfence() call here is to ensure the previous range/content checks - // for the CommBuffer have been completed before calling into + // The SpeculationBarrier() call here is to ensure the previous range/content + // checks for the CommBuffer have been completed before calling into // SmiHandlerTestPointCopyData(). // - AsmLfence (); + SpeculationBarrier (); SmiHandlerTestPointCopyData ( Data, DataSize, -- 2.12.0.windows.1