Reviewed-by: Jian J Wang <[email protected]>
> -----Original Message-----
> From: Wu, Hao A
> Sent: Friday, December 21, 2018 11:11 AM
> To: [email protected]
> Cc: Wu, Hao A <[email protected]>; Ard Biesheuvel
> <[email protected]>; Yao, Jiewen <[email protected]>; Gao,
> Liming <[email protected]>; Wang, Jian J <[email protected]>
> Subject: [PATCH v1 3/5] 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 <[email protected]>
> Cc: Jiewen Yao <[email protected]>
> Cc: Liming Gao <[email protected]>
> Cc: Jian J Wang <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Hao Wu <[email protected]>
> ---
> MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c | 12 ++++++-
> -----
> 1 file 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
> --
> 2.12.0.windows.1
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel