summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-03-25 17:34:58 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-30 11:05:22 +0000
commitc5cd360277bcf8b11ff88f95c4ae92cda29eba64 (patch)
tree7ad8fe294784b6d91acd3508ac4dea449be4bf9e /MdePkg
parent6521e4d2021bc047ef78c5360b9277a699117a0e (diff)
downloadedk2-c5cd360277bcf8b11ff88f95c4ae92cda29eba64.tar.gz
edk2-c5cd360277bcf8b11ff88f95c4ae92cda29eba64.tar.bz2
edk2-c5cd360277bcf8b11ff88f95c4ae92cda29eba64.zip
MdePkg/BaseCpuLib AARCH64: Make asm files BTI compatible
Add the BTI instructions and the associated note to make the AArch64 asm objects compatible with BTI enforcement. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S1
-rw-r--r--MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S1
2 files changed, 2 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
index 82a7232268..12c2421b6d 100644
--- a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
+++ b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
@@ -26,6 +26,7 @@ GCC_ASM_EXPORT(CpuFlushTlb)
# )#
#
ASM_PFX(CpuFlushTlb):
+ AARCH64_BTI(c)
tlbi vmalle1 // Invalidate Inst TLB and Data TLB
dsb sy
isb
diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S b/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S
index 410a271565..6853e0c56e 100644
--- a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S
+++ b/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S
@@ -29,5 +29,6 @@ GCC_ASM_EXPORT(CpuSleep)
#
ASM_PFX(CpuSleep):
+ AARCH64_BTI(c)
wfi
ret