diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-03-25 17:34:58 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-30 11:05:22 +0000 |
commit | c5cd360277bcf8b11ff88f95c4ae92cda29eba64 (patch) | |
tree | 7ad8fe294784b6d91acd3508ac4dea449be4bf9e /MdePkg/Library/BaseCpuLib | |
parent | 6521e4d2021bc047ef78c5360b9277a699117a0e (diff) | |
download | edk2-c5cd360277bcf8b11ff88f95c4ae92cda29eba64.zip edk2-c5cd360277bcf8b11ff88f95c4ae92cda29eba64.tar.gz edk2-c5cd360277bcf8b11ff88f95c4ae92cda29eba64.tar.bz2 |
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/Library/BaseCpuLib')
-rw-r--r-- | MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S | 1 | ||||
-rw-r--r-- | MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S index 82a7232..12c2421 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 410a271..6853e0c 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
|