From 0a82910f9ec59a63e9b658ce9061c0b36c147ec1 Mon Sep 17 00:00:00 2001 From: YangengLiu Date: Fri, 5 Dec 2025 22:18:50 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=9B=B4=E6=96=B0Dell=E4=B8=93?= =?UTF-8?q?=E7=94=A8DMI=E7=B1=BB=E5=9E=8B=202=E3=80=81=E6=9B=B4=E6=96=B0HP?= =?UTF-8?q?E=E8=8A=AF=E7=89=87=E6=A0=87=E8=AF=86=E7=AC=A6=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B=E3=80=82=203?= =?UTF-8?q?=E3=80=81=E6=8A=8Aout=5Fof=5Fspec=E7=A7=BB=E5=88=B0=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E5=A4=B4=E6=96=87=E4=BB=B6=E9=87=8C=EF=BC=8C=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=BB=84=E4=BB=B6=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e-out_of_spec-into-the-common-header.patch | 47 ++++++++ dmidecode.spec | 16 ++- ...em-Decode-Dell-specific-DMI-type-177.patch | 54 +++++++++ ...em-Decode-Dell-specific-DMI-type-218.patch | 103 ++++++++++++++++++ dmioem-Update-HPE-OEM-Type-203.patch | 30 +++++ dmioem-Update-HPE-OEM-Type-224.patch | 28 +++++ dmioem-Update-HPE-OEM-Type-238.patch | 43 ++++++++ 7 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 dmidecode-Move-out_of_spec-into-the-common-header.patch create mode 100644 dmioem-Decode-Dell-specific-DMI-type-177.patch create mode 100644 dmioem-Decode-Dell-specific-DMI-type-218.patch create mode 100644 dmioem-Update-HPE-OEM-Type-203.patch create mode 100644 dmioem-Update-HPE-OEM-Type-224.patch create mode 100644 dmioem-Update-HPE-OEM-Type-238.patch diff --git a/dmidecode-Move-out_of_spec-into-the-common-header.patch b/dmidecode-Move-out_of_spec-into-the-common-header.patch new file mode 100644 index 0000000..a44d9c4 --- /dev/null +++ b/dmidecode-Move-out_of_spec-into-the-common-header.patch @@ -0,0 +1,47 @@ +From d5af407ae937b0ab26b72e8c250112d5a8543a63 Mon Sep 17 00:00:00 2001 +From: Armin Wolf +Date: Fri, 26 Jul 2024 10:56:00 +0200 +Subject: dmidecode: Move out_of_spec into the common header + +Other components like dmioem might also encounter situations where +they encounter invalid values. In such cases, using a standard string +for displaying invalid values is needed. + +Move out_of_spec into the common header file so other components like +dmioem can use it. + +Signed-off-by: Armin Wolf +Signed-off-by: Jean Delvare +--- + dmidecode.c | 1 - + dmidecode.h | 2 ++ + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 45a6c06..547cb48 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -85,7 +85,6 @@ + #include "dmioem.h" + #include "dmioutput.h" + +-#define out_of_spec "" + static const char *bad_index = ""; + + enum cpuid_type cpuid_type = cpuid_none; +diff --git a/dmidecode.h b/dmidecode.h +index e03c957..b634b55 100644 +--- a/dmidecode.h ++++ b/dmidecode.h +@@ -23,6 +23,8 @@ + + #include "types.h" + ++#define out_of_spec "" ++ + struct dmi_header + { + u8 type; +-- +2.47.0 + diff --git a/dmidecode.spec b/dmidecode.spec index 114cae2..53a4f53 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,6 +1,6 @@ Name: dmidecode Version: 3.6 -Release: 1 +Release: 2 Epoch: 1 Summary: DMI data report tool @@ -9,6 +9,12 @@ URL: https://www.nongnu.org/dmidecode/ Source0: https://download.savannah.gnu.org/releases/dmidecode/%{name}-%{version}.tar.xz Patch1: bugfix-compat_uuid.patch +Patch2: dmioem-Update-HPE-OEM-Type-238.patch +Patch3: dmioem-Decode-Dell-specific-DMI-type-218.patch +Patch4: dmioem-Decode-Dell-specific-DMI-type-177.patch +Patch5: dmioem-Update-HPE-OEM-Type-203.patch +Patch6: dmioem-Update-HPE-OEM-Type-224.patch +Patch7: dmidecode-Move-out_of_spec-into-the-common-header.patch BuildRequires: make gcc xz @@ -49,6 +55,14 @@ make %{?_smp_mflags} CFLAGS="%{__global_cflags}" LDFLAGS="%{__global_ldflags}" %{_mandir}/man8/*.8* %changelog +* Fri Dec 05 2025 YangengLiu - 1:3.6-2 +- Update HPE OEM Type 238 (New field: PCI Segment Number) +- Decode Dell-specific DMI type 218 +- Decode Dell-specific DMI type 177 +- Update HPE OEM Type 203 (Update device type) +- Update HPE OEM Type 224 (update chip identifier) +- dmidecode: Move out_of_spec into the common header. + * Wed Jan 08 2025 Funda Wang - 1:3.6-1 - update to 3.6 diff --git a/dmioem-Decode-Dell-specific-DMI-type-177.patch b/dmioem-Decode-Dell-specific-DMI-type-177.patch new file mode 100644 index 0000000..27d331a --- /dev/null +++ b/dmioem-Decode-Dell-specific-DMI-type-177.patch @@ -0,0 +1,54 @@ +From c86cb489d3b5cb1ea371546f4ca9a485f4c2bee6 Mon Sep 17 00:00:00 2001 +From: Armin Wolf +Date: Fri, 5 Jul 2024 14:30:11 +0200 +Subject: dmioem: Decode Dell-specific DMI type 177 + +OEM DMI type 177 contains various BIOS flags used by the +dell-wmi-descriptor driver. Include the available information in the +output of dmidecode. + +Signed-off-by: Armin Wolf +Signed-off-by: Jean Delvare +--- + dmioem.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/dmioem.c b/dmioem.c +index b6b0f49..62fe10e 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -136,6 +136,14 @@ static int dmi_decode_acer(const struct dmi_header *h) + * Dell-specific data structures are decoded here. + */ + ++static void dmi_dell_bios_flags(u64 flags) ++{ ++ /* ++ * TODO: The meaning of the other bits is unknown. ++ */ ++ pr_attr("ACPI WMI Supported", "%s", (flags.l & (1 << 1)) ? "Yes" : "No"); ++} ++ + static void dmi_dell_token_interface(const struct dmi_header *h) + { + int tokens = (h->length - 0x0B) / 0x06; +@@ -165,8 +173,16 @@ static void dmi_dell_token_interface(const struct dmi_header *h) + + static int dmi_decode_dell(const struct dmi_header *h) + { ++ u8 *data = h->data; ++ + switch (h->type) + { ++ case 177: ++ pr_handle_name("Dell BIOS Flags"); ++ if (h->length < 0x0C) break; ++ dmi_dell_bios_flags(QWORD(data + 0x04)); ++ break; ++ + case 218: + pr_handle_name("Dell Token Interface"); + if (h->length < 0x0B) break; +-- +2.47.0 + diff --git a/dmioem-Decode-Dell-specific-DMI-type-218.patch b/dmioem-Decode-Dell-specific-DMI-type-218.patch new file mode 100644 index 0000000..54c6980 --- /dev/null +++ b/dmioem-Decode-Dell-specific-DMI-type-218.patch @@ -0,0 +1,103 @@ +From cb1100560615c2d015f3917fe48ea5b244e8fe31 Mon Sep 17 00:00:00 2001 +From: Armin Wolf +Date: Fri, 5 Jul 2024 14:30:05 +0200 +Subject: dmioem: Decode Dell-specific DMI type 218 + +OEM DMI type 218 is used by the dell-smbios-base driver to retrieve +information about the Dell Token Interface. Include the available +information in the output of dmidecode. + +Signed-off-by: Armin Wolf +Signed-off-by: Jean Delvare +--- + dmioem.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 53 insertions(+) + +diff --git a/dmioem.c b/dmioem.c +index 144bf3f..b6b0f49 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -38,6 +38,7 @@ enum DMI_VENDORS + { + VENDOR_UNKNOWN, + VENDOR_ACER, ++ VENDOR_DELL, + VENDOR_HP, + VENDOR_HPE, + VENDOR_IBM, +@@ -56,6 +57,8 @@ void dmi_set_vendor(const char *v, const char *p) + { + const struct { const char *str; enum DMI_VENDORS id; } vendor[] = { + { "Acer", VENDOR_ACER }, ++ { "Dell Computer Corporation", VENDOR_DELL }, ++ { "Dell Inc.", VENDOR_DELL }, + { "HP", VENDOR_HP }, + { "Hewlett-Packard", VENDOR_HP }, + { "HPE", VENDOR_HPE }, +@@ -129,6 +132,54 @@ static int dmi_decode_acer(const struct dmi_header *h) + return 1; + } + ++/* ++ * Dell-specific data structures are decoded here. ++ */ ++ ++static void dmi_dell_token_interface(const struct dmi_header *h) ++{ ++ int tokens = (h->length - 0x0B) / 0x06; ++ u8 *data = h->data; ++ u8 *token; ++ ++ pr_attr("Command I/O Address", "0x%04x", WORD(data + 0x04)); ++ pr_attr("Command I/O Code", "0x%02x", data[0x06]); ++ pr_attr("Supported Command Classes Bitmap", "0x%08x", DWORD(data + 0x07)); ++ ++ /* ++ * Final token is a terminator, so we ignore it. ++ */ ++ if (tokens <= 1) ++ return; ++ ++ pr_list_start("Tokens", NULL); ++ for (int i = 0; i < tokens - 1; i++) ++ { ++ token = data + 0x0B + 0x06 * i; ++ pr_list_item("0x%04hx (location 0x%04hx, value 0x%04hx)", ++ WORD(token + 0x00), WORD(token + 0x02), ++ WORD(token + 0x04)); ++ } ++ pr_list_end(); ++} ++ ++static int dmi_decode_dell(const struct dmi_header *h) ++{ ++ switch (h->type) ++ { ++ case 218: ++ pr_handle_name("Dell Token Interface"); ++ if (h->length < 0x0B) break; ++ dmi_dell_token_interface(h); ++ break; ++ ++ default: ++ return 0; ++ } ++ ++ return 1; ++} ++ + /* + * HPE-specific data structures are decoded here. + * +@@ -1708,6 +1759,8 @@ int dmi_decode_oem(const struct dmi_header *h) + return dmi_decode_hp(h); + case VENDOR_ACER: + return dmi_decode_acer(h); ++ case VENDOR_DELL: ++ return dmi_decode_dell(h); + case VENDOR_IBM: + case VENDOR_LENOVO: + return dmi_decode_ibm_lenovo(h); +-- +2.47.0 + diff --git a/dmioem-Update-HPE-OEM-Type-203.patch b/dmioem-Update-HPE-OEM-Type-203.patch new file mode 100644 index 0000000..b10c22e --- /dev/null +++ b/dmioem-Update-HPE-OEM-Type-203.patch @@ -0,0 +1,30 @@ +From 6ef4bf27fcf0904ab1e5cebbe427e0afa50f6a90 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Fri, 5 Jul 2024 14:39:49 +0200 +Subject: dmioem: Update HPE OEM Type 203 + +Update device type. + +Signed-off-by: Jerry Hoemann +Signed-off-by: Jean Delvare +--- + dmioem.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dmioem.c b/dmioem.c +index 62fe10e..c8f4a50 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -328,7 +328,8 @@ static void dmi_hp_203_devtyp(const char *fname, unsigned int code) + "Dynamic Smart Array Controller", + "File", + "NVME Hard Drive", +- "NVDIMM" /* 0x11 */ ++ "NVDIMM", /* 0x11 */ ++ "Embedded GPU" + }; + + if (code < ARRAY_SIZE(type)) +-- +2.47.0 + diff --git a/dmioem-Update-HPE-OEM-Type-224.patch b/dmioem-Update-HPE-OEM-Type-224.patch new file mode 100644 index 0000000..6b826e4 --- /dev/null +++ b/dmioem-Update-HPE-OEM-Type-224.patch @@ -0,0 +1,28 @@ +From 2afb0fcb568a7078b35b2d115af1277300959521 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Fri, 5 Jul 2024 14:39:54 +0200 +Subject: dmioem: Update HPE OEM Type 224 + +Update chip identifier. + +Signed-off-by: Jerry Hoemann +Signed-off-by: Jean Delvare +--- + dmioem.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dmioem.c b/dmioem.c +index c8f4a50..d35ccb6 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -613,6 +613,7 @@ static void dmi_hp_224_chipid(u16 code) + "Nationz TPM", + "STMicroGen10 Plus TPM", + "STMicroGen11 TPM", /* 0x05 */ ++ "STMicroGen12 TPM", + }; + if ((code & 0xff) < ARRAY_SIZE(chipid)) + str = chipid[code & 0xff]; +-- +2.47.0 + diff --git a/dmioem-Update-HPE-OEM-Type-238.patch b/dmioem-Update-HPE-OEM-Type-238.patch new file mode 100644 index 0000000..eb0070a --- /dev/null +++ b/dmioem-Update-HPE-OEM-Type-238.patch @@ -0,0 +1,43 @@ +From 190a23ecfd6d743cb6efbc04bb4d95f0584fd68d Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Thu, 16 May 2024 13:12:43 +0200 +Subject: dmioem: Update HPE OEM Type 238 + +New field: PCI Segment Number. + +Signed-off-by: Jerry Hoemann +Signed-off-by: Jean Delvare +--- + dmioem.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/dmioem.c b/dmioem.c +index 2f1f9f6..144bf3f 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -1346,14 +1346,20 @@ static int dmi_decode_hp(const struct dmi_header *h) + * 0x0C | Parent Hub | BYTE | Instance number of internal Hub + * 0x0D | Port Speed | BYTE | Enumerated value of speed configured by BIOS + * 0x0E | Device Path| STRING| UEFI Device Path of USB endpoint ++ * 0x0F | PCI Seg | WORD | PCI Segment number of the USB controller + */ + if (gen < G9) return 0; + pr_handle_name("%s Proliant USB Port Connector Correlation Record", company); + if (h->length < 0x0F) break; + if (!(opt.flags & FLAG_QUIET)) + pr_attr("Associated Handle", "0x%04X", WORD(data + 0x4)); +- pr_attr("PCI Device", "%02x:%02x.%x", data[0x6], +- data[0x7] >> 3, data[0x7] & 0x7); ++ if (h->length < 0x11) ++ pr_attr("PCI Device", "%02x:%02x.%x", data[0x6], ++ data[0x7] >> 3, data[0x7] & 0x7); ++ else ++ pr_attr("PCI Device", "%04x:%02x:%02x.%x", ++ WORD(data + 0xF), data[0x6], ++ data[0x7] >> 3, data[0x7] & 0x7); + dmi_hp_238_loc("Location", data[0x8]); + dmi_hp_238_flags("Management Port", WORD(data + 0x9)); + pr_attr("Port Instance", "%d", data[0xB]); +-- +2.47.0 + -- Gitee