diff options
author | Hao Wu <hao.a.wu@intel.com> | 2018-12-21 10:22:10 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2018-12-25 09:15:57 +0800 |
commit | 0e8c5d8b3b8dcc58491b6274b8841ff495da9da7 (patch) | |
tree | d2f9bd831cf6b2caf69de0342b3275211319583a | |
parent | d9f1cac51bd354507e880e614d11a1dc160d38a3 (diff) | |
download | edk2-0e8c5d8b3b8dcc58491b6274b8841ff495da9da7.tar.gz edk2-0e8c5d8b3b8dcc58491b6274b8841ff495da9da7.tar.bz2 edk2-0e8c5d8b3b8dcc58491b6274b8841ff495da9da7.zip |
MdeModulePkg/FaultTolerantWrite: 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/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c index 27fcab19b6..481fea3f1f 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
- // checks for the CommBuffer have been completed before calling into
- // FtwWrite().
+ // The SpeculationBarrier() call here is to ensure the previous
+ // range/content checks for the CommBuffer have been completed before
+ // calling into FtwWrite().
//
- AsmLfence ();
+ SpeculationBarrier ();
Status = FtwWrite(
&mFtwDevice->FtwInstance,
SmmFtwWriteHeader->Lba,
|