dmidecode: Expand list of recognized CPU sockets

Resolves: RHEL-9007
Resolves: RHEL-20739

Signed-off-by: Lichen Liu <lichliu@redhat.com>
This commit is contained in:
Lichen Liu 2024-01-09 11:01:20 +08:00
parent 8c0aae2813
commit 3761f9e2ae
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From 93b819ef7805264dbd0f60015e4c24084ebb091d Mon Sep 17 00:00:00 2001
From: Armin Wolf <W_Armin@gmx.de>
Date: Tue, 19 Dec 2023 17:25:34 +0100
Subject: [PATCH] dmidecode: Expand list of recognized CPU sockets
On an AMD Ryzen 5 7600, the Processor Upgrade field
displays <OUT OF SPEC> due to it not recognizing the
AM5 CPU socket.
Fix this by expanding the list of CPU sockets to match
the list specified in SMBIOS 3.7.0.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
dmidecode.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dmidecode.c b/dmidecode.c
index 77cb2fc..1261749 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -1453,10 +1453,18 @@ static const char *dmi_processor_upgrade(u8 code)
"Socket LGA1211",
"Socket LGA2422",
"Socket LGA5773",
- "Socket BGA5773" /* 0x48 */
+ "Socket BGA5773",
+ "Socket AM5",
+ "Socket SP5",
+ "Socket SP6",
+ "Socket BGA883",
+ "Socket BGA1190",
+ "Socket BGA4129",
+ "Socket LGA4710",
+ "Socket LGA7529" /* 0x50 */
};
- if (code >= 0x01 && code <= 0x48)
+ if (code >= 0x01 && code <= 0x50)
return upgrade[code - 0x01];
return out_of_spec;
}
--
2.43.0

View File

@ -11,6 +11,7 @@ ExclusiveArch: %{ix86} x86_64 ia64 aarch64
Patch0: 0001-dmidecode-Add-processor-support-from-SMBIOS-3.6.0.patch
Patch1: 0002-Consistently-use-read_file-when-reading-from-a-dump-.patch
Patch2: 0003-dmidecode-Expand-list-of-recognized-CPU-sockets.patch
%description
dmidecode reports information about x86 & ia64 hardware as described in the
@ -27,6 +28,7 @@ I/O ports (e.g. serial, parallel, USB).
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"