git: fd5e9210598c - main - Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit)
Date: Wed, 18 Jan 2023 21:05:41 UTC
The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=fd5e9210598cfafbecc05b5ec03da25483833f90 commit fd5e9210598cfafbecc05b5ec03da25483833f90 Author: Allan Jude <allanjude@FreeBSD.org> AuthorDate: 2022-12-20 21:31:38 +0000 Commit: Allan Jude <allanjude@FreeBSD.org> CommitDate: 2023-01-18 21:04:49 +0000 Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit) Reviewed by: imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37767 --- sys/arm64/arm64/identcpu.c | 10 +++++++++- sys/arm64/include/cpu.h | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 4f176ceef0b8..dadb589e9294 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -199,6 +199,7 @@ static const struct cpu_parts cpu_parts_arm[] = { { CPU_PART_NEOVERSE_N1, "Neoverse-N1" }, { CPU_PART_NEOVERSE_N2, "Neoverse-N2" }, { CPU_PART_NEOVERSE_V1, "Neoverse-V1" }, + { CPU_PART_NEOVERSE_V2, "Neoverse-V2" }, CPU_PART_NONE, }; @@ -215,6 +216,13 @@ static const struct cpu_parts cpu_parts_apm[] = { CPU_PART_NONE, }; +/* Qualcomm */ +static const struct cpu_parts cpu_parts_qcom[] = { + { CPU_PART_KRYO400_GOLD, "Kryo 400 Gold" }, + { CPU_PART_KRYO400_SILVER, "Kryo 400 Silver" }, + CPU_PART_NONE, +}; + /* Unknown */ static const struct cpu_parts cpu_parts_none[] = { CPU_PART_NONE, @@ -237,7 +245,7 @@ const struct cpu_implementers cpu_implementers[] = { { CPU_IMPL_INTEL, "Intel", cpu_parts_none }, { CPU_IMPL_MARVELL, "Marvell", cpu_parts_none }, { CPU_IMPL_NVIDIA, "NVIDIA", cpu_parts_none }, - { CPU_IMPL_QUALCOMM, "Qualcomm", cpu_parts_none }, + { CPU_IMPL_QUALCOMM, "Qualcomm", cpu_parts_qcom }, CPU_IMPLEMENTER_NONE, }; diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 2318c9d54cf3..280a759a4f06 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -111,6 +111,7 @@ #define CPU_PART_CORTEX_X1C 0xD4C #define CPU_PART_CORTEX_A715 0xD4D #define CPU_PART_CORTEX_X3 0xD4E +#define CPU_PART_NEOVERSE_V2 0xD4F /* Cavium Part numbers */ #define CPU_PART_THUNDERX 0x0A1 @@ -126,6 +127,10 @@ /* APM / Ampere Part Number */ #define CPU_PART_EMAG8180 0x000 +/* Qualcomm */ +#define CPU_PART_KRYO400_GOLD 0x804 +#define CPU_PART_KRYO400_SILVER 0x805 + #define CPU_IMPL(midr) (((midr) >> 24) & 0xff) #define CPU_PART(midr) (((midr) >> 4) & 0xfff) #define CPU_VAR(midr) (((midr) >> 20) & 0xf)