Print feature that indicates a CPU core supports 16-bit ASIDs.
authorkettenis <kettenis@openbsd.org>
Thu, 4 Mar 2021 18:32:52 +0000 (18:32 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 4 Mar 2021 18:32:52 +0000 (18:32 +0000)
ok patrick@

sys/arch/arm64/arm64/cpu.c

index 21f841a..719bcf1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpu.c,v 1.48 2021/02/21 14:55:16 tobhe Exp $  */
+/*     $OpenBSD: cpu.c,v 1.49 2021/03/04 18:32:52 kettenis Exp $       */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -399,6 +399,18 @@ cpu_identify(struct cpu_info *ci)
                sep = ",";
        }
 
+       /*
+        * ID_AA64MMFR0
+        *
+        * We only print ASIDBits for now.
+        */
+       id = READ_SPECIALREG(id_aa64mmfr0_el1);
+
+       if (ID_AA64MMFR0_ASID_BITS(id) == ID_AA64MMFR0_ASID_BITS_16) {
+               printf("%sASID16", sep);
+               sep = ",";
+       }
+
        /*
         * ID_AA64MMFR1
         *