Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Identify Apple M1 "Icestorm" and "Firestorm" CPU ty...



details:   https://anonhg.NetBSD.org/src/rev/2f73f15bec45
branches:  trunk
changeset: 1023266:2f73f15bec45
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Aug 30 22:57:33 2021 +0000

description:
Identify Apple M1 "Icestorm" and "Firestorm" CPU types.

diffstat:

 sys/arch/aarch64/aarch64/cpu.c  |  6 ++++--
 sys/arch/arm/include/cputypes.h |  5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 926e3716ba93 -r 2f73f15bec45 sys/arch/aarch64/aarch64/cpu.c
--- a/sys/arch/aarch64/aarch64/cpu.c    Mon Aug 30 22:56:26 2021 +0000
+++ b/sys/arch/aarch64/aarch64/cpu.c    Mon Aug 30 22:57:33 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.60 2021/06/19 13:40:00 jmcneill Exp $ */
+/* $NetBSD: cpu.c,v 1.61 2021/08/30 22:57:33 jmcneill Exp $ */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.60 2021/06/19 13:40:00 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.61 2021/08/30 22:57:33 jmcneill Exp $");
 
 #include "locators.h"
 #include "opt_arm_debug.h"
@@ -203,6 +203,8 @@
        { CPU_ID_THUNDERX81XXRX, "ThunderX CN81XX", "Cavium", "v8-A" },
        { CPU_ID_THUNDERX83XXRX, "ThunderX CN83XX", "Cavium", "v8-A" },
        { CPU_ID_THUNDERX2RX, "ThunderX2", "Marvell", "v8.1-A" },
+       { CPU_ID_APPLE_M1_ICESTORM & CPU_PARTMASK, "M1 Icestorm", "Apple", "Apple Silicon" },
+       { CPU_ID_APPLE_M1_FIRESTORM & CPU_PARTMASK, "M1 Firestorm", "Apple", "Apple Silicon" },
 };
 
 static void
diff -r 926e3716ba93 -r 2f73f15bec45 sys/arch/arm/include/cputypes.h
--- a/sys/arch/arm/include/cputypes.h   Mon Aug 30 22:56:26 2021 +0000
+++ b/sys/arch/arm/include/cputypes.h   Mon Aug 30 22:57:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cputypes.h,v 1.13 2020/07/01 08:02:13 ryo Exp $        */
+/*     $NetBSD: cputypes.h,v 1.14 2021/08/30 22:57:33 jmcneill Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -208,6 +208,9 @@
 #define CPU_ID_THUNDERX83XXRX  0x43000a30
 #define CPU_ID_THUNDERX2RX     0x43000af0
 
+#define CPU_ID_APPLE_M1_ICESTORM       0x61000220
+#define CPU_ID_APPLE_M1_FIRESTORM      0x61000230
+
 #define CPU_ID_SA110           0x4401a100
 #define CPU_ID_SA1100          0x4401a110
 #define CPU_ID_NVIDIADENVER2   0x4e0f0030



Home | Main Index | Thread Index | Old Index