summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/LockBox/SmmLockBox
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2018-12-21 10:29:29 +0800
committerHao Wu <hao.a.wu@intel.com>2018-12-25 09:16:04 +0800
commit107775734d75073782ef9cad8ca32e7278f6c013 (patch)
tree9a27415b3d186c9ea6f854fc35bc57802c13b17a /MdeModulePkg/Universal/LockBox/SmmLockBox
parent0e8c5d8b3b8dcc58491b6274b8841ff495da9da7 (diff)
downloadedk2-107775734d75073782ef9cad8ca32e7278f6c013.zip
edk2-107775734d75073782ef9cad8ca32e7278f6c013.tar.gz
edk2-107775734d75073782ef9cad8ca32e7278f6c013.tar.bz2
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 <ard.biesheuvel@linaro.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/LockBox/SmmLockBox')
-rw-r--r--MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c12
1 files changed, 6 insertions, 6 deletions
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