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>
return ;\r
}\r
//\r
- // The AsmLfence() call here is to ensure the above range check for the\r
- // CommBuffer have been completed before calling into SaveLockBox().\r
+ // The SpeculationBarrier() call here is to ensure the above range check for\r
+ // the CommBuffer have been completed before calling into SaveLockBox().\r
//\r
- AsmLfence ();\r
+ SpeculationBarrier ();\r
\r
//\r
// Save data\r
return ;\r
}\r
//\r
- // The AsmLfence() call here is to ensure the above range check for the\r
- // CommBuffer have been completed before calling into UpdateLockBox().\r
+ // The SpeculationBarrier() call here is to ensure the above range check for\r
+ // the CommBuffer have been completed before calling into UpdateLockBox().\r
//\r
- AsmLfence ();\r
+ SpeculationBarrier ();\r
\r
//\r
// Update data\r