aboutsummaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2020-06-03 18:44:51 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2020-06-03 18:44:51 +0000
commit4a14dfcc1110b35118d5be8054fecf59ffb83032 (patch)
tree8bf1574ccba91c926acbe0a05d32482ba8825e26 /MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm
parent0499b37cea9ca98acfe36368e521ad36b7783f2d (diff)
downloadsrc-vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9.tar.gz
src-vendor/edk2/ca407c7246bf405da6d9b1b9d93e5e7f17b4b1f9.zip
As with the previous import, only the MdePkg subdirectory has been brought in. The line-endings were also converted using: % find . -type f | xargs -n 1 sed -I.BAK -e `printf "s/\r//g"` % find . -name \*.BAK | xargs rm
Diffstat (limited to 'MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm')
-rw-r--r--MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm33
1 files changed, 33 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm b/MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm
new file mode 100644
index 000000000000..3b4d5c3f501d
--- /dev/null
+++ b/MdePkg/Library/BaseLib/Arm/SpeculationBarrier.asm
@@ -0,0 +1,33 @@
+;------------------------------------------------------------------------------
+;
+; SpeculationBarrier() for AArch64
+;
+; Copyright (c) 2019, Linaro Ltd. All rights reserved.
+;
+; SPDX-License-Identifier: BSD-2-Clause-Patent
+;
+;------------------------------------------------------------------------------
+
+ EXPORT SpeculationBarrier
+
+ AREA MemoryBarriers, CODE, READONLY
+
+;/**
+; 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
+; );
+;
+SpeculationBarrier
+ dsb
+ isb
+ bx lr
+
+ END