]> xenbits.xensource.com Git - ovmf.git/commitdiff
MdePkg/BaseCpuLib AARCH64: Make asm files BTI compatible
authorArd Biesheuvel <ardb@kernel.org>
Sat, 25 Mar 2023 16:34:58 +0000 (17:34 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 30 Mar 2023 11:05:22 +0000 (11:05 +0000)
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>
MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S

index 82a7232268f5980912489724aeeb92c2a2684fa3..12c2421b6d327a7bf8164384ad85ff4d39fa6525 100644 (file)
@@ -26,6 +26,7 @@ GCC_ASM_EXPORT(CpuFlushTlb)
 #  )#\r
 #\r
 ASM_PFX(CpuFlushTlb):\r
+  AARCH64_BTI(c)\r
   tlbi  vmalle1                 // Invalidate Inst TLB and Data TLB\r
   dsb   sy\r
   isb\r
index 410a271565edfb68d8b4b17d4dbd3f8d53be923d..6853e0c56e0bb13561c5d60c405f24b3498e96c7 100644 (file)
@@ -29,5 +29,6 @@ GCC_ASM_EXPORT(CpuSleep)
 #\r
 \r
 ASM_PFX(CpuSleep):\r
+    AARCH64_BTI(c)\r
     wfi\r
     ret\r