import dmidecode-3.3-6.el9

This commit is contained in:
CentOS Sources 2022-01-11 13:46:23 -05:00 committed by Stepan Oksanichenko
parent d4977dbf1b
commit ac5fc9d5b8
6 changed files with 247 additions and 1 deletions

View File

@ -0,0 +1,75 @@
From 0d40ff02f2ae692c34cfd63b0617abf66ea58c5e Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Wed, 21 Oct 2020 15:24:40 +0200
Subject: [PATCH 1/2] dmidecode: Add new system slot types from SMBIOS spec
3.4.0
Based on an earlier patch from Prabhakar Pujeri (Dell).
Version 3.4.0 of the SMBIOS specification adds 14 new system slot
types and updates 2 (DMI type 9).
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
---
dmidecode.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/dmidecode.c b/dmidecode.c
index 981fe9697458..0e480d3e337b 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -1931,11 +1931,16 @@ static const char *dmi_slot_type(u8 code)
"MXM Type IV",
"MXM 3.0 Type A",
"MXM 3.0 Type B",
- "PCI Express 2 SFF-8639",
- "PCI Express 3 SFF-8639",
+ "PCI Express 2 SFF-8639 (U.2)",
+ "PCI Express 3 SFF-8639 (U.2)",
"PCI Express Mini 52-pin with bottom-side keep-outs",
"PCI Express Mini 52-pin without bottom-side keep-outs",
- "PCI Express Mini 76-pin" /* 0x23 */
+ "PCI Express Mini 76-pin"
+ "PCI Express 4 SFF-8639 (U.2)",
+ "PCI Express 5 SFF-8639 (U.2)",
+ "OCP NIC 3.0 Small Form Factor (SFF)",
+ "OCP NIC 3.0 Large Form Factor (LFF)",
+ "OCP NIC Prior to 3.0" /* 0x28 */
};
static const char *type_0x30[] = {
"CXL FLexbus 1.0" /* 0x30 */
@@ -1970,18 +1975,27 @@ static const char *dmi_slot_type(u8 code)
"PCI Express 4 x2",
"PCI Express 4 x4",
"PCI Express 4 x8",
- "PCI Express 4 x16" /* 0xBD */
+ "PCI Express 4 x16",
+ "PCI Express 5",
+ "PCI Express 5 x1",
+ "PCI Express 5 x2",
+ "PCI Express 5 x4",
+ "PCI Express 5 x8",
+ "PCI Express 5 x16",
+ "PCI Express 6+",
+ "EDSFF E1",
+ "EDSFF E3" /* 0xC6 */
};
/*
* Note to developers: when adding entries to these lists, check if
* function dmi_slot_id below needs updating too.
*/
- if (code >= 0x01 && code <= 0x23)
+ if (code >= 0x01 && code <= 0x28)
return type[code - 0x01];
if (code == 0x30)
return type_0x30[code - 0x30];
- if (code >= 0xA0 && code <= 0xBD)
+ if (code >= 0xA0 && code <= 0xC6)
return type_0xA0[code - 0xA0];
return out_of_spec;
}
--
2.17.1

View File

@ -0,0 +1,40 @@
From b289de9deb325eeef7919a1f4e3ac1f93b099c16 Mon Sep 17 00:00:00 2001
From: Prabhakar pujeri <prabhakar.pujeri@gmail.com>
Date: Fri, 23 Oct 2020 17:45:16 +0200
Subject: [PATCH] Add new processor characteristics bits from SMBIOS spec 3.4.0
* The bit to indicate 128-bit capable processor
* The bit to indicate processor supports returning ARM64 SoC ID
Signed-off-by: Coiby Xu <coxu@redhat.com>
---
dmidecode.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dmidecode.c b/dmidecode.c
index 31a49e4..67f6048 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -1388,7 +1388,9 @@ static void dmi_processor_characteristics(const char *attr, u16 code)
"Hardware Thread",
"Execute Protection",
"Enhanced Virtualization",
- "Power/Performance Control" /* 7 */
+ "Power/Performance Control",
+ "128-bit Capable"
+ "Arm64 SoC ID" /* 9 */
};
if ((code & 0x00FC) == 0)
@@ -1398,7 +1400,7 @@ static void dmi_processor_characteristics(const char *attr, u16 code)
int i;
pr_list_start(attr, NULL);
- for (i = 2; i <= 7; i++)
+ for (i = 2; i <= 9; i++)
if (code & (1 << i))
pr_list_item("%s", characteristics[i - 2]);
pr_list_end();
--
2.31.1

View File

