From d8e9f3d58e630b85867bb67b52d5bd40ba441474 Mon Sep 17 00:00:00 2001 From: The Tumultuous Unicorn Of Darkness Date: Sun, 14 May 2023 19:45:58 +0200 Subject: [PATCH] DB: fix detection of Intel Alder/Raptor-Lake P/U --- libcpuid/libcpuid_internal.h | 1 + libcpuid/recog_intel.c | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/libcpuid/libcpuid_internal.h b/libcpuid/libcpuid_internal.h index 94e30cb..1a85b95 100644 --- a/libcpuid/libcpuid_internal.h +++ b/libcpuid/libcpuid_internal.h @@ -135,6 +135,7 @@ enum _intel_bits_t { _GOLD_ = LBIT( 25 ), _PLATINIUM_ = LBIT( 26 ), _MAX_ = LBIT( 27 ), + _U = LBIT( 28 ), }; typedef enum _intel_bits_t intel_bits_t; diff --git a/libcpuid/recog_intel.c b/libcpuid/recog_intel.c index 7912d1f..821091d 100644 --- a/libcpuid/recog_intel.c +++ b/libcpuid/recog_intel.c @@ -474,9 +474,14 @@ const struct match_entry_t cpudb_intel[] = { { 6, 7, -1, -1, 151, -1, -1, -1, NC, CORE_|_I_|_9|_H|_X, _12xxx, "Alder Lake-HX (Core i9)" }, { 6, 7, -1, -1, 151, -1, -1, -1, NC, CORE_|_I_|_7|_H|_X, _12xxx, "Alder Lake-HX (Core i7)" }, { 6, 7, -1, -1, 151, -1, -1, -1, NC, CORE_|_I_|_5|_H|_X, _12xxx, "Alder Lake-HX (Core i5)" }, - { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_7|_P , _12xxx, "Alder Lake-P (Core i7)" }, - { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_5|_P , _12xxx, "Alder Lake-P (Core i5)" }, - { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_3|_P , _12xxx, "Alder Lake-P (Core i3)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_7|_P , 0, "Alder Lake-P (Core i7)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_5|_P , 0, "Alder Lake-P (Core i5)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_3|_P , 0, "Alder Lake-P (Core i3)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_7|_U , 0, "Alder Lake-U (Core i7)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_5|_U , 0, "Alder Lake-U (Core i5)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_3|_U , 0, "Alder Lake-U (Core i3)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, PENTIUM_ , 0, "Alder Lake-U (Pentium)" }, + { 6, 10, -1, -1, 154, -1, -1, -1, NC, CELERON_ , 0, "Alder Lake-U (Celeron)" }, { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_9|_H , _12xxx, "Alder Lake-H (Core i9)" }, { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_7|_H , _12xxx, "Alder Lake-H (Core i7)" }, { 6, 10, -1, -1, 154, -1, -1, -1, NC, CORE_|_I_|_5|_H , _12xxx, "Alder Lake-H (Core i5)" }, @@ -495,11 +500,11 @@ const struct match_entry_t cpudb_intel[] = { { 6, 7, -1, -1, 183, -1, -1, -1, NC, CORE_|_I_|_9|_H|_X, _13xxx, "Raptor Lake-HX (Core i9)" }, { 6, 7, -1, -1, 183, -1, -1, -1, NC, CORE_|_I_|_7|_H|_X, _13xxx, "Raptor Lake-HX (Core i7)" }, { 6, 7, -1, -1, 183, -1, -1, -1, NC, CORE_|_I_|_5|_H|_X, _13xxx, "Raptor Lake-HX (Core i5)" }, - { 6, 10, 2, -1, 186, -1, -1, -1, NC, CORE_|_I_|_7 , _13xxx, "Raptor Lake-P (Core i7)" }, - { 6, 10, 2, -1, 186, -1, -1, -1, NC, CORE_|_I_|_5 , _13xxx, "Raptor Lake-P (Core i5)" }, - { 6, 10, 3, -1, 186, -1, -1, -1, NC, CORE_|_I_|_7 , _13xxx, "Raptor Lake-U (Core i7)" }, - { 6, 10, 3, -1, 186, -1, -1, -1, NC, CORE_|_I_|_5 , _13xxx, "Raptor Lake-U (Core i5)" }, - { 6, 10, 3, -1, 186, -1, -1, -1, NC, CORE_|_I_|_3 , _13xxx, "Raptor Lake-U (Core i3)" }, + { 6, 10, 2, -1, 186, -1, -1, -1, NC, CORE_|_I_|_7|_P , 0, "Raptor Lake-P (Core i7)" }, + { 6, 10, 2, -1, 186, -1, -1, -1, NC, CORE_|_I_|_5|_P , 0, "Raptor Lake-P (Core i5)" }, + { 6, 10, 3, -1, 186, -1, -1, -1, NC, CORE_|_I_|_7|_U , 0, "Raptor Lake-U (Core i7)" }, + { 6, 10, 3, -1, 186, -1, -1, -1, NC, CORE_|_I_|_5|_U , 0, "Raptor Lake-U (Core i5)" }, + { 6, 10, 3, -1, 186, -1, -1, -1, NC, CORE_|_I_|_3|_U , 0, "Raptor Lake-U (Core i3)" }, { 6, 10, -1, -1, 186, -1, -1, -1, NC, CORE_|_I_|_9|_H , _13xxx, "Raptor Lake-H (Core i9)" }, { 6, 10, -1, -1, 186, -1, -1, -1, NC, CORE_|_I_|_7|_H , _13xxx, "Raptor Lake-H (Core i7)" }, { 6, 10, -1, -1, 186, -1, -1, -1, NC, CORE_|_I_|_5|_H , _13xxx, "Raptor Lake-H (Core i5)" }, @@ -797,6 +802,7 @@ static intel_code_and_bits_t get_brand_code_and_bits(struct cpu_id_t* data) case 'X': bits |= _X; break; case 'P': bits |= _P; break; case 'N': bits |= _N; break; + case 'U': bits |= _U; break; } } }