summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/cpucaps.h
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2018-12-07 18:39:24 +0000
committerWill Deacon <will.deacon@arm.com>2018-12-13 16:42:46 +0000
commit6984eb47d5c1a74bb44467ee4eee22d680f10785 (patch)
treea147e96530e93e6319f4b2be5cfc2667d8344156 /arch/arm64/include/asm/cpucaps.h
parentb3669b1e1c09890d61109a1a8ece2c5b66804714 (diff)
arm64/cpufeature: detect pointer authentication
So that we can dynamically handle the presence of pointer authentication functionality, wire up probing code in cpufeature.c. From ARMv8.3 onwards, ID_AA64ISAR1 is no longer entirely RES0, and now has four fields describing the presence of pointer authentication functionality: * APA - address authentication present, using an architected algorithm * API - address authentication present, using an IMP DEF algorithm * GPA - generic authentication present, using an architected algorithm * GPI - generic authentication present, using an IMP DEF algorithm This patch checks for both address and generic authentication, separately. It is assumed that if all CPUs support an IMP DEF algorithm, the same algorithm is used across all CPUs. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/cpucaps.h')
-rw-r--r--arch/arm64/include/asm/cpucaps.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h
index a89f587d4842..803f388e81d4 100644
--- a/arch/arm64/include/asm/cpucaps.h
+++ b/arch/arm64/include/asm/cpucaps.h
@@ -56,7 +56,13 @@
#define ARM64_WORKAROUND_1188873 35
#define ARM64_HAS_SB 36
#define ARM64_WORKAROUND_1165522 37
+#define ARM64_HAS_ADDRESS_AUTH_ARCH 38
+#define ARM64_HAS_ADDRESS_AUTH_IMP_DEF 39
+#define ARM64_HAS_ADDRESS_AUTH 40
+#define ARM64_HAS_GENERIC_AUTH_ARCH 41
+#define ARM64_HAS_GENERIC_AUTH_IMP_DEF 42
+#define ARM64_HAS_GENERIC_AUTH 43
-#define ARM64_NCAPS 38
+#define ARM64_NCAPS 44
#endif /* __ASM_CPUCAPS_H */