@ -0,0 +1,45 @@
From ac6a64496fc99a5cc05ebe4dd7d1b88f60041009 Mon Sep 17 00:00:00 2001
From: Lianbo Jiang <lijiang@redhat.com>
Date: Thu, 10 Dec 2020 11:21:21 +0100
Subject: [PATCH] Missing comma in the dmi_slot_type()
In the initialization of "type", a suspicious concatenated string
"PCI Express Mini 76-pinPCI Express 4 SFF-8639 (U.2)" is produced
due to a missing comma between lines.
[JD: Fixed a similar bug in dmi_processor_characteristics.]
Fixes: b289de9deb32 ("Add new processor characteristics bits from SMBIOS spec 3.4.0")
Fixes: c54348130a2a ("dmidecode: Add new system slot types from SMBIOS spec 3.4.0")
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Coiby Xu <coxu@redhat.com>
---
dmidecode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dmidecode.c b/dmidecode.c
index ac96395..4c98553 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -1389,7 +1389,7 @@ static void dmi_processor_characteristics(const char *attr, u16 code)
"Execute Protection",
"Enhanced Virtualization",
"Power/Performance Control",
- "128-bit Capable"
+ "128-bit Capable",
"Arm64 SoC ID" /* 9 */
};
@@ -1939,7 +1939,7 @@ static const char *dmi_slot_type(u8 code)
"PCI Express 3 SFF-8639 (U.2)",
"PCI Express Mini 52-pin with bottom-side keep-outs",
"PCI Express Mini 52-pin without bottom-side keep-outs",
- "PCI Express Mini 76-pin"
+ "PCI Express Mini 76-pin",
"PCI Express 4 SFF-8639 (U.2)",
"PCI Express 5 SFF-8639 (U.2)",
"OCP NIC 3.0 Small Form Factor (SFF)",
--
2.31.1

View File

@ -0,0 +1,35 @@
From 02ff0488f7d7a0f7e69ff7141236cbc1392c3b4c Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Fri, 30 Oct 2020 15:36:19 +0100
Subject: [PATCH 2/2] dmidecode: Skip details of uninstalled memory modules
If a memory slot is empty then by definition the fields containing
the memory module details are irrelevant. Best case they are filled
with "Unused" and "None", but in some cases they are even invalid
because the manufacturer did not bother setting the fields to
valid neutral values. So it is better to not print these fields
at all, so as to not confuse the user.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
---
dmidecode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dmidecode.c b/dmidecode.c
index 0e480d3e337b..657a1341470b 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -4465,6 +4465,9 @@ static void dmi_decode(const struct dmi_header *h, u16 ver)
dmi_memory_device_type(data[0x12]));
dmi_memory_device_type_detail(WORD(data + 0x13));
if (h->length < 0x17) break;
+ /* If no module is present, the remaining fields are irrelevant */
+ if (WORD(data + 0x0C) == 0)
+ break;
dmi_memory_device_speed("Speed", WORD(data + 0x15));
if (h->length < 0x1B) break;
pr_attr("Manufacturer", "%s",
--
2.17.1

View File

@ -0,0 +1,34 @@
From b3b4c29f38b29a6ac3779ff97363d42fd3061c4a Mon Sep 17 00:00:00 2001
From: Prabhakar pujeri <prabhakar.pujeri@gmail.com>
Date: Mon, 19 Oct 2020 14:38:04 +0200
Subject: [PATCH] Add new processor upgrades from SMBIOS spec 3.4.0
Added 2 more new values (0x3D and 0x3E).
Signed-off-by: Coiby Xu <coxu@redhat.com>
---
dmidecode.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dmidecode.c b/dmidecode.c
index 97ba941..eb5a5af 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -1355,10 +1355,12 @@ static const char *dmi_processor_upgrade(u8 code)
"Socket LGA2066",
"Socket BGA1392",
"Socket BGA1510",
- "Socket BGA1528" /* 0x3C */
+ "Socket BGA1528",
+ "Socket LGA4189",
+ "Socket LGA1200" /* 0x3E */
};
- if (code >= 0x01 && code <= 0x3C)
+ if (code >= 0x01 && code <= 0x3E)
return upgrade[code - 0x01];
return out_of_spec;
}
--
2.31.1

View File

@ -1,7 +1,7 @@
Summary: Tool to analyse BIOS DMI data Summary: Tool to analyse BIOS DMI data
Name: dmidecode Name: dmidecode
Version: 3.3 Version: 3.3
Release: 2%{?dist} Release: 6%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz
@ -9,6 +9,12 @@ URL: https://www.nongnu.org/dmidecode/
BuildRequires: gcc make BuildRequires: gcc make
ExclusiveArch: %{ix86} x86_64 ia64 aarch64 ExclusiveArch: %{ix86} x86_64 ia64 aarch64
Patch0: 0001-dmidecode-Add-new-system-slot-types-from-SMBIOS-spec.patch
Patch1: 0002-dmidecode-Add-new-processor-characteristics-bits-from-SMBIOS-s.patch
Patch2: 0003-dmidecode-Missing-comma-in-the-dmi_slot_type.patch
Patch3: 0004-dmidecode-Skip-details-of-uninstalled-memory-modules.patch
Patch4: 0005-dmidecode-Add-new-processor-upgrades-from-SMBIOS-spec-3.4.0.patch
%description %description
dmidecode reports information about x86 & ia64 hardware as described in the dmidecode reports information about x86 & ia64 hardware as described in the
system BIOS according to the SMBIOS/DMI standard. This information system BIOS according to the SMBIOS/DMI standard. This information
@ -22,6 +28,11 @@ I/O ports (e.g. serial, parallel, USB).
%prep %prep
%setup -q %setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build %build
%make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
@ -41,6 +52,12 @@ I/O ports (e.g. serial, parallel, USB).
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Mon Dec 06 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-6
- Resolves: rhbz#2024078
* Thu Nov 04 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-4
- Resolves: rhbz#1996988
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.3-2 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.3-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688 Related: rhbz#1991688