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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user