MdePkg/BaseLib 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>
This commit is contained in:
Ard Biesheuvel
2023-03-25 17:37:10 +01:00
committed by mergify[bot]
parent e504b3917e
commit c4c7fb2174
8 changed files with 10 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ GCC_ASM_EXPORT(InternalLongJump)
# );
#
ASM_PFX(SetJump):
AARCH64_BTI(c)
mov x16, sp // use IP0 so save SP
#define REG_PAIR(REG1, REG2, OFFS) stp REG1, REG2, [x0, OFFS]
#define REG_ONE(REG1, OFFS) str REG1, [x0, OFFS]
@@ -75,6 +76,7 @@ ASM_PFX(SetJump):
# );
#
ASM_PFX(InternalLongJump):
AARCH64_BTI(c)
#define REG_PAIR(REG1, REG2, OFFS) ldp REG1, REG2, [x0, OFFS]
#define REG_ONE(REG1, OFFS) ldr REG1, [x0, OFFS]
GPR_LAYOUT