From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=jagadeesh.ujja@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 0BD6521195BF6 for ; Tue, 27 Nov 2018 03:26:42 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DD5F5357A; Tue, 27 Nov 2018 03:26:42 -0800 (PST) Received: from usa.arm.com (a75556-lin.blr.arm.com [10.162.2.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D05583F575; Tue, 27 Nov 2018 03:26:40 -0800 (PST) From: Jagadeesh Ujja To: edk2-devel@lists.01.org, liming.gao@intel.com, chao.b.zhang@intel.com, lersek@readhat.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Tue, 27 Nov 2018 16:56:16 +0530 Message-Id: <20181127112626.7854-2-jagadeesh.ujja@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181127112626.7854-1-jagadeesh.ujja@arm.com> References: <20181127112626.7854-1-jagadeesh.ujja@arm.com> MIME-Version: 1.0 Subject: [RFC PATCH v2 01/11] MdeModulePkg/Variable: replace all uses of AsmLfence with MemoryFence 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, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 X-List-Received-Date: Tue, 27 Nov 2018 11:26:43 -0000 Content-Transfer-Encoding: 8bit Replace all uses of AsmLfence with call to MemoryFence to allow variable service code to be platform independent. Change-Id: I578719ab038318bd240ec5471d42552c8b7c75db Signed-off-by: Jagadeesh Ujja Signed-off-by: Thomas Abraham --- .../Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c | 4 ++-- MdeModulePkg/Universal/Variable/RuntimeDxe/LoadFenceSmm.c | 2 +- MdePkg/Library/BaseLib/X86MemoryFence.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c index 27fcab19b6..fabd713c74 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c @@ -419,11 +419,11 @@ SmmFaultTolerantWriteHandler ( ); if (!EFI_ERROR (Status)) { // - // The AsmLfence() call here is to ensure the previous range/content + // The MemoryFence () call here is to ensure the previous range/content // checks for the CommBuffer have been completed before calling into // FtwWrite(). // - AsmLfence (); + MemoryFence (); Status = FtwWrite( &mFtwDevice->FtwInstance, SmmFtwWriteHeader->Lba, diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/LoadFenceSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/LoadFenceSmm.c index 4b0d7e3e95..7c4b01924e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/LoadFenceSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/LoadFenceSmm.c @@ -26,5 +26,5 @@ MemoryLoadFence ( VOID ) { - AsmLfence (); + MemoryFence (); } diff --git a/MdePkg/Library/BaseLib/X86MemoryFence.c b/MdePkg/Library/BaseLib/X86MemoryFence.c index 77e1c5a4dd..3a7928df9b 100644 --- a/MdePkg/Library/BaseLib/X86MemoryFence.c +++ b/MdePkg/Library/BaseLib/X86MemoryFence.c @@ -28,5 +28,5 @@ MemoryFence ( VOID ) { - return; + AsmLfence (); } -- 2.19.1