[boot-wrapper PATCH v2 7/9] pointer auth: Document CPU feature bit mask

Andre Przywara andre.przywara at arm.com
Wed Dec 22 10:16:05 PST 2021


When checking for the pointer authentication feature, we actually look
for *four* different CPUID feature sets.
Add a comment to make it more obvious that the 0xff is not a typo.

Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
 arch/aarch64/boot.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
index bfbb6ec..27ba449 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -38,7 +38,8 @@ ASM_FUNC(_start)
 
 	/* Enable pointer authentication if present */
 	mrs	x1, id_aa64isar1_el1
-	ldr	x2, =(((0xff) << 24) | (0xff << 4))
+	/* We check for APA+API and GPA+GPI */
+	ldr	x2, =((0xff << 24) | (0xff << 4))
 	and	x1, x1, x2
 	cbz	x1, 1f
 
-- 
2.25.1




More information about the linux-arm-kernel mailing list