From 107775734d75073782ef9cad8ca32e7278f6c013 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 21 Dec 2018 10:29:29 +0800 Subject: MdeModulePkg/SmmLockBox: Update to consume SpeculationBarrier 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: Ard Biesheuvel Cc: Jiewen Yao Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Jian J Wang --- MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'MdeModulePkg/Universal/LockBox') diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c index c1c9aa5..a743129 100644 --- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c +++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c @@ -77,10 +77,10 @@ SmmLockBoxSave ( return ; } // - // The AsmLfence() call here is to ensure the above range check for the - // CommBuffer have been completed before calling into SaveLockBox(). + // The SpeculationBarrier() call here is to ensure the above range check for + // the CommBuffer have been completed before calling into SaveLockBox(). // - AsmLfence (); + SpeculationBarrier (); // // Save data @@ -166,10 +166,10 @@ SmmLockBoxUpdate ( return ; } // - // The AsmLfence() call here is to ensure the above range check for the - // CommBuffer have been completed before calling into UpdateLockBox(). + // The SpeculationBarrier() call here is to ensure the above range check for + // the CommBuffer have been completed before calling into UpdateLockBox(). // - AsmLfence (); + SpeculationBarrier (); // // Update data -- cgit v1.1