From: kettenis Date: Tue, 26 Jan 2021 23:02:18 +0000 (+0000) Subject: Recognize Apple Icestorm cores. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d389400ee986f78a04ce98c081e6f044ef1071e0;p=openbsd Recognize Apple Icestorm cores. --- diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 2122e3cef3f..f620770c33c 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.44 2020/12/04 21:18:09 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.45 2021/01/26 23:02:18 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -47,6 +47,7 @@ #define CPU_IMPL_ARM 0x41 #define CPU_IMPL_CAVIUM 0x43 #define CPU_IMPL_AMCC 0x50 +#define CPU_IMPL_APPLE 0x61 #define CPU_PART_CORTEX_A34 0xd02 #define CPU_PART_CORTEX_A53 0xd03 @@ -76,6 +77,8 @@ #define CPU_PART_X_GENE 0x000 +#define CPU_PART_ICESTORM 0x022 + #define CPU_IMPL(midr) (((midr) >> 24) & 0xff) #define CPU_PART(midr) (((midr) >> 4) & 0xfff) #define CPU_VAR(midr) (((midr) >> 20) & 0xf) @@ -127,6 +130,11 @@ struct cpu_cores cpu_cores_amcc[] = { { 0, NULL }, }; +struct cpu_cores cpu_cores_apple[] = { + { CPU_PART_ICESTORM, "Icestorm" }, + { 0, NULL }, +}; + /* arm cores makers */ const struct implementers { int id; @@ -136,6 +144,7 @@ const struct implementers { { CPU_IMPL_ARM, "ARM", cpu_cores_arm }, { CPU_IMPL_CAVIUM, "Cavium", cpu_cores_cavium }, { CPU_IMPL_AMCC, "Applied Micro", cpu_cores_amcc }, + { CPU_IMPL_APPLE, "Apple", cpu_cores_apple }, { 0, NULL }, };