Add detection of EPAN feature bit.
authorkettenis <kettenis@openbsd.org>
Fri, 23 Dec 2022 17:46:49 +0000 (17:46 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 23 Dec 2022 17:46:49 +0000 (17:46 +0000)
ok deraadt@

sys/arch/arm64/arm64/cpu.c
sys/arch/arm64/include/armreg.h

index 0aa5623..7c8e499 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpu.c,v 1.77 2022/12/21 22:30:42 kettenis Exp $       */
+/*     $OpenBSD: cpu.c,v 1.78 2022/12/23 17:46:49 kettenis Exp $       */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -674,6 +674,8 @@ cpu_identify(struct cpu_info *ci)
        }
        if (ID_AA64MMFR1_PAN(id) >= ID_AA64MMFR1_PAN_ATS1E1)
                printf("+ATS1E1");
+       if (ID_AA64MMFR1_PAN(id) >= ID_AA64MMFR1_PAN_EPAN)
+               printf("+EPAN");
 
        if (ID_AA64MMFR1_LO(id) >= ID_AA64MMFR1_LO_IMPL) {
                printf("%sLO", sep);
index c8281a2..c179966 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: armreg.h,v 1.25 2022/12/09 21:23:24 patrick Exp $ */
+/* $OpenBSD: armreg.h,v 1.26 2022/12/23 17:46:49 kettenis Exp $ */
 /*-
  * Copyright (c) 2013, 2014 Andrew Turner
  * Copyright (c) 2015 The FreeBSD Foundation
 #define         ID_AA64MMFR1_PAN_NONE          (0x0 << ID_AA64MMFR1_PAN_SHIFT)
 #define         ID_AA64MMFR1_PAN_IMPL          (0x1 << ID_AA64MMFR1_PAN_SHIFT)
 #define         ID_AA64MMFR1_PAN_ATS1E1        (0x2 << ID_AA64MMFR1_PAN_SHIFT)
+#define         ID_AA64MMFR1_PAN_EPAN          (0x3 << ID_AA64MMFR1_PAN_SHIFT)
 #define        ID_AA64MMFR1_SPECSEI_SHIFT      24
 #define        ID_AA64MMFR1_SPECSEI_MASK       (0xf << ID_AA64MMFR1_SPECSEI_SHIFT)
 #define        ID_AA64MMFR1_SPECSEI(x)         ((x) & ID_AA64MMFR1_SPECSEI_MASK)