diff options
Diffstat (limited to 'MdePkg/Library/BaseLib/AArch64/SpeculationBarrier.S')
-rw-r--r-- | MdePkg/Library/BaseLib/AArch64/SpeculationBarrier.S | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/AArch64/SpeculationBarrier.S b/MdePkg/Library/BaseLib/AArch64/SpeculationBarrier.S new file mode 100644 index 000000000000..96831b3b8256 --- /dev/null +++ b/MdePkg/Library/BaseLib/AArch64/SpeculationBarrier.S @@ -0,0 +1,33 @@ +##------------------------------------------------------------------------------ +# +# SpeculationBarrier() for AArch64 +# +# Copyright (c) 2019, Linaro Ltd. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +##------------------------------------------------------------------------------ + +.text +.p2align 2 + +GCC_ASM_EXPORT(SpeculationBarrier) + + +#/** +# Uses as a barrier to stop speculative execution. +# +# Ensures that no later instruction will execute speculatively, until all prior +# instructions have completed. +# +#**/ +#VOID +#EFIAPI +#SpeculationBarrier ( +# VOID +# ); +# +ASM_PFX(SpeculationBarrier): + dsb sy + isb + ret |