From c5cd360277bcf8b11ff88f95c4ae92cda29eba64 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Sat, 25 Mar 2023 17:34:58 +0100 Subject: 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 Reviewed-by: Leif Lindholm Reviewed-by: Oliver Smith-Denny --- MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S | 1 + MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S | 1 + 2 files changed, 2 insertions(+) (limited to 'MdePkg') 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 -- cgit v1.2.3