diff --git a/dmidecode-fix-tpm-device-firmware-version.patch b/dmidecode-fix-tpm-device-firmware-version.patch new file mode 100644 index 0000000..56d3733 --- /dev/null +++ b/dmidecode-fix-tpm-device-firmware-version.patch @@ -0,0 +1,26 @@ +From: Jean Delvare +Date: Wed, 31 Jan 2018 18:52:47 +0100 +Subject: dmidecode: Fix firmware version of TPM device +Patch-mainline: yes +Git-commit: 174387405e98cd94c627832ae23abcb9be7e5623 + +Both the operator (detected by clang, reported by Xorg) and the mask +for the minor firmware version field of TPM devices were wrong. + +Signed-off-by: Jean Delvare +Fixes: 48a8132058a0 ("dmidecode: Add support for structure type 43 (TPM Device)") +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- dmidecode-3.1.orig/dmidecode.c 2018-04-17 11:52:35.240556354 +0200 ++++ dmidecode-3.1/dmidecode.c 2018-04-17 11:52:39.787614142 +0200 +@@ -4506,7 +4506,7 @@ static void dmi_decode(const struct dmi_ + case 0x02: + printf("\tFirmware Revision: %u.%u\n", + DWORD(data + 0x0A) >> 16, +- DWORD(data + 0x0A) && 0xFF); ++ DWORD(data + 0x0A) & 0xFFFF); + /* + * We skip the next 4 bytes, as their + * format is not standardized and their diff --git a/dmidecode.changes b/dmidecode.changes index 6fb5422..29e7a5e 100644 --- a/dmidecode.changes +++ b/dmidecode.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 17 09:54:57 UTC 2018 - jdelvare@suse.de + +- dmioem-reflect-hpe-new-company-name.patch: Reflect HPE's new + company name. +- dmidecode-fix-tpm-device-firmware-version.patch: Fix firmware + version of TPM device. +- dmioem-fix-hpe-type-219-uefi-flag.patch: Fix the reporting of + HP/HPE UEFI feature. + ------------------------------------------------------------------- Mon Jul 17 14:43:37 CEST 2017 - jdelvare@suse.de diff --git a/dmidecode.spec b/dmidecode.spec index 8ef59a5..e78ed5b 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,7 +1,7 @@ # # spec file for package dmidecode # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,9 @@ Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{vers # would be, but tarball is signed by someone else without signatures. # https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode # Source2: %{name}.keyring +Patch1: dmioem-reflect-hpe-new-company-name.patch +Patch2: dmidecode-fix-tpm-device-firmware-version.patch +Patch3: dmioem-fix-hpe-type-219-uefi-flag.patch Provides: pmtools:%{_sbindir}/dmidecode Obsoletes: pmtools < 20071117 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -50,6 +53,9 @@ the BIOS told it to. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build make CFLAGS="%{optflags}" %{?_smp_mflags} diff --git a/dmioem-fix-hpe-type-219-uefi-flag.patch b/dmioem-fix-hpe-type-219-uefi-flag.patch new file mode 100644 index 0000000..fec2b63 --- /dev/null +++ b/dmioem-fix-hpe-type-219-uefi-flag.patch @@ -0,0 +1,32 @@ +From: Jerry Hoemann +Date: Wed, 11 Apr 2018 14:33:20 +0200 +Subject: dmioem: decode HPE UEFI type 219 Misc Features +Patch-mainline: yes +Git-commit: 2ba4fab210e23cc97db57217af9a6f3b35a9b666 + +The incorrect "Misc Feature" bit in type 219 table was being used to +identify that the platform is capable of booting with UEFI. + +For corresponding kernel change please see: + + commit(c42cbe41727a) + +in linux. + +Signed-off-by: Jerry Hoemann +Signed-off-by: Jean Delvare +--- + dmioem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- dmidecode-3.1.orig/dmioem.c 2018-04-17 11:52:32.405520323 +0200 ++++ dmidecode-3.1/dmioem.c 2018-04-17 11:52:41.919641237 +0200 +@@ -226,7 +226,7 @@ static int dmi_decode_hp(const struct dm + feat = DWORD(data + 0x10); + printf("\tMisc. Features: 0x%08x\n", feat); + printf("\t\tiCRU: %s\n", feat & 0x0001 ? "Yes" : "No"); +- printf("\t\tUEFI: %s\n", feat & 0x0408 ? "Yes" : "No"); ++ printf("\t\tUEFI: %s\n", feat & 0x1400 ? "Yes" : "No"); + break; + + default: diff --git a/dmioem-reflect-hpe-new-company-name.patch b/dmioem-reflect-hpe-new-company-name.patch new file mode 100644 index 0000000..c75bbf4 --- /dev/null +++ b/dmioem-reflect-hpe-new-company-name.patch @@ -0,0 +1,137 @@ +From: Jerry Hoemann +Date: Wed, 13 Sep 2017 15:54:22 -0600 +Subject: dmioem: Reflect HPE's new company name +Patch-mainline: yes +Git-commit: ee07a1b4249560d620d05194eb8ff61b40d3ce23 + +After Hewlett Packard Enterprise split from Hewlett-Packard, DMI OEM +tables reflect the new company name. Gen10 and subsequent systems will +use HPE. Gen9 and prior systems continue to use the old "HP" name. + +Signed-off-by: Jerry Hoemann +Signed-off-by: Jean Delvare +--- + dmioem.c | 32 +++++++++++++++++++------------- + 1 file changed, 19 insertions(+), 13 deletions(-) + +--- dmidecode-3.1.orig/dmioem.c 2017-05-23 15:34:14.000000000 +0200 ++++ dmidecode-3.1/dmioem.c 2018-04-17 11:52:32.405520323 +0200 +@@ -35,6 +35,7 @@ enum DMI_VENDORS + VENDOR_UNKNOWN, + VENDOR_HP, + VENDOR_ACER, ++ VENDOR_HPE, + }; + + static enum DMI_VENDORS dmi_vendor = VENDOR_UNKNOWN; +@@ -58,12 +59,14 @@ void dmi_set_vendor(const char *s) + + if (strncmp(s, "HP", len) == 0 || strncmp(s, "Hewlett-Packard", len) == 0) + dmi_vendor = VENDOR_HP; ++ else if (strncmp(s, "HPE", len) == 0 || strncmp(s, "Hewlett Packard Enterprise", len) == 0) ++ dmi_vendor = VENDOR_HPE; + else if (strncmp(s, "Acer", len) == 0) + dmi_vendor = VENDOR_ACER; + } + + /* +- * HP-specific data structures are decoded here. ++ * HPE-specific data structures are decoded here. + * + * Code contributed by John Cagle and Tyler Bell. + */ +@@ -98,14 +101,15 @@ static int dmi_decode_hp(const struct dm + u8 *data = h->data; + int nic, ptr; + u32 feat; ++ const char *company = (dmi_vendor == VENDOR_HP) ? "HP" : "HPE"; + + switch (h->type) + { + case 204: + /* +- * Vendor Specific: HP ProLiant System/Rack Locator ++ * Vendor Specific: HPE ProLiant System/Rack Locator + */ +- printf("HP ProLiant System/Rack Locator\n"); ++ printf("%s ProLiant System/Rack Locator\n", company); + if (h->length < 0x0B) break; + printf("\tRack Name: %s\n", dmi_string(h, data[0x04])); + printf("\tEnclosure Name: %s\n", dmi_string(h, data[0x05])); +@@ -119,7 +123,7 @@ static int dmi_decode_hp(const struct dm + case 209: + case 221: + /* +- * Vendor Specific: HP ProLiant NIC MAC Information ++ * Vendor Specific: HPE ProLiant NIC MAC Information + * + * This prints the BIOS NIC number, + * PCI bus/device/function, and MAC address +@@ -137,9 +141,10 @@ static int dmi_decode_hp(const struct dm + * + * Type 221: is deprecated in the latest docs + */ +- printf(h->type == 221 ? +- "HP BIOS iSCSI NIC PCI and MAC Information\n" : +- "HP BIOS PXE NIC PCI and MAC Information\n"); ++ printf("%s %s\n", company, ++ h->type == 221 ? ++ "BIOS iSCSI NIC PCI and MAC Information" : ++ "BIOS PXE NIC PCI and MAC Information"); + nic = 1; + ptr = 4; + while (h->length >= ptr + 8) +@@ -155,7 +160,7 @@ static int dmi_decode_hp(const struct dm + + case 233: + /* +- * Vendor Specific: HP ProLiant NIC MAC Information ++ * Vendor Specific: HPE ProLiant NIC MAC Information + * + * This prints the BIOS NIC number, + * PCI bus/device/function, and MAC address +@@ -171,7 +176,7 @@ static int dmi_decode_hp(const struct dm + * 0x08 | MAC | 32B | MAC addr padded w/ 0s + * 0x28 | Port No| BYTE | Each NIC maps to a Port + */ +- printf("HP BIOS PXE NIC PCI and MAC Information\n"); ++ printf("%s BIOS PXE NIC PCI and MAC Information\n", company); + if (h->length < 0x0E) break; + /* If the record isn't long enough, we don't have an ID + * use 0xFF to use the internal counter. +@@ -183,11 +188,11 @@ static int dmi_decode_hp(const struct dm + + case 212: + /* +- * Vendor Specific: HP 64-bit CRU Information ++ * Vendor Specific: HPE 64-bit CRU Information + * + * Source: hpwdt kernel driver + */ +- printf("HP 64-bit CRU Information\n"); ++ printf("%s 64-bit CRU Information\n", company); + if (h->length < 0x18) break; + printf("\tSignature: 0x%08x", DWORD(data + 0x04)); + if (is_printable(data + 0x04, 4)) +@@ -208,11 +213,11 @@ static int dmi_decode_hp(const struct dm + + case 219: + /* +- * Vendor Specific: HP ProLiant Information ++ * Vendor Specific: HPE ProLiant Information + * + * Source: hpwdt kernel driver + */ +- printf("HP ProLiant Information\n"); ++ printf("%s ProLiant Information\n", company); + if (h->length < 0x08) break; + printf("\tPower Features: 0x%08x\n", DWORD(data + 0x04)); + if (h->length < 0x0C) break; +@@ -281,6 +286,7 @@ int dmi_decode_oem(const struct dmi_head + switch (dmi_vendor) + { + case VENDOR_HP: ++ case VENDOR_HPE: + return dmi_decode_hp(h); + case VENDOR_ACER: + return dmi_decode_acer(h);