diff options
author | Hao Wu <hao.a.wu@intel.com> | 2018-12-21 10:29:29 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2018-12-25 09:16:04 +0800 |
commit | 107775734d75073782ef9cad8ca32e7278f6c013 (patch) | |
tree | 9a27415b3d186c9ea6f854fc35bc57802c13b17a | |
parent | 0e8c5d8b3b8dcc58491b6274b8841ff495da9da7 (diff) | |
download | edk2-107775734d75073782ef9cad8ca32e7278f6c013.tar.gz edk2-107775734d75073782ef9cad8ca32e7278f6c013.tar.bz2 edk2-107775734d75073782ef9cad8ca32e7278f6c013.zip |
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>
-rw-r--r-- | MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c index c1c9aa5663..a743129539 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
|