[aarch64 boot-wrapper PATCH 5/6] pointer auth: Document CPU feature bit mask

Andre Przywara andre.przywara at arm.com
Mon May 10 05:07:25 PDT 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 a9264de..663f9fc 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -41,7 +41,8 @@ _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