diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2019-02-27 14:32:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 14:32:35 +0000 |
commit | 57bc6424cd7021e64d2af876b7d79b685893a208 (patch) | |
tree | 7ac40b1632b32078b667add460c4f1a3a0b5ed5b /include/arch/aarch64/el3_common_macros.S | |
parent | fc159c62ed6779bbf64882535e245629dd059e98 (diff) | |
parent | 67b6ff9f8ccd84cea1627d738f3e2d4eb0a789e1 (diff) | |
download | trusted-firmware-a-57bc6424cd7021e64d2af876b7d79b685893a208.tar.gz |
Merge pull request #1829 from antonio-nino-diaz-arm/an/pauth
Add Pointer Authentication (ARMv8.3-PAuth) support to the TF
Diffstat (limited to 'include/arch/aarch64/el3_common_macros.S')
-rw-r--r-- | include/arch/aarch64/el3_common_macros.S | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/arch/aarch64/el3_common_macros.S b/include/arch/aarch64/el3_common_macros.S index 5f5e0c69b2..22b32b491c 100644 --- a/include/arch/aarch64/el3_common_macros.S +++ b/include/arch/aarch64/el3_common_macros.S @@ -76,9 +76,16 @@ * authentication instructions from lower ELs. * --------------------------------------------------------------------- */ - mov_imm x0, ((SCR_RESET_VAL | SCR_EA_BIT | SCR_SIF_BIT | \ - SCR_API_BIT | SCR_APK_BIT) \ + mov_imm x0, ((SCR_RESET_VAL | SCR_EA_BIT | SCR_SIF_BIT) \ & ~(SCR_TWE_BIT | SCR_TWI_BIT | SCR_SMD_BIT)) +#if CTX_INCLUDE_PAUTH_REGS + /* + * If the pointer authentication registers are saved during world + * switches, enable pointer authentication everywhere, as it is safe to + * do so. + */ + orr x0, x0, #(SCR_API_BIT | SCR_APK_BIT) +#endif msr scr_el3, x0 /* --------------------------------------------------------------------- |