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>
);\r
if (!EFI_ERROR (Status)) {\r
//\r
- // The AsmLfence() call here is to ensure the previous range/content\r
- // checks for the CommBuffer have been completed before calling into\r
- // FtwWrite().\r
+ // The SpeculationBarrier() call here is to ensure the previous\r
+ // range/content checks for the CommBuffer have been completed before\r
+ // calling into FtwWrite().\r
//\r
- AsmLfence ();\r
+ SpeculationBarrier ();\r
Status = FtwWrite(\r
&mFtwDevice->FtwInstance,\r
SmmFtwWriteHeader->Lba,\r