Add DIT CPU feature.
authorkettenis <kettenis@openbsd.org>
Wed, 24 Aug 2022 22:01:16 +0000 (22:01 +0000)
committerkettenis <kettenis@openbsd.org>
Wed, 24 Aug 2022 22:01:16 +0000 (22:01 +0000)
ok beck@

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

index c0d7e1e..24b7fed 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpu.c,v 1.67 2022/08/23 11:39:34 kettenis Exp $       */
+/*     $OpenBSD: cpu.c,v 1.68 2022/08/24 22:01:16 kettenis Exp $       */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -588,6 +588,11 @@ cpu_identify(struct cpu_info *ci)
        if (ID_AA64PFR0_CSV2(id) >= ID_AA64PFR0_CSV2_SCXT)
                printf("+SCTX");
 
+       if (ID_AA64PFR0_DIT(id) >= ID_AA64PFR0_DIT_IMPL) {
+               printf("%sDIT", sep);
+               sep = ",";
+       }
+
 #ifdef CPU_DEBUG
        id = READ_SPECIALREG(id_aa64afr0_el1);
        printf("\nID_AA64AFR0_EL1: 0x%016llx", id);
index 8d26d49..851f06f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: armreg.h,v 1.19 2022/01/02 02:26:50 jsg Exp $ */
+/* $OpenBSD: armreg.h,v 1.20 2022/08/24 22:01:16 kettenis Exp $ */
 /*-
  * Copyright (c) 2013, 2014 Andrew Turner
  * Copyright (c) 2015 The FreeBSD Foundation
 #define        ID_AA64PFR0_GIC(x)              ((x) & ID_AA64PFR0_GIC_MASK)
 #define         ID_AA64PFR0_GIC_CPUIF_NONE     (0x0 << ID_AA64PFR0_GIC_SHIFT)
 #define         ID_AA64PFR0_GIC_CPUIF_EN       (0x1 << ID_AA64PFR0_GIC_SHIFT)
+#define        ID_AA64PFR0_DIT_SHIFT           48
+#define        ID_AA64PFR0_DIT_MASK            (0xfULL << ID_AA64PFR0_DIT_SHIFT)
+#define        ID_AA64PFR0_DIT(x)              ((x) & ID_AA64PFR0_DIT_MASK)
+#define         ID_AA64PFR0_DIT_UNKNOWN        (0x0ULL << ID_AA64PFR0_DIT_SHIFT)
+#define         ID_AA64PFR0_DIT_IMPL           (0x1ULL << ID_AA64PFR0_DIT_SHIFT)
 #define        ID_AA64PFR0_CSV2_SHIFT          56
 #define        ID_AA64PFR0_CSV2_MASK           (0xfULL << ID_AA64PFR0_CSV2_SHIFT)
 #define        ID_AA64PFR0_CSV2(x)             ((x) & ID_AA64PFR0_CSV2_MASK)