aboutsummaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-08-15 14:29:29 +0100
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-10-16 08:31:13 +0100
commit3ff4aaaca44b75504aec5ab5b72cd587a6fcd432 (patch)
tree44b97dc48ba347fb1056d075f0ea9e549ee61cf7 /include/lib
parent0a09313ec780d2f66efcda3eb2a5d1632719bd81 (diff)
downloadtrusted-firmware-a-3ff4aaaca44b75504aec5ab5b72cd587a6fcd432.tar.gz
AArch64: Enable lower ELs to use pointer authentication
Pointer authentication is an Armv8.3 feature that introduces instructions that can be used to authenticate and verify pointers. Pointer authentication instructions are allowed to be accessed from all ELs but only when EL3 explicitly allows for it; otherwise, their usage will trap to EL3. Since EL3 doesn't have trap handling in place, this patch unconditionally disables all related traps to EL3 to avoid potential misconfiguration leading to an unhandled EL3 exception. Fixes ARM-software/tf-issues#629 Change-Id: I9bd2efe0dc714196f503713b721ffbf05672c14d Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/aarch64/arch.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/lib/aarch64/arch.h b/include/lib/aarch64/arch.h
index a6022cb01e..e6842e148d 100644
--- a/include/lib/aarch64/arch.h
+++ b/include/lib/aarch64/arch.h
@@ -218,6 +218,8 @@
/* SCR definitions */
#define SCR_RES1_BITS ((U(1) << 4) | (U(1) << 5))
#define SCR_FIEN_BIT (U(1) << 21)
+#define SCR_API_BIT (U(1) << 17)
+#define SCR_APK_BIT (U(1) << 16)
#define SCR_TWE_BIT (U(1) << 13)
#define SCR_TWI_BIT (U(1) << 12)
#define SCR_ST_BIT (U(1) << 11)
@@ -274,6 +276,8 @@
#define VTTBR_BADDR_SHIFT U(0)
/* HCR definitions */
+#define HCR_API_BIT (ULL(1) << 41)
+#define HCR_APK_BIT (ULL(1) << 40)
#define HCR_RW_SHIFT U(31)
#define HCR_RW_BIT (ULL(1) << HCR_RW_SHIFT)
#define HCR_AMO_BIT (ULL(1) << 5)