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 <[email protected]> Cc: Jiewen Yao <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <[email protected]> --- 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 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

