git: 2d72da2720db - stable/14 - arm64: Add the pointer auth registers to armreg.h

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 15 Jul 2024 12:38:23 UTC
The branch stable/14 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d72da2720db37ad7f10da65419aa2b4922a41ce

commit 2d72da2720db37ad7f10da65419aa2b4922a41ce
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2024-05-22 08:18:54 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-07-15 12:26:58 +0000

    arm64: Add the pointer auth registers to armreg.h
    
    Add the pointer authentication registers to armreg.h. These will be
    used to support pointer authentication in a kernel built with GCC.
    
    Reviewed by:    jhb
    Sponsored by:   Arm Ltd
    Differential Revision:  https://reviews.freebsd.org/D45262
    
    (cherry picked from commit 57d714a23f5ce21e389d53636b8bc6c1b45d518e)
---
 sys/arm64/include/armreg.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
index 243c9276cee0..fee36bc9dd4e 100644
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -77,6 +77,86 @@
 
 #define	UL(x)	UINT64_C(x)
 
+/* APDAKeyHi_EL1 */
+#define	APDAKeyHi_EL1_REG	MRS_REG_ALT_NAME(APDAKeyHi_EL1)
+#define	APDAKeyHi_EL1_op0	3
+#define	APDAKeyHi_EL1_op1	0
+#define	APDAKeyHi_EL1_CRn	2
+#define	APDAKeyHi_EL1_CRm	2
+#define	APDAKeyHi_EL1_op2	1
+
+/* APDAKeyLo_EL1 */
+#define	APDAKeyLo_EL1_REG	MRS_REG_ALT_NAME(APDAKeyLo_EL1)
+#define	APDAKeyLo_EL1_op0	3
+#define	APDAKeyLo_EL1_op1	0
+#define	APDAKeyLo_EL1_CRn	2
+#define	APDAKeyLo_EL1_CRm	2
+#define	APDAKeyLo_EL1_op2	0
+
+/* APDBKeyHi_EL1 */
+#define	APDBKeyHi_EL1_REG	MRS_REG_ALT_NAME(APDBKeyHi_EL1)
+#define	APDBKeyHi_EL1_op0	3
+#define	APDBKeyHi_EL1_op1	0
+#define	APDBKeyHi_EL1_CRn	2
+#define	APDBKeyHi_EL1_CRm	2
+#define	APDBKeyHi_EL1_op2	3
+
+/* APDBKeyLo_EL1 */
+#define	APDBKeyLo_EL1_REG	MRS_REG_ALT_NAME(APDBKeyLo_EL1)
+#define	APDBKeyLo_EL1_op0	3
+#define	APDBKeyLo_EL1_op1	0
+#define	APDBKeyLo_EL1_CRn	2
+#define	APDBKeyLo_EL1_CRm	2
+#define	APDBKeyLo_EL1_op2	2
+
+/* APGAKeyHi_EL1 */
+#define	APGAKeyHi_EL1_REG	MRS_REG_ALT_NAME(APGAKeyHi_EL1)
+#define	APGAKeyHi_EL1_op0	3
+#define	APGAKeyHi_EL1_op1	0
+#define	APGAKeyHi_EL1_CRn	2
+#define	APGAKeyHi_EL1_CRm	3
+#define	APGAKeyHi_EL1_op2	1
+
+/* APGAKeyLo_EL1 */
+#define	APGAKeyLo_EL1_REG	MRS_REG_ALT_NAME(APGAKeyLo_EL1)
+#define	APGAKeyLo_EL1_op0	3
+#define	APGAKeyLo_EL1_op1	0
+#define	APGAKeyLo_EL1_CRn	2
+#define	APGAKeyLo_EL1_CRm	3
+#define	APGAKeyLo_EL1_op2	0
+
+/* APIAKeyHi_EL1 */
+#define	APIAKeyHi_EL1_REG	MRS_REG_ALT_NAME(APIAKeyHi_EL1)
+#define	APIAKeyHi_EL1_op0	3
+#define	APIAKeyHi_EL1_op1	0
+#define	APIAKeyHi_EL1_CRn	2
+#define	APIAKeyHi_EL1_CRm	1
+#define	APIAKeyHi_EL1_op2	1
+
+/* APIAKeyLo_EL1 */
+#define	APIAKeyLo_EL1_REG	MRS_REG_ALT_NAME(APIAKeyLo_EL1)
+#define	APIAKeyLo_EL1_op0	3
+#define	APIAKeyLo_EL1_op1	0
+#define	APIAKeyLo_EL1_CRn	2
+#define	APIAKeyLo_EL1_CRm	1
+#define	APIAKeyLo_EL1_op2	0
+
+/* APIBKeyHi_EL1 */
+#define	APIBKeyHi_EL1_REG	MRS_REG_ALT_NAME(APIBKeyHi_EL1)
+#define	APIBKeyHi_EL1_op0	3
+#define	APIBKeyHi_EL1_op1	0
+#define	APIBKeyHi_EL1_CRn	2
+#define	APIBKeyHi_EL1_CRm	1
+#define	APIBKeyHi_EL1_op2	3
+
+/* APIBKeyLo_EL1 */
+#define	APIBKeyLo_EL1_REG	MRS_REG_ALT_NAME(APIBKeyLo_EL1)
+#define	APIBKeyLo_EL1_op0	3
+#define	APIBKeyLo_EL1_op1	0
+#define	APIBKeyLo_EL1_CRn	2
+#define	APIBKeyLo_EL1_CRm	1
+#define	APIBKeyLo_EL1_op2	2
+
 /* CCSIDR_EL1 - Cache Size ID Register */
 #define	CCSIDR_NumSets_MASK	0x0FFFE000
 #define	CCSIDR_NumSets64_MASK	0x00FFFFFF00000000