diff --git a/.dmidecode.metadata b/.dmidecode.metadata index 324f33d..7b3baa2 100644 --- a/.dmidecode.metadata +++ b/.dmidecode.metadata @@ -1 +1 @@ -db8f00fe743bf563db99fa4ba7185df78e492762 SOURCES/dmidecode-3.0.tar.xz +d76b6897fda070965f61eff37c3f6bcf63b2b04d SOURCES/dmidecode-3.1.tar.xz diff --git a/.gitignore b/.gitignore index 030ecff..205324a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dmidecode-3.0.tar.xz +SOURCES/dmidecode-3.1.tar.xz diff --git a/SOURCES/0001-Add-no-sysfs-option-description-to-h-output.patch b/SOURCES/0001-Add-no-sysfs-option-description-to-h-output.patch deleted file mode 100644 index 3b3167c..0000000 --- a/SOURCES/0001-Add-no-sysfs-option-description-to-h-output.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 33b5aafc6ee6b5de9f2526fb1cf4b14d1e16e4f0 Mon Sep 17 00:00:00 2001 -From: Roy Franz -Date: Thu, 1 Oct 2015 08:41:43 +0200 -Subject: [PATCH 1/9] Add "--no-sysfs" option description to -h output - -A description of --no-sysfs was not added to the output of "-h" when -the feature was added, so add it now. ---- - CHANGELOG | 4 ++++ - dmiopt.c | 1 + - 2 files changed, 5 insertions(+) - -diff --git a/CHANGELOG b/CHANGELOG -index f0a51a4..42d815c 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,7 @@ -+2015-10-01 Roy Franz -+ -+ * dmiopt.c: Add "--no-sysfs" option description to -h output. -+ - 2015-09-03 Jean Delvare - - * version.h: Set version to 3.0. -diff --git a/dmiopt.c b/dmiopt.c -index 0d142d2..de607f4 100644 ---- a/dmiopt.c -+++ b/dmiopt.c -@@ -314,6 +314,7 @@ void print_help(void) - " -u, --dump Do not decode the entries\n" - " --dump-bin FILE Dump the DMI data to a binary file\n" - " --from-dump FILE Read the DMI data from a binary file\n" -+ " --no-sysfs Do not attempt to read DMI data from sysfs files\n" - " -V, --version Display the version and exit\n"; - - printf("%s", help); --- -2.5.0 - diff --git a/SOURCES/0001-dmidecode-Add-system-family-direct-string-option.patch b/SOURCES/0001-dmidecode-Add-system-family-direct-string-option.patch new file mode 100644 index 0000000..a68b1bf --- /dev/null +++ b/SOURCES/0001-dmidecode-Add-system-family-direct-string-option.patch @@ -0,0 +1,42 @@ +From aad65d8a53a00d5426990fc8b5af9d749fc879b9 Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Thu, 1 Jun 2017 14:21:38 +0300 +Subject: [PATCH 01/10] dmidecode: Add system-family direct string option + +This allows users to print system-family using '-s' option. + +Signed-off-by: Mika Westerberg +Signed-off-by: Jean Delvare +--- + dmiopt.c | 1 + + man/dmidecode.8 | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dmiopt.c b/dmiopt.c +index da42546..a36cf16 100644 +--- a/dmiopt.c ++++ b/dmiopt.c +@@ -156,6 +156,7 @@ static const struct string_keyword opt_string_keyword[] = { + { "system-version", 1, 0x06 }, + { "system-serial-number", 1, 0x07 }, + { "system-uuid", 1, 0x08 }, /* dmi_system_uuid() */ ++ { "system-family", 1, 0x1a }, + { "baseboard-manufacturer", 2, 0x04 }, + { "baseboard-product-name", 2, 0x05 }, + { "baseboard-version", 2, 0x06 }, +diff --git a/man/dmidecode.8 b/man/dmidecode.8 +index bef204e..e3b6b2a 100644 +--- a/man/dmidecode.8 ++++ b/man/dmidecode.8 +@@ -74,7 +74,7 @@ Only display the value of the \s-1DMI\s0 string identified by \fBKEYWORD\fR. + \fBbios-version\fR, \fBbios-release-date\fR, + \fBsystem-manufacturer\fR, \fBsystem-product-name\fR, + \fBsystem-version\fR, \fBsystem-serial-number\fR, +-\fBsystem-uuid\fR, ++\fBsystem-uuid\fR, \fBsystem-family\fR, + \fBbaseboard-manufacturer\fR, \fBbaseboard-product-name\fR, + \fBbaseboard-version\fR, \fBbaseboard-serial-number\fR, + \fBbaseboard-asset-tag\fR, \fBchassis-manufacturer\fR, +-- +2.9.5 + diff --git a/SOURCES/0001-dmidecode-Fix-firmware-version-of-TPM-device.patch b/SOURCES/0001-dmidecode-Fix-firmware-version-of-TPM-device.patch new file mode 100644 index 0000000..9709056 --- /dev/null +++ b/SOURCES/0001-dmidecode-Fix-firmware-version-of-TPM-device.patch @@ -0,0 +1,30 @@ +From 174387405e98cd94c627832ae23abcb9be7e5623 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Wed, 31 Jan 2018 18:52:47 +0100 +Subject: [PATCH 1/3] dmidecode: Fix firmware version of TPM device + +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(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 87faaa9..a593170 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -4511,7 +4511,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver) + 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 +-- +2.9.5 + diff --git a/SOURCES/0001-dmidecode-Hide-irrelevant-fixup-message.patch b/SOURCES/0001-dmidecode-Hide-irrelevant-fixup-message.patch deleted file mode 100644 index 7ae827d..0000000 --- a/SOURCES/0001-dmidecode-Hide-irrelevant-fixup-message.patch +++ /dev/null @@ -1,52 +0,0 @@ -From cff11afa886a0147d734b650755d232b5e7f2099 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Tue, 3 May 2016 15:32:21 +0200 -Subject: [PATCH 1/9] dmidecode: Hide irrelevant fixup message - -Only display the message about type 34 length fixup if the entry in -question is going to be displayed. Otherwise it's only confusing. - -This fixes bug #109024: -http://savannah.nongnu.org/support/?109024 - -Fixes: 3f70b3515d91 ("dmidecode: Fix up invalid DMI type 34 structure length") ---- - dmidecode.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index 0c26685..84c18e1 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -2949,7 +2949,7 @@ static void dmi_64bit_memory_error_address(u64 code) - * first 5 characters of the device name to be trimmed. It's easy to - * check and fix, so do it, but warn. - */ --static void dmi_fixup_type_34(struct dmi_header *h) -+static void dmi_fixup_type_34(struct dmi_header *h, int display) - { - u8 *p = h->data; - -@@ -2957,7 +2957,9 @@ static void dmi_fixup_type_34(struct dmi_header *h) - if (h->length == 0x10 - && is_printable(p + 0x0B, 0x10 - 0x0B)) - { -- printf("Invalid entry length (%u). Fixed up to %u.\n", 0x10, 0x0B); -+ if (!(opt.flags & FLAG_QUIET) && display) -+ printf("Invalid entry length (%u). Fixed up to %u.\n", -+ 0x10, 0x0B); - h->length = 0x0B; - } - } -@@ -4446,7 +4448,7 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, u16 ver, u32 flags) - - /* Fixup a common mistake */ - if (h.type == 34) -- dmi_fixup_type_34(&h); -+ dmi_fixup_type_34(&h, display); - - /* look for the next handle */ - next = data + h.length; --- -2.10.2 - diff --git a/SOURCES/0002-Avoid-SIGBUS-on-mmap-failure.patch b/SOURCES/0002-Avoid-SIGBUS-on-mmap-failure.patch deleted file mode 100644 index cd9a957..0000000 --- a/SOURCES/0002-Avoid-SIGBUS-on-mmap-failure.patch +++ /dev/null @@ -1,74 +0,0 @@ -From c081fa410e7c466df4b3b257e7b974b71fb7f250 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Wed, 14 Oct 2015 14:37:04 +0200 -Subject: [PATCH 2/9] Avoid SIGBUS on mmap failure - -mmap will fail with SIGBUS if trying to map a non-existent portion of -a file. While this should never happen with /dev/mem, it can happen if -passing a regular file with option -d. While people should no longer -do that, failure gracefully seems better than crashing. So check for -the file size before calling mmap. - -This closes bug #46066: -http://savannah.nongnu.org/bugs/?46066 ---- - CHANGELOG | 6 ++++++ - util.c | 21 +++++++++++++++++++++ - 2 files changed, 27 insertions(+) - -diff --git a/CHANGELOG b/CHANGELOG -index 42d815c..aa1c28f 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,9 @@ -+2015-10-14 Jean Delvare -+ -+ * util.c: Avoid SIGBUS on mmap failure. -+ This fixes Savannah bug #46066: -+ https://savannah.nongnu.org/bugs/?46066 -+ - 2015-10-01 Roy Franz - - * dmiopt.c: Add "--no-sysfs" option description to -h output. -diff --git a/util.c b/util.c -index 8cafe5c..5795d02 100644 ---- a/util.c -+++ b/util.c -@@ -152,6 +152,7 @@ void *mem_chunk(off_t base, size_t len, const char *devmem) - void *p; - int fd; - #ifdef USE_MMAP -+ struct stat statbuf; - off_t mmoffset; - void *mmp; - #endif -@@ -169,6 +170,26 @@ void *mem_chunk(off_t base, size_t len, const char *devmem) - } - - #ifdef USE_MMAP -+ if (fstat(fd, &statbuf) == -1) -+ { -+ fprintf(stderr, "%s: ", devmem); -+ perror("stat"); -+ free(p); -+ return NULL; -+ } -+ -+ /* -+ * mmap() will fail with SIGBUS if trying to map beyond the end of -+ * the file. -+ */ -+ if (S_ISREG(statbuf.st_mode) && base + (off_t)len > statbuf.st_size) -+ { -+ fprintf(stderr, "mmap: Can't map beyond end of file %s\n", -+ devmem); -+ free(p); -+ return NULL; -+ } -+ - #ifdef _SC_PAGESIZE - mmoffset = base % sysconf(_SC_PAGESIZE); - #else --- -2.5.0 - diff --git a/SOURCES/0002-Goodbye-CHANGELOG-welcome-NEWS.patch b/SOURCES/0002-Goodbye-CHANGELOG-welcome-NEWS.patch new file mode 100644 index 0000000..5cc94a8 --- /dev/null +++ b/SOURCES/0002-Goodbye-CHANGELOG-welcome-NEWS.patch @@ -0,0 +1,1774 @@ +From 82a34ddbc524ad17e13cd873c223f20d14a5c705 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Sat, 8 Jul 2017 11:41:15 +0200 +Subject: [PATCH 02/10] Goodbye CHANGELOG, welcome NEWS + +The CHANGELOG file as it exists today is essentially redundant with +git log. It's not really user friendly, and duplicates the work on +the committer side. + +Delete that file, and replace it with a more structured NEWS file, +listing only the most relevant changes in each version. The contents +would be pretty much the same as the release announcements. + +This initial version covers most past releases. + +--- + CHANGELOG | 1614 ------------------------------------------------------------- + NEWS | 123 +++++ + 2 files changed, 123 insertions(+), 1614 deletions(-) + delete mode 100644 CHANGELOG + create mode 100644 NEWS + +diff --git a/CHANGELOG b/CHANGELOG +deleted file mode 100644 +index 6f9123d..0000000 +--- a/CHANGELOG ++++ /dev/null +@@ -1,1614 +0,0 @@ +-2015-09-03 Jean Delvare +- +- * version.h: Set version to 3.1. +- +-2017-05-23 Jean Delvare +- +- * dmidecode.c, dmiopt.c: Add a new option to extract OEM strings, like +- we already have for many other strings. +- * dmidecode.8: Document the new option. +- +-2017-04-27 Jean Delvare +- +- Update to support SMBIOS specification version 3.1.1. +- +- * dmidecode.c: Add support for 3-digit versions. +- * dmidecode.c: Add new enumerated values for processors (DMI type 4). +- +-2017-04-27 Jean Delvare +- +- Update to support SMBIOS specification version 3.1.0. +- +- * dmidecode.c: Add support for extended BIOS ROM size (DMI type 0). +- * dmidecode.c: Add new enumerated values for chassis types +- (DMI type 3). +- * dmidecode.c: Add new enumerated values for processors (DMI type 4). +- * dmidecode.c: Don't assume 8-bit processor family in dmi_processor_id +- (DMI type 4). +- * dmidecode.c: Decode the MIDR register on ARM processors +- (DMI type 4). +- * dmidecode.c: Add support for large cache sizes (DMI type 7). +- * dmidecode.c: Add Mini PCIe system slot enumerated values +- (DMI type 9). +- * dmidecode.c: Clarify the memory speed unit (DMI type 17). +- * dmidecode.c: Add support for structure type 43 (TPM Device). +- +-2017-04-11 Jean Delvare +- +- * util.c: Don't leak a file descriptor in function read_file. +- * util.c, util.c, dmidecode.c: Let callers pass an offset to function +- read_file. +- * dmidecode.c: Fix reading from SMBIOS 3 dump files using a 64-bit +- entry point. +- +-2017-04-10 Jean Delvare +- +- * dmidecode.c: Decode the processor ID of the Intel Core M, AMD +- Athlon X4 and AMD Opteron X1000/X2000 processors (DMI type 4). +- * dmidecode.c: Display the IPMI interrupt number as a decimal +- number (DMI type 38). +- +-2017-01-20 Jean Delvare +- +- * biosdecode.c: Decode the entry point defined in the Intel +- Multiprocessor specification. +- +-2017-01-20 Jean Delvare +- +- * dmidecode.c: Only decode one DMI table. +- This fixes Savannah bug #50022: +- https://savannah.nongnu.org/bugs/?50022 +- +-2016-09-22 Jean Delvare +- +- * README: Explain that we can no longer support Cygwin. +- +-2016-06-30 Petr Oros +- +- * dmidecode.c: Unmask LRDIMM in memory type detail (DMI type 17). +- +-2015-11-02 Jean Delvare +- +- * dmidecode.c, util.c, util.h: Let read_file return the actual data +- size. +- * dmidecode.c: Use read_file to read the DMI table from sysfs. +- This fixes Savannah bug #46176: +- https://savannah.nongnu.org/bugs/?46176 +- * dmidecode.c: Check the sysfs entry point length. +- +-2015-10-21 Xie XiuQi +- +- * dmidecode.c: Handle SMBIOS 3.0 entry points on EFI systems. +- +-2015-10-20 Jean Delvare +- +- * dmidecode.c: Handle OEM-specific types in group associations +- (DMI type 14). +- +-2015-10-14 Jean Delvare +- +- * util.c: Avoid SIGBUS on mmap failure. +- This fixes Savannah bug #46066: +- https://savannah.nongnu.org/bugs/?46066 +- * util.c: Fix error paths in mem_chunk. +- +-2015-10-01 Roy Franz +- +- * dmiopt.c: Add "--no-sysfs" option description to -h output. +- +-2015-09-03 Jean Delvare +- +- * version.h: Set version to 3.0. +- +-2015-08-04 Tyler Bell +- +- * dmioem.c: Decode HP-specific DMI type 233 +- * dmioem.c: Refactored HP-specific types 209 and 221 to use common code +- * dmioem.c: Documented spec for HP-specific types 209, 221 and 233 +- +-2015-05-21 Jean Delvare +- +- * dmidecode.c: Fix up invalid DMI type 34 structure length. +- * dmioem.c: Decode HP-specific DMI types 212 and 219. +- * dmioem.c: Move function is_printable to dmidecode.c. +- +-2015-05-13 Jean Delvare +- +- * dmidecode.c: Add support for SMBIOS3 EFI table. +- * dmidecode.c: Fix warnings about comparison between signed and +- unsigned integers. +- * util.c: Fix warnings about unused labels when building without +- -DUSE_MMAP. +- * dmioem.c: Strip spaces at the end of vendor names. +- * dmioem.c: Decode Acer-specific DMI type 170. +- +-2015-05-12 Jean Delvare +- +- * dmidecode.c: Remove extra blank line after hidden DMI type 40 +- structure. +- +-2015-05-04 Jean Delvare +- +- * dmidecode.c: Move table decoding to a separate function. +- * dmidecode.c: Simplify function dmi_table_dump. +- * dmidecode.c: Display types 41 and 42 in quiet mode too. +- * dmidecode.c: Get OEM vendor from System Information (DMI type 1). +- +-2015-04-28 Jean Delvare +- +- * dmidecode.h, dmiopt.h: Fix sparse errors. +- * biosdecode.c, dmiopt.c, ownership.c, vpdopt.c: Fix sparse warnings. +- * util.c: Fix sparse warning. +- +-2015-04-27 Jean Delvare +- +- * dmidecode.c: Fix --dump-bin when reading from sysfs. +- +-2015-04-27 Jean Delvare +- +- Update to support SMBIOS specification version 3.0.0. +- +- * dmidecode.c: Add support for the new _SM3_ 64-bit entry point +- defined in the SMBIOS specification version 3.0.0, including +- support of 64-bit addresses and 32-bit table lengths. +- * dmidecode.c: Add 3 new chassis types (DMI type 3). +- * dmidecode.c: Add 4 new processor families (DMI type 4). +- * dmidecode.c: Add 4 new Intel socket types (DMI type 4). +- * dmidecode.c: Add 13 new slot types (DMI type 9). +- * dmidecode.c: Add 4 new memory device types (DMI type 17). +- * dmidecode.c: Add support for processors with more than 255 cores +- or threads (DMI type 4). +- * dmidecode.c: Stop decoding v3 tables at End-of-Table marker. +- +-2015-04-21 Roy Franz +- +- * util.c, util.h: Add utility function read_file, which reads an +- entire binary file into a buffer. +- * dmidecode.c: Add passing of flags parameter to dmi_table. +- * dmidecode.c: Add reading of SMBIOS tables from sysfs. +- * dmidecode.c, dmiopt.c, dmiopt.h: Add --no-sysfs option to disable +- use of sysfs. +- * dmidecode.8: Document the changes above. +- +-2015-04-20 Jean Delvare +- +- * biosdecode.c: Add support for the _SM3_ entry point, as defined in +- the SMBIOS 3.0.0 specification. +- +-2014-11-14 Jean Delvare +- +- * man/dmidecode.8: Add a note about DMI strings available from sysfs +- on Linux. +- +-2014-10-13 Jean Delvare +- +- * dmidecode.c: Add support for DDR4 (DMI type 17). Patch from Tomohiro +- Kimura. The value was taken from preliminary SMBIOS specification +- version 3.0.0d. +- This fixes Savannah bug #43370: +- https://savannah.nongnu.org/bugs/?43370 +- +-2014-07-11 Jean Delvare +- +- * dmidecode.c: Decode the CPUID of recent AMD processors (DMI type 4). +- +-2014-03-20 Jean Delvare +- +- * dmidecode.c: Let legacy_decode be quiet in dump mode too. +- * dmidecode.c: Skip the SMBIOS version comparison in quiet mode. +- Patch from Jens Rosenboom. +- +-2014-02-25 Jean Delvare +- +- * dmidecode.c: Fix spacing of memory module voltage attributes +- (DMI type 17). +- +-2014-01-13 Jean Delvare +- +- * dmidecode.c: Decode ID of PCI Express 3 slots (DMI type 9). +- This fixes Savannah bug #40178: +- https://savannah.nongnu.org/bugs/?40178 +- +-2014-01-13 Jean Delvare +- +- * LICENSE: Update to the latest upstream version. Amongst other +- things, this fixes the FSF address. +- +-2013-04-24 Jean Delvare +- +- * dmidecode.c: Strip trailing zeroes from memory voltage values +- (DMI type 17). +- * dmidecode.c: Fix support for new processor upgrade types (DMI +- type 4) and new memory device type (DMI type 17.) +- +-2013-04-17 Anton Arapov +- +- * version.h: Set version to 2.12. +- +-2013-04-17 Anton Arapov +- +- Update to support SMBIOS specification version 2.8.0. +- +- * dmidecode.c: Correct processor family name (DMI type 4). +- * dmidecode.c: Correct typo in processor upgrade type (DMI type 4). +- * dmidecode.c: Add 9 new processor families (DMI type 4). +- * dmidecode.c: Add 2 new Intel socket types (DMI type 4). +- * dmidecode.c: Add Min/Max/Configured memory voltages (DMI type 17). +- * dmidecode.c: Add LRDIMM to memory device list (DMI type 17). +- +-2012-03-26 Anton Arapov +- +- * man/dmidecode.8: Add missing DMI type introduced with SMBIOS 2.7+, and +- include the information about the extra output when dmidecode is run +- on a hardware that has non-supported SMBIOS version. +- +-2012-03-12 Anton Arapov +- +- * dmioem.c: Add "PXE" to the HP OEM Type 209 output so it is similar to +- the "iSCSI" description in HP OEM Type 221. Patch from Naga Chumbalkar. +- +-2011-11-18 Jean Delvare +- +- * dmidecode.c: Properly print the hexadecimal value of invalid +- string characters. +- +-2011-11-14 Anton Arapov +- +- * dmidecode.c: Make dmi_chassis_type aware of the lock bit. +- Patch from Stefan Tauner. +- * config.h: Haiku dropped the _BEOS_ definition in favor of its own +- platform identification _HAIKU_. Patch from Francois Revol. +- +-2011-04-20 Jean Delvare +- +- Update to support SMBIOS specification version 2.7.1. +- +- * dmidecode.c: Add 6 AMD processor families (DMI type 4). +- * dmidecode.c: Add cache associativity value +- "20-way Set-associative" (DMI type 7). +- * dmidecode.c: Add PCI Express 3 slot types (DMI type 9). +- +-2011-01-25 Jean Delvare +- +- * dmidecode.c: Fix boundary checks of memory array location codes +- (DMI type 16). Reported by Andrey Matveyev. +- +-2011-01-19 Anton Arapov +- +- * version.h: Set version to 2.11. +- +-2010-11-24 Jean Delvare +- +- * dmidecode.c: Assume that the max power capacity is expressed in +- Watts, not milliWatts (DMI type 39). The specification isn't +- clear about the actual unit, but the only implementation I've +- seen (HP Proliant G7) clearly uses Watts. Also, using milliWatts +- would limit the max value that can be stored to 32 W, which +- doesn't make much sense. +- * dmidecode.c: Fix offset of partition width (DMI type 19). +- * dmidecode.c: Decode BIOS language information flags +- (DMI type 13). +- * dmidecode.c: Fix CPU flags mask (DMI type 4). +- * dmidecode.c: Reword "PCI Express Gen 2" to just "PCI Express 2" +- (DMI type 9). +- * dmidecode.c: Decode the slot ID for all PCI Express and PCI +- Express 2 slots (DMI type 9). +- +-2010-11-24 Jean Delvare +- +- Update to support SMBIOS specification version 2.7.0. +- +- * dmidecode.c: Update all references to the SMBIOS specification +- to match the new numbering. +- * dmidecode.c: Add UEFI support and virtual machine flags to BIOS +- characteristics (DMI type 0). +- * dmideocde.c: Add SKU number field to system enclosure or chassis +- (DMI type 3). +- * dmidecode.c: Add many Intel, AMD and VIA CPU family names +- (DMI type 4). +- * dmidecode.c: Add many socket formats (DMI type 4). +- * dmidecode.c: Add processor characteristics flags (DMI type 4). +- * util.c, util.h: Add utility function u64_range, which computes +- the range between two u64 values. +- * dmidecode.c: Add support for memory arrays of 2 TB and more +- (DMI types 16, 19 and 20). +- * dmidecode.c: Add support for memory devices of 32 GB and more +- (DMI type 17). +- * dmidecode.c: Add description of cooling device (DMI type 27). +- * dmidecode.c: Add limited support for new DMI type 42 (Management +- Controller Host Interface). +- +-2010-11-16 Jean Delvare +- +- * dmidecode.c: Handle ambiguous processor family value 0x30 +- (DMI type 4). +- * dmidecode.c: Prevent unlikely array overrun when decoding +- processor family value 0xBE (DMI type 4). +- * dmidecode.c: Handle DMI type 2 record of size 0x0E. +- +-2010-11-11 Jean Delvare +- +- * dmidecode.c: Fix decoding of IPMI base address LSB. +- +-2010-11-09 Jean Delvare +- +- * dmidecode.c: Drop redundant/obsolete references to +- CIM_Processor.Family. +- +-2010-10-26 Jean Delvare +- +- Update to support Intel AP-485 (CPUID) revision 36 (was 32). +- +- * dmidecode.c: Update the link to the AP-485 document, the revision +- and the table number. +- * dmidecode.c: Update two CPU flag descriptions (FXSR and HTT). +- Drop CPU flag IA64. +- * dmidecode.c: Update the list of processors for which we decode the +- CPUID flags. +- +-2010-10-11 Jean Delvare +- +- * dmidecode.c: One more SMBIOS version fix-up case. +- * Makefile: Rework BSD make compatibility trick. The previous +- trick would break GNU make 3.82. +- +-2010-09-29 Anton Arapov +- +- * util.c: makes dmidecode fall back to regular reads if the mmap +- fails. Patch from Olof Johansson. +- +-2010-09-21 Jean Delvare +- +- * dmidecode.c: Fix Xeon 7xxx entries in CPU name lookup table +- (DMI type 4). Patch from Paul Flo Williams. +- +-2009-08-28 Jarod Wilson +- +- Update to support SMBIOS specification version 2.6.1. +- +- * dmidecode.c: Add processor types "Dual-Core Xeon 5200", +- "Dual-Core Xeon 7200", "Quad-Core Xeon 7300", "QuadCore Xeon 7400", +- "Multi-Core Xeon 7400", "Core i7", "Dual-Core Celeron", +- "Multi-Core Xeon", "Dual-Core Xeon 3xxx", "Quad-Core Xeon 3xxx", +- "Dual-Core Xeon 5xxx", "Quad-Core Xeon 5xxx", "Dual-Core Xeon 7xxx", +- "Quad-Core Xeon 7xxx" and "Multi-Core Xeon 7xxx" (DMI type 4). +- * dmidecode.c: Add slot types "PCI Express Gen 2 x1", +- "PCI Express Gen 2 x2", "PCI Express Gen 2 x4", +- "PCI Express Gen 2 x8" and "PCI Express Gen 2 x16" (DMI type 9). +- * dmidecode.c: Add memory device types "DDR3" and "FB-DIMM" +- (DMI type 17). +- * dmidecode.c: Add cache associativity types "12-way Set-associative", +- "24-way Set-associative", "32-way Set-associative", +- "48-way Set-associative" and "64-way Set-associative" (DMI type 7). +- +-2009-07-27 Jean Delvare +- +- * dmioem.c: Recognize "Hewlett-Packard" as a possible DMI vendor +- string for HP. Orginal patch from Thomas Hiller (HP). +- * dmidecode.c: Add processor upgrade type "Socket LGA1366" +- (DMI type 4). +- +-2009-06-19 Jean Delvare +- +- * dmidecode.c: Fix decoding of memory array capacity. A maximum +- capacity of 128 GB would erroneously be reported as Unknown, +- while a unknown capacity would be erroneously reported as 2048 +- GB. Bug reported by Lin Li (HP). +- +-2009-04-30 Jean Delvare +- +- * dmidecode.c: Warn if decoding an SMBIOS implementation which is +- newer than what we support. +- +-2009-04-04 Jean Delvare +- +- * Makefile: Clarify license. +- +-2008-11-23 Jean Delvare +- +- * biosdecode.c: Stop using the inline keyword. It causes more +- portability issues than is worth given how little we care about +- performance in this tool, and recent versions of gcc know when +- to inline functions anyway. +- * version.h: Set version to 2.10. +- +-2008-11-14 Jean Delvare +- +- * dmidecode.c: Handle chassis information records of size 19 +- (DMI type 3). +- +-2008-11-10 Jean Delvare +- +- * dmidecode.c: Claim to support revision 32 of Intel AP-485 +- (CPUID). No relevant change since revision 31. +- * dmidecode.c: Update reference to AMD CPUID document. +- +-2008-11-09 Jean Delvare +- +- * dmidecode.c: Decode the CPUID of more Intel, VIA and AMD +- processors (DMI type 4). +- * dmidecode.c: More CPUID exceptions based on the version string +- (DMI type 4). +- * README: Drop reference to the Linux kernel. +- * README: Drop "model-specific issues" common problem entry, it is +- no longer relevant. +- * README: Simplify "IA-64" common problem entry, most of the +- issues are solved by now. +- +-2008-11-08 Jean Delvare +- +- * dmidecode.c: Add many processor types taken from the CIM Schema. +- * dmidecode.c: Drop all references to the DMTF Master MIF +- document. This document hasn't been updated in years, so the +- additions it may contain are no longer relevant. +- +-2008-11-07 Jean Delvare +- +- * dmidecode.c: Handle base board information records of size 9 +- (DMI type 2). +- * dmidecode.c: Don't display access time equivalent of memory +- device speed (DMI type 17). The access time didn't add much +- value, and rounding effects made it look bad at times. +- +-2008-11-07 Jean Delvare +- +- Update to support SMBIOS specification version 2.6, fourth round. +- +- * dmidecode.c: Initial support for additional information entries +- (DMI type 40). Proper support of this new entry type would +- require redesigning a large part of the code, so I am waiting +- to see actual implementations of it to decide whether it's worth +- the effort. +- * dmidecode.c, dmidecode.8: Update reference SMBIOS document. +- * dmiopt.c, dmidecode.8: Include entry type 41 in --type baseboard. +- +-2008-11-05 Jean Delvare +- +- Update to support SMBIOS specification version 2.6, third round. +- +- * dmidecode.c: Decode the group number, bus number and +- device/function number of system slots (DMI type 9). +- Based on a preliminary patch by Matt Domsch. +- * dmidecode.c: Decode onboard devices extended information +- entries (DMI type 41). Based on a preliminary patch by Matt +- Domsch. +- * dmidecode.c: Add slot types "PCI Express x1", "PCI Express x2", +- "PCI Express x4", "PCI Express x8" and "PCI Express x16" +- (DMI type 9). +- * dmidecode.c: Decode the memory device rank (DMI type 17). +- +-2008-11-02 Jean Delvare +- +- * dmidecode.c: Use binary search for dmi_processor_family, it's +- faster than linear search (DMI type 4). +- * dmidecode.c: Decode boot integrity services entry point entries +- (DMI type 31). +- +-2008-10-31 Jean Delvare +- +- * dmidecode.c: The compiler knows how to reuse strings, it doesn't +- need our help, and actually it does a better job without it. So, +- turn out_of_spec into a define. +- * dmidecode.c: Optimize functions dmi_processor_status(), +- dmi_cache_location(), dmi_system_reset_boot_option() and +- dmi_ipmi_register_spacing(). +- +-2008-10-30 Jean Delvare +- +- * dmidecode.c, dmiopt.c, dmidecode.8: Option --dump is only a +- modifier as --quiet is, so it's not actually mutually exclusive +- with the output format options. +- * dmidecode.c: Make options --dump-bin and --quiet work together. +- * dmidecode.c: Delay string filtering when option --dump is used. +- * dmidecode.c: Refactor dmi_processor_family function to avoid +- code duplication. +- * dmidecode.c: Fix up invalid SMBIOS version 2.51. +- +-2008-10-29 Jean Delvare +- +- * dmidecode.c: Handle special case of processor family code 0xBE, +- which can be both Core 2 or K7. We use the processor +- manufacturer string as a hint (DMI type 4). +- +-2008-10-28 Jean Delvare +- +- * dmidecode.c, dmidecode.h, dmiopt.c, dmiopt.h: Don't use function +- pointers for special string cases. Each special case is itself +- special and needs to call a function with its own prototype, so +- better have dedicated code to handle it all. +- * dmidecode.c, dmidecode.h, dmioem.c, dmioem.h: Mark a few +- pointers const. +- * dmidecode.c, util.c, util.h: When dumping the DMI table to a +- binary file, truncate the file first. +- * dmidecode.c: Support Processor Family 2 field also when queried +- with option --string. +- +-2008-10-27 Jean Delvare +- +- Update to support SMBIOS specification version 2.6, second round. +- +- * dmidecode.c: Add support for Processor Family 2 field +- (DMI type 4). +- * dmidecode.c: Add processor types "Turion 64 X2", "Core Solo", +- "Core 2 Duo", "ESA/390 G6", "z/Architectur", "C7-M", "C7-D", +- "C7" and "Eden" (DMI type 4). +- * dmidecode.c: Fix typo in processor type "AMD29000" (DMI type 4). +- * dmidecode.c: Add processor upgrade types "Socket S1", +- "Socket AM2" and "Socket F (1207)" (DMI type 4). +- +-2008-10-26 Jean Delvare +- +- Update to support SMBIOS specification version 2.6, first round. +- +- * dmidecode.c: Byte-swap the first 3 fields of the UUID +- (DMI type 1). +- * dmidecode.c: Add chassis types "Blade" and "Blade Enclosure" +- (DMI type 3). +- +-2008-10-26 Jean Delvare +- +- * dmiopt.c, dmidecode.8: Simplify the handling and documentation +- of mutually exclusive output format options. +- * dmidecode.8: Document the binary dump file format. +- * dmidecode.c: Don't display the source dump file name in quiet +- mode. +- * biosdecode.c, dmidecode.c, dmioem.c, dmiopt.c, dmiopt.h, +- ownership.c, types.h, util.c, vpddecode.c, vpdopt.c, vpdopt.h: +- Mass coding-style change: add spaces around operators. +- * vpddecode.c: Fix --quiet option. +- * dmidecode.h, dmiopt.h: Pass version information to print +- callback functions. +- * dmidecode.c: Fix up invalid SMBIOS version. +- * dmidecode.c: Handle base board information records of size 10 +- (DMI type 2). +- +-2008-10-25 Jean Delvare +- +- * dmidecode.c: Limit indentation in smbios_decode and +- legacy_decode. +- * dmidecode.c, dmiopt.c: Write binary dump to a compact file +- rather than a sparse file. +- * dmidecode.c, dmiopt.c, dmiopt.h: New option --from-dump, read +- the DMI data from a binary file. +- * dmidecode.8: Update the option --dump-bin, document the new +- option --from-dump. +- +-2008-08-28 Jean Delvare +- +- * dmidecode.c: Add missing colon to temperature probe label. +- Patch from Alex Iribarren. +- +-2008-02-16 Jean Delvare +- +- * util.c, util.h: New helper function write_dump. +- * dmidecode.c, dmiopt.c, dmiopt.h: New option --dump-bin, dump +- the DMI data to a sparse binary file. +- * dmidecode.8: Document the new option --dump-bin. +- * Makefile, biosdecode.c, dmidecode.c, dmidecode.h, dmioem.c, +- dmioem.h, dmiopt.c, dmiopt.h, ownership.c, util.c, util.h, +- vpddecode.c, vpdopt.c, vpdopt.h: Update copyright statements. +- * dmidecode.c: Adjust the error message which is displayed when +- the table is unreachable. +- +-2007-06-30 Jean Delvare +- +- * config.h: Add support for Solaris (x86 only, of course). Based +- on a patch by Sun's Dan Mick, brought to my knowledge by +- Attila Nagy. +- +-2007-06-27 Jean Delvare +- +- * Makefile: Fix the uninstall-man target. +- +-2007-06-07 Jean Delvare +- +- * dmidecode.c: If the SMBIOS entry point decoding fails (for +- example due to a bad checksum), still try decoding the +- encapsulated DMI entry point. Suggested by Luke Suchocki. +- * dmidecode.c: Replace all occurrences of "KB" by the more +- correct "kB". +- +-2007-03-16 Jean Delvare +- +- * vpddecode.c: Stop asking the user to report bad checksums, +- unaligned records and the like. Such machines exist, too bad, +- we have to live with it. +- +-2007-02-27 Jean Delvare +- +- * biosdecode.c: Fix a compilation error with non-C99 compilers. +- Patch from Francois Revol. +- +-2007-02-26 Jean Delvare +- +- * dmidecode.c: Fix an array overrun while decoding the system +- event log status (DMI type 15). +- * biosdecode.c: Use printf instead of fwrite. +- * dmidecode.8: Some OEM-specific types can be decoded now. +- * biosdecode.8: List the FJKEYINF entry point type. +- * vpddecode.8: The product name is no longer displayed. +- * version.h: Set version to 2.9. +- +-2007-02-16 Jean Delvare +- +- * dmidecode.c: Do not print the BIOS base address and runtime size +- if the base address is 0. This happens on IA-64 because there's +- no BIOS. +- * Makefile, README: Do not build biosdecode, ownership and +- vpddecode on IA-64, as IA-64 systems have no BIOS. This was +- quite tricky to keep both GNU make and BSD make happy, but it +- seems that I finally succeeded. +- +-2007-02-13 Jean Delvare +- +- Update to support SMBIOS specification version 2.5, second round. +- +- * dmidecode.c: Decode new processor characteristics (multi-core, +- multi-thread, 64-bit) (DMI type 4). +- * dmidecode.c: Decode slot ID of AGP 8x and PCI Express slots (DMI +- type 9). +- +- * dmidecode.c: Fix the mask of 3 bitfield tests. This will let +- the memory type of some systems be properly reported as SDRAM. +- * dmidecode.c: Fix the AMD processors signature decoding. +- * README: Minor edits. +- +-2007-02-12 Jens Elkner +- +- Update to support SMBIOS specification version 2.5, first round. +- +- * dmidecode.c: Add chassis types "CompactPCI" and "AdvancedTCA" +- (DMI type 3). +- * dmidecode.c: Add processor types "Turion 64", +- "Dual-Core Opteron", "Athlon 64 X2", "Celeron D", "Pentium D" +- and "Pentium EE" (DMI type 4). +- * dmidecode.c: Add processor upgrade types "Socket mPGA604", +- "Socket LGA771" and "Socket LGA775" (DMI type 4). +- * dmidecode.c: Add connector type "SAS/SATA Plug Receptacle" and +- port types "SATA" and "SAS" (DMI type 8). +- * dmidecode.c: Add on-board device types "PATA Controller", +- "SATA Controller" and "SAS Controller" (DMI type 10). +- * dmidecode.c: Add memory device form factor "FB-DIMM" and memory +- device type "DDR2 FB-DIMM" (DMI type 17). +- +-2007-02-12 Jean Delvare +- +- * dmioem.c: Share the code between HP-specific types 209 and 221. +- Both types are really the same, only the title is different. +- * dmioem.c: Make the HP-specific types 209 and 221 output a bit +- more verbose. +- * dmidecode.c: Let --type decode OEM-specific entries when +- possible. +- * dmidecode.c: Include decoded OEM-specific entries in quiet mode +- output (--quiet). +- * dmidecode.c: Do not complain about truncated entries in quiet +- mode. +- * dmioem.c: Decode HP-specific type 204 entries in a safer way: +- check the length before decoding, and don't assume that all +- strings are provided in the same order as they are used. +- +- Update to support Intel AP-485 (CPUID) revision 31 (was 28). +- +- * dmidecode.c: New CPUID flag IA64. +- * dmidecode.c: Fix the decoding of Intel extended family. +- +-2007-02-11 Jean Delvare +- +- * dmioem.c, dmioem.h: New. +- * Makefile, dmidecode.c, dmidecode.h, dmioem.c, dmioem.h: Move the +- decoding of OEM-specific entries to a separate source file. +- * dmidecode.c: DMI type 38 is tested by now. +- * dmioem.c: The PCI function is typically represented as a single +- digit. +- * Makefile, dmiopt.c, vpdopt.c, util.h: Define an ARRAY_SIZE macro +- which computes the size of a static array, and use it where +- relevant. +- +-2007-02-11 John Cagle +- +- * dmidecode.c: Add support for 3 HP-specific entries: system/rack +- locator (type 204), NIC MAC information (type 209) and NIC iSCSI +- MAC information (type 221). +- +-2007-01-14 Jean Delvare +- +- * vpddecode.c: Fix a rare warning. +- * biosdecode.c: Add support for the FJKEYINF entry point, which +- contains data related to the "application panel" on Fujitsu +- laptops. +- +-2006-05-23 Jean Delvare +- +- * dmidecode.c: Fix a recently introduced compilation error with +- non-C99 compilers. +- * dmidecode.c: Check for short entries (less than 4 bytes), stop +- with an error when one is encountered. +- +-2006-05-13 Jean Delvare +- +- * vpddecode.c, README: Drop the product name lookup table. It +- was reported to be unreliable too many times, and was also +- difficult to maintain. +- +-2006-05-10 Jean Delvare +- +- * dmidecode.c: Don't cast from u8* to dmi_header*, else +- architectures which do not support unaligned memory accesses +- may break. Instead, copy the members individually. That's a +- bit slower, but that's also safer and we only need to do it +- once per DMI entry, so it's not time critical. So far, we +- were using a trick to later work around the unaligned memory +- access, but the compiler would still warn about the risk, +- which is always confusing. +- * config.h, types.h, README: Automatically enable the unaligned +- memory access workaround on ia64. +- * types.h: Inline U64. It makes sense per se and also lets us +- get rid of a warning about U64 being unused. +- * dmidecode.c: Detect EFI at run-time rather than compilation- +- time. Based on an original patch from Matthew Garrett. This +- will make x86 binaries work for both PC systems with BIOS and +- Macintosh systems with EFI. Also prevent a possible, though +- unlikely, NULL-pointer dereference in the EFI code. +- +-2006-02-25 Jean Delvare +- +- * dmidecode.c: Fix typo reported by David Wilson (DMI case 3). +- +-2006-02-04 Jean Delvare +- +- * vpddecode.c: Update lookup table from revision 2006-01-31 of IBM +- reference document (add product ID "7B"). +- * version.h: Set version to 2.8. +- +-2006-01-21 Jean Delvare +- +- * vpddecode.c: The mysterious last character of xSeries records +- may be a BIOS revision. Display it as such when present and +- non zero, and ask users to report. +- * vpddecode.c: Adjust an error message. +- * dmidecode.8: Update the sample entry to match the new output +- format. +- * README: Improve the IA-64 specific section and the vpddecode +- tool description. +- * vpdopt.h: Add missing system header file include. +- +-2006-01-20 Jean Delvare +- +- * vpddecode.c: Assume a constant length of 12 characters for the +- "Default Flash Image File Name" entry. The 13th character never +- contained anything useful, so it probably has a different +- meaning (unknown for now). +- +-2005-12-24 Jean Delvare +- +- * vpddecode.c: Scan for VPD records on 4-byte boundaries instead +- of 16-byte boundaries. This is needed for some eServer xSeries +- 206. Still emit a warning if a VPD record is found not on a +- 16-byte boundary. +- +-2005-10-26 Jean Delvare +- +- * vpddecode.c: Add product ID "NR". Reported by Klaus Muth. +- * vpddecode.c: Update lookup table from revision 2005-10-06 of IBM +- reference document (add product IDs "77" and "78"). +- +-2005-10-05 Jean Delvare +- +- Update to support IPMI specification version 2.0 (was 1.5). +- +- * dmidecode.c: Support IPMI interface type SSIF. Original patch +- by Garry Belka. +- +-2005-10-04 Jean Delvare +- +- * vpdopt.c: Display the list of all valid string keywords when +- --string is used without an argument. +- * vpddecode.8: Document the new -s, --string option. +- * dmidecode.8: List the four new string keywords. +- * vpddecode.c: Keep quiet when --string is used, even when no VPD +- record is found. +- +-2005-10-03 Jean Delvare +- +- * biosdecode.c: Fix a potential (but highly improbable) buffer +- overrun in the VPD record decoding. +- * biosdecode.c: Change the xSeries checksumming method to +- accommodate a strange xSeries 440 VPD record, as was done in +- vpddecode.c some weeks ago. Do not display the default flash +- image file name anymore, it's not so useful and the field length +- is now uncertain. +- * vpdopt.c, vpdopt.h: New. +- * Makefile, vpddecode.c, vpdopt.c, vpdopt.h: Move the command line +- handling of vpddecode to a separate source file. +- * vpddecode.c, vpdopt.c, vpdopt.h: Add option -s, --string. It +- prints one selected VPD string instead of the regular output. +- +-2005-09-24 Jean Delvare +- +- * dmiopt.c: Fix incorrect header include. The strcasecmp function +- is defined in , not . Reported by Petter +- Reinholdtsen. +- +-2005-09-14 Jean Delvare +- +- * dmidecode.h: New. +- * dmidecode.c, dmidecode.h, Makefile: Export four specific +- decoding functions, make them suitable for external call. +- * dmidecode.c, dmiopt.c, dmiopt.h, Makefile: Make it possible +- for --string to print decoded binary data rather than only +- DMI strings. Add four such string keywords. +- * dmidecode.c, dmiopt.c, dmiopt.h: Modify the opt structure +- to handle the string option more efficiently. +- +-2005-09-13 Jean Delvare +- +- * vpddecode.c: Slightly change the xSeries checksumming method to +- accommodate a strange xSeries 440 VPD record. Also tweak the +- decoding of the "Default Flash Image File Name" entry. Thanks +- to Torsten Seemann for providing a test VPD record. +- +-2005-09-05 Jean Delvare +- +- * Makefile: Use -Wundef. +- +-2005-08-31 Jean Delvare +- +- * dmidecode.c: Drop trailing dot from handle description line. +- +-2005-08-29 Jean Delvare +- +- * dmidecode.c: Reword a comment about CPUID. +- * dmidecode.c: Claim to support revision 28 of Intel AP-485 +- (CPUID). No relevant change since revision 27. +- +-2005-08-25 Jean Delvare +- +- * vpddecode.c: Add product ID "VI". Reported by Torsten Seemann. +- * vpddecode.c: Update lookup table from revision 2005-06-24 of IBM +- reference document (add product IDs "1U", "1X", "70", "74", "75" +- and "76", update product ID "1Y"). +- * dmiopt.c: Complain about unknown options again. +- * biosdecode.c, ownership.c, vpddecode.c: getopt_long() will never +- return ':'. +- +-2005-08-04 Jean Delvare +- +- * README: Manual pages document the command line interface. +- A discussion list exists for developers. Mmap is used on +- most systems, not just Linux. +- * version.h: Set version to 2.7. +- +-2005-08-02 Jean Delvare +- +- * dmiopt.c, dmidecode.8: Options --dump and --quiet are mutually +- exclusive. +- +-2005-06-23 Jean Delvare +- +- * dmiopt.c, dmidecode.8: Options --dump and --string are mutually +- exclusive. +- +-2005-06-22 Jean Delvare +- +- * dmiopt.c: Display the list of all valid type or string keywords +- when --type or --string, respectively, is used without an +- argument or with an invalid one. +- * dmidecode.8: Document the new -s, --string option. Update the +- -t, --type option documentation. +- * dmiopt.c, dmidecode.8: Add string keyword "bios-release-date", +- the Linux kernel uses it. +- * dmidecode.c, dmidecode.8: Fix typo ("Controler" becomes +- "Controller"). +- +-2005-06-21 Jean Delvare +- +- * dmidecode.c, dmiopt.c, dmiopt.h: Add option -s, --string. It +- prints one selected DMI string instead of the regular output. +- +-2005-06-18 Jean Delvare +- +- * dmidecode.c: Hide handle references and entries of unknown +- type when --quiet is used. +- * dmidecode.8: Document the new -q, --quiet option. +- * dmidecode.c: Stop decoding at end of table entry when --quiet +- is used. Also don't warn about incorrect table length or entries +- count when --quiet is used. +- +-2005-06-17 Jean Delvare +- +- * dmidecode.c, dmiopt.c, dmiopt.h: Add option -q, --quiet. It +- makes the output less verbose. +- * dmidecode.c: Suppress one level of indentation in the output, +- insert blank lines between records. This will hopefully make +- the output easier to read. +- * dmidecode.c: Hide table address and size when --type is used. +- +-2005-06-16 Jean Delvare +- +- * dmidecode.8: Document the new -t, --type option. +- +-2005-06-15 Jean Delvare +- +- * dmiopt.c, dmiopt.h: New. +- * Makefile, dmidecode.c, dmiopt.c, dmiopt.h: Move the command line +- handling of dmidecode to a separate source file. +- * dmiopt.c: Define keywords to be used with --type (instead of +- numeric values). +- +-2005-06-14 Jean Delvare +- +- * dmidecode.c: Centralize the main exit point. This allows fixing +- a minor, recently introduced memory leak which was happening on +- error conditions. +- +-2005-06-13 Jean Delvare +- +- * dmidecode.c: Add option -t, --type. It limits the output to +- the given type(s) of DMI entries. +- +-2005-05-25 Jean Delvare +- +- * vpddecode.c: Add product IDs "KE", "NT" and "ZR". Reported by +- Bernd Krumboeck. +- +-2005-05-15 Jean Delvare +- +- * dmidecode.8, vpddecode.8: Document the new -u, --dump option. +- +- Update to support SMBIOS specification version 2.4 (was 2.4 +- preliminary). There is actually no difference between 2.4 +- preliminary and 2.4 final. +- +- * dmidecode.c: Update the "System Management BIOS Reference +- Specification" version. +- +-2005-04-26 Jean Delvare +- +- * vpddecode.c: Add product ID "M1". Reported by Myke Olson. +- * vpddecode.c: Add option -u, --dump. It disables decoding of the +- VPD records, a raw dump is displayed instead. This option is +- mainly intended for debugging. +- +-2005-04-03 Jean Delvare +- +- * Makefile: Use variables for install and rm commands, so that these +- can be overridden by the caller. +- +-2005-03-25 Jean Delvare +- +- * Makefile: Install some documentation files (README, CHANGELOG, +- AUTHORS). +- +- Update to support SMBIOS specification version 2.4 preliminary +- [11/18/2004] (was 2.3.4). +- +- * dmidecode.c: Add BIOS characteristics (DMI type 0). +- * dmidecode.c: Display BIOS and firmware revisions where available +- (DMI type 0). +- * dmidecode.c: Display system SKU number and family where available +- (DMI type 1). +- * dmidecode.c: Add system slot types and widths (DMI type 9). +- * dmidecode.c: Add memory device type "DDR2" (DMI type 17). +- +-2005-03-20 Jean Delvare +- +- * Makefile: Install manual pages under $(prefix)/share/man by +- default, instead of $(prefix)/man, so as to comply with the FHS. +- +-2005-03-08 Jean Delvare +- +- * vpddecode.c: Update lookup table from revision 2005-03-08 of IBM +- reference document (add product ID "1V", update product ID "1R"). +- Thanks to Ingo van Lil for reporting about product ID "1V". +- +-2005-03-06 Jean Delvare +- +- * dmidecode.c: Add option -u, --dump. It disables decoding of the +- entries, raw dumps are displayed instead. This option is mainly +- intended for debugging. +- * Makefile: Use -Winline. +- * dmidecode.c: Make ASCII filtering of strings faster. +- +-2005-02-28 Jean Delvare +- +- * version.h: Set version to 2.6. +- * Makefile: ownership.o depends on version.h. +- +-2005-02-24 Jean Delvare +- +- * vpddecode.c: Add product ID "2C". Reported by Tomek Mateja. +- +-2005-02-17 Jean Delvare +- +- * vpddecode.c: Add product IDs "OP" and "PN". Reported by Scott +- Denham. +- * vpddecode.c: Fix typo in one product name (560E improperly +- spelled 650E). +- * vpddecode.c: Add product IDs "IW" and "IY", as added recently +- on IBM's reference web page. Update reference. +- * config.h: Use mmap on all but BeOS, instead of only Linux. +- +-2005-02-12 Jean Delvare +- +- * util.c: Fix incorrect length in munmap call. +- * Makefile: Use -Wmissing-prototypes. +- * dmidecode.c: Fix maximum battery error value. +- +-2005-02-11 Jean Delvare +- +- * Makefile: Discard -pedantic, we don't really need this. +- * util.c: Display an error message on memory shortage. Suggested +- by Don Howard. +- +- Fix a bug causing dmidecode to crash on some systems with more than +- 2 GB of memory. This is a signed vs unsigned issue, which existed +- up to version 2.2, was fixed in 2.3 but reintroduced in a different +- form in 2.5 as part of a code clean up and refactoring. +- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112355 +- Thanks to Petter Reinholdtsen for reporting. Thanks to Don Howard +- for additional insight. +- +- * dmidecode.c, util.c, util.h: Use size_t instead of off_t when +- handling memory addresses. +- +-2005-02-10 Jean Delvare +- +- * dmidecode.c: Add option -h, --help, display a usage summary. +- * biosdecode.c, ownership.c, vpddecode.c: Copy command-line handling +- from dmidecode.c. +- * biosdecode.8, dmidecode.8, ownership.8, vpddecode.8: Document +- the new command-line interface. +- +-2005-02-06 Jean Delvare +- +- * Makefile: Everything depends on config.h. +- * dmidecode.c: Add basic command-line handling. This was suggested +- a long time ago by Erwan Velu. +- +-2005-02-01 Jean Delvare +- +- * vpddecode.c: Add product IDs "AP", "KP" and "RD". Reported by +- David Rosala. +- +-2005-01-17 Jean Delvare +- +- * README: Add a note about Cygwin. Thanks to Dominik Klein for +- reporting success. +- +-2004-12-10 Jean Delvare +- +- Increase portability and configurability to in order to support BeOS. +- +- * config.h: New. +- * config.h: Define a default memory device. +- * biosdecode.c, dmidecode.c, ownership.c, vpddecide.c: Include +- config.h and use the defined default memory device. +- * Makefile, config.h, util.c, README: Move USE_MMAP to config.h, +- use mmap on Linux only. +- +-2004-11-22 Jean Delvare +- +- * biosdecode.c: Avoid size_t in printf. Should remove a warning on +- ia64. Thanks to Petter Reinholdtsen for reporting. +- * util.c: Use sysconf(_SC_PAGESIZE) instead of getpagesize() where +- available. This may remove a warning on ia64 as a side effect. +- Thanks to Petter Reinholdtsen for reporting. +- +-2004-11-21 Jean Delvare +- +- * util.c, util.h: Function myread has no more user outside of util.c. +- * biosdecode.c: Speed improvements. +- +-2004-11-20 Jean Delvare +- +- * biosdecode.c, ownership.c, vpddecode.c: Make use of the mem_chunk +- function. +- * vpddecode.c: Simplify the memory loop code a bit. +- +-2004-11-12 Jean Delvare +- +- * dmidecode.c: Hide bank connection type for non-installed memory +- modules. +- * dmidecode.c: Reference comment fix. +- * dmidecode.c: Hide watchdog timer details when no watchdog is +- present. Change label for no watchdog. +- * README: Match case change for PREFIX (now prefix) in the Makefile +- file. Reported by Raul Nunez de Arenas Coronado. +- +-2004-11-12 Jean Delvare +- +- Update to support DMTF Master MIF version 040707 (was 030621). +- +- * dmidecode.c: One additional processor type (Sempron). +- * dmidecode.c: One additional processor type (Efficeon TM8800). +- * dmidecode.c: One additional processor upgrade type (Socket 939). +- * dmidecode.c: Add the AMD Sempron to the list of x86-class +- processors. +- +- Update to support Intel AP-485 (CPUID) revision 27 (was 25). +- +- * dmidecode.c: Rename SBF flag to PBE. +- +-2004-11-11 Jean Delvare +- +- * util.c: More helpful error messages. +- * util.c: Use MAP_SHARED instead of MAP_PRIVATE in mmap. +- * version.h: Set version to 2.5. +- +-2004-11-10 Jean Delvare +- +- * README: Update dmidecode presentation (copied from the web page). +- Move the list of supported systems from the documentation section +- to the installation section. +- +-2004-11-09 Jean Delvare +- +- * vpddecode.c: Update product ID "1R". Reported by Marco Wertejuk. +- +-2004-10-24 Jean Delvare +- +- * util.c: Workaround missing MAP_FAILED definition, needed on +- old systems. Original patch from Durval Menezes. +- +-2004-10-14 Jean Delvare +- +- * dmidecode.c: Search for EFI systab at /sys/firmware/efi/systab. +- Original patch from Alex Williamson. +- * dmidecode.c: Remove warning about legacy_decode not being used +- when USE_EFI is defined. +- * dmidecode.c: Detect missing SMBIOS entry point in efi/systab. +- * dmidecode.c: Fix fatal typo in USE_EFI-specific code. +- +-2004-10-01 Roberto Nibali +- +- * Makefile: Be LDFLAGS aware. +- +-2004-07-24 Jean Delvare +- +- * util.c: Add missing header include. +- +-2004-06-11 Jean Delvare +- +- * vpddecode.c: Add product IDs "GE" and "T2". Reported by Doug Brenner. +- +-2004-05-02 Jean Delvare +- +- * dmidecode.c: Move legacy DMI entry point decoding to a separate +- function. +- * dmidecode.c: Use a 64 kB buffer for searching entry points, +- instead of repeated 16-byte reads. +- * util.c, util.h: New mem_chunk function. It returns a buffer +- containing a copy of a given chunk of the physical memory. +- * dmidecode.c: Make use of the new mem_chunk function. +- +-2004-04-30 Jean Delvare +- +- * vpddecode.c: Add product ID "JP". Reported by Bernd Krumboeck. +- +-2004-04-22 Jean Delvare +- +- * dmidecode.c, biosdecode.c, ownership.c, types.h: Move common +- WORD-like macros to types.h. +- +-2004-04-21 Jean Delvare +- +- * dmidecode.c, biosdecode.c: Fix my contact information. +- * dmidecode.c: Update copyright year. +- +-2004-04-20 Jean Delvare +- +- * README: Correct Chad Smith's name. Reported by Martin Pool. +- +-2004-04-15 Jean Delvare +- +- * vpddecode.c: Add product ID "PL". Reported by Mark Syms. +- +-2004-04-14 Jean Delvare +- +- * vpddecode.c: Add product ID "PD". Reported by Roger Koot. +- +-2004-04-11 Jean Delvare +- +- * dmidecode.c, Makefile, README: Drop TABLE_LITTLEENDIAN. +- * README: Update manual pages information. +- +-2004-04-02 Jean Delvare +- +- * vpddecode.c: Add product ID "NV". Reported by Shawn Starr. +- +-2004-03-27 Jean Delvare +- +- * vpddecode.c: Add product ID "24". Reported by Paul Sturm. +- * dmidecode.c: Fix two missing comas in string enumerations. Thanks to +- Joshua Goldenhar for reporting the first one. +- +-2004-03-24 Jean Delvare +- +- * vpddecode.c: Add product ID "PJ". Reported by Roger Koot. +- * vpddecode.c: Rename two Netvista systems to use their real name +- instead of machine type. +- +-2004-03-20 Petter Reinholdtsen +- +- * Makefile: Make it easier to select where to install the binaries +- and manual pages, and to use different paths when building and +- installing. +- +-2004-03-19 Jean Delvare +- +- * vpddecode.c: Add product ID "2A". Reported by Rafael Avila +- de Espindola. +- * version.h: Set version to 2.4. +- +-2004-03-07 Jean Delvare +- +- * biosdecode.c, vpddecode.c: Add a third checksumming method for +- VPD records. +- * vpddecode.c: Add product ID "PI", update "20". Reported by +- Zing Zing Shishak. +- +-2004-03-05 Jean Delvare +- +- * README: Update. +- +-2004-02-25 Jean Delvare +- +- * dmidecode.c: Support CPUID document revision 25 (no change). +- * dmidecode.c: Shorten the EOF error message. +- +-2004-02-23 Jean Delvare +- +- * man/biosdecode.8, man/dmidecode.8, man/ownership.8, +- man/vpddecode.8: New. +- * Makefile: Handle new manual pages. +- +-2003-12-28 Jean Delvare +- +- * vpddecode.c: Add product ID "PT". Reported by Ramiro Barreiro. +- +-2003-12-17 Jean Delvare +- +- * vpddecode.c: Add product ID "RE". Reported by Josef Moellers. +- * vpddecode.c, biosdecode.c: Handle longer VPD records as seen on +- xSeries. These have a different checksumming method. +- +-2003-12-03 Jean Delvare +- +- * vpddecode.c: Add product ID "TT". Reported by Hugues Lepesant. +- * vpddecode.c, biosdecode.c: Fix typo ("Bios" becomes "BIOS"). +- * dmidecode.c: Add another exception to the CPUID-supporting CPU list +- ("Pentium III MMX"). +- * dmidecode.c: Number devices in multi-device on board device +- information structures (DMI case 10). +- +-2003-11-13 Jean Delvare +- +- * dmidecode.c: Automatically detect architectures on which to use EFI +- (ia64 for now). Suggested by Jeff Moyer. +- +-2003-11-11 Jean Delvare +- +- * vpddecode.c: Add product ID "KX". Reported by Klaus Ade Johnstad, +- confirmed by Pamela Huntley. +- * dmidecode.c: Display CPUID values as decimal, not hexadecimal. +- This is a reversal of the 2003-07-18 change to be consistent with +- /proc/cpuinfo under Linux. +- * dmidecode.c: Fix processor ID decoding for older 80486. Not very +- important since such systems are unlikely to support SMBIOS. +- * dmidecode.c: Modify CPU signature display for AMD processors. +- * vpddecode.c, biosdecode.c: Fix incorrect VPD checksumming. +- +-2003-10-24 Jean Delvare +- +- * dmidecode.c: Add another exception to the CPUID-supporting CPU list. +- +-2003-10-19 Jean Delvare +- +- * README: Clarify why mmap is used. Fix typo. +- * Makefile: Add deleting core to the clean target. +- * version.h: Set version to 2.3. +- +-2003-10-17 Jean Delvare +- +- * biosdecode.c: Use (void) instead of __attribute__ ((unused)) to +- declare that a function parameter isn't used. According to Alexandre +- Duret-Lutz, this is the portable way do to it. Fix typo in comment. +- * dmidecode.c: Fix typo. +- +-2003-10-16 Jean Delvare +- +- * dmidecode.c: Remove useless comparison in dmi_system_boot_status. +- Thanks to Alexandre Duret-Lutz for pointing this out. +- * biosdecode.c: Add a missing length check in acpi_decode. Found +- using Valgrind. +- * biosdecode.c: Fix buffer overrun in main. Found using Valgrind. +- +-2003-10-14 Jean Delvare +- +- * dmidecode.c: Update DMTF reference addresses. +- * dmidecode.c: List two more processors (Athlon64 and Pentium M) +- as x86-class (i.e. supporting CPUID). +- +-2003-10-11 Jean Delvare +- +- Update to support DMTF Master MIF version 030621 (was 021205). +- +- * dmidecode.c: Handle unknown processor voltage. +- * dmidecode.c: Fix typo in event log method. +- * dmidecode.c: One additional processor type (Pentium M). +- * dmidecode.c: Add the AMD Opteron to the list of x86-class +- processors. Thanks to Mike Cooper for providing information. +- * vpddecode.c: New program for decoding a machine's VPD structure +- (only found in IBM machines). +- * Makefile: Update accordingly. +- * Makefile: Fix dependencies for ownership. Add strip target. Various +- cleanups (reordering, comments, optimization and debug flags). +- * README: Update to reflect the addition of the strip target and the +- vpddecode program. Some additional changes and fixes. +- +-2003-10-10 Jean Delvare +- +- * dmidecode.c: Change mmap options to prevent dmidecode from being +- killed by the Linux kernel in some rare cases. Reported by +- Mike Cooper. +- * dmidecode.c: Various code cleanups and optimizations. +- +-2003-10-09 Jean Delvare +- +- * dmidecode.c: Fix a bug that prevented dmidecode to reach DMI tables +- beyond the 2GB memory limit. Reported by Mike Cooper. +- * ownership.c: Add one reference. Code cleanups. +- * CHANGELOG: Fix typo. +- +-2003-10-08 Jean Delvare +- +- * biosdecode.c: Fix potentially wrong checksum on Sony-specific entry. +- * biosdecode.c: Unimportant changes (comment, typo...) in +- Compaq-specific section. +- * biosdecode.c: Add support for VPD (vital product data, IBM-specific). +- * CHANGELOG: Various updates. +- +-2003-10-07 Jean Delvare +- +- * ownership.c: Fix a harmless warning on x86_64. Reported by Mike +- Cooper. +- +-2003-09-19 Jean Delvare +- +- * dmidecode.c: Explicitly say when no SMBIOS nor DMI entry point +- was found. Implicitly suggested by Sergey Leonovich. +- +-2003-09-11 Jean Delvare +- +- * Makefile: Don't use $^ since it isn't supported by BSD make. +- Reported by Hugues Lepesant. +- +-2003-09-05 Jean Delvare +- +- * Makefile: Fix missing ownership dependency for install target. +- Reported by Mario Lang. +- +-2003-08-08 Jean Delvare +- +- * dmidecode.c: Update the README file (mainly the now solved laptop +- and IA-64 issues, and add a section for biosdecode and ownership). +- * version.h: Set version to 2.2. +- +-2003-07-18 Jean Delvare +- +- * dmidecode.c: Display CPUID values as hexadecimal, not decimal. +- * dmidecode.c: Shift the I2C slave address by one bit to the right +- (DMI case 38). +- +-2003-06-27 Jean Delvare +- +- * biosdecode.c: Better display of Compaq-specific entries (thank to +- some documentation). +- +-2003-06-25 Jean Delvare +- +- * dmidecode.c: Remove fp_last (not useful anymore). Reworded the "table +- is unreachable" message to mention the -DUSE_MMAP solution. +- +-2003-06-19 Jean Delvare +- +- * dmidecode.c: Add support for IA-64. +- * Makefile: Add new option CFLAGS modifier lines for IA-64. +- +-2003-06-17 Jean Delvare +- +- * dmidecode.c, biosdecode.c: Move common "util" functions to util.c. +- * util.c, util.h: New. +- * types.h: New. +- * Makefile: Update accordingly. +- * biosdecode.c: Add detection of Compaq-specific entries. +- * ownership.c: New program for finding a machine's ownership tag +- (only found in Compaq machines). Requested by Luc Van de Velde. +- * Makefile: Update again. +- +-2003-06-10 Jean Delvare +- +- * dmidecode.c: Fix typo in IPMI register spacing table. +- * version.h: Set version to 2.1. +- +-2003-06-04 Jean Delvare +- +- * Makefile: Restore optional CFLAGS modifier lines. +- * README: New. +- +-2003-05-30 Jean Delvare +- +- * dmidecode.c: Cleaner handling of unreachable table. +- +-2003-05-27 Jean Delvare +- +- Update to support Intel AP-485 specification (CPUID) revision 023 +- (was 021). +- +- * dmidecode.c: Add SBF flag to processor ID (DMI case 4). Add comment +- about new flags returned in ECX. +- +-2003-05-26 Jean Delvare +- +- Update to support SMBIOS specification version 2.3.4 (was 2.3.3). +- +- * dmidecode.c: Add processor and processor upgrade names (DMI case 4). +- * dmidecode.c: Add slot names (DMI case 9). +- +-2003-05-22 Jean Delvare +- +- * dmidecode.c: Fix typo reported by David Wilson (DMI case 6). +- +-2003-03-08 Jean Delvare +- +- * dmidecode.c: Decode more fields according to the IPMI specification +- (DMI case 38). +- +-2003-03-07 Jean Delvare +- +- Fixed IPMI device information (DMI case 38). Thanks to Richard Sharpe +- for pointing the bugs out. +- +- * dmidecode.c: Fix IPMI interface type being shifted by one. +- * dmidecode.c: Fix NV storage device being improperly displayed. +- * dmidecode.c: Reword IPMI specification revision into specification +- version, as suggested in the IPMI specification itself. +- * dmidecode.c: Add a reference to the IPMI specification. +- * dmidecode.c: Show I2C address as hexadecimal. +- * dmidecode.c: Base address is a QWORD, not DWORD. +- * dmidecode.c: Decode some extra fields according to the IPMI +- specification. +- +-2003-03-06 Jean Delvare +- +- * dmidecode.c, biosdecode.c: Move all changelog entries to CHANGELOG. +- * CHANGELOG: New. Format inspired by Heroes' ChangeLog file. +- * dmidecode.c, biosdecode.c, Makefile: Update copyright years. +- * dmidecode.c, biosdecode.c, Makefile: Move version definition to +- version.h. Update dependencies accordingly. +- * version.h: New. +- +-2002-10-21 Jean Delvare +- +- * dmidecode.c: Change supported log type descriptors display. +- * dmidecode.c: Code optimization in event log status. +- * dmidecode.c: Remove extra newline in voltage probe accuracy. +- * dmidecode.c: Display "OEM-specific" if type is 128 or more. +- * dmidecode.c: Do not display Strings on dump if there are no strings. +- * dmidecode.c: Add ASCII-filtering to dmi_string. +- * dmidecode.c: Convert all dates to ISO 8601. +- +-2002-10-18 Jean Delvare +- +- * dmidecode.c: Complete rewrite. +- * dmidecode.c: Now complies with SMBIOS specification 2.3.3. +- * dmidecode.c: Move all non-DMI stuff to biosdecode.c. +- * biosdecode.c: New. +- +-2002-10-15 Jean Delvare +- +- * dmidecode.c: Fix bad index in DMI case 27 (cooling device). +- +-2002-10-14 Jean Delvare +- +- * dmidecode.c: Fix typo in dmi_memory_array_location. +- * dmidecode.c: Replace Kbyte by kB in DMI case 16. +- * dmidecode.c: Add DDR entry in dmi_memory_device_type. +- * dmidecode.c: Fix extra s in SYSID. +- +-2002-10-12 Jean Delvare +- +- * dmidecode.c: Fix maximum cache size and installed size being +- inverted. +- * dmidecode.c: Fix typos in port types. +- +-2002-10-10 Jean Delvare +- +- * dmidecode.c: Remove extra semicolon at the end of +- dmi_memory_array_use. +- * dmidecode.c: Fix compilation warnings. +- * dmidecode.c: Add missing backslash in DMI case 37. +- * dmidecode.c: Fix BIOS ROM size (DMI case 0). +- +-2002-10-05 Jean Delvare +- +- * dmidecode.c: More ACPI decoded. +- * dmidecode.c: More PNP decoded. +- * dmidecode.c: More SYSID decoded. +- * dmidecode.c: PCI Interrupt Routing decoded. +- * dmidecode.c: BIOS32 Service Directory decoded. +- * dmidecode.c: Sony system detection (unconfirmed). +- * dmidecode.c: Checksums verified whenever possible. +- * dmidecode.c: Better checks on file read and close. +- * dmidecode.c: Define VERSION and display version at beginning. +- * dmidecode.c: More secure decoding (won't run off the table in any +- case). +- * dmidecode.c: Do not try to decode more structures than announced. +- * dmidecode.c: Fix an off-by-one error that caused the last address +- being scanned to be 0x100000, not 0xFFFF0 as it should. +- +-2002-09-28 Jean Delvare +- +- * dmidecode.c: Fix missing coma in dmi_bus_name. +- * dmidecode.c: Remove unwanted bitmaskings in dmi_mgmt_dev_type, +- dmi_mgmt_addr_type, dmi_fan_type, dmi_volt_loc, dmi_temp_loc and +- dmi_status. +- * dmidecode.c: Fix DMI table read bug ("dmi: read: Success"). +- * dmidecode.c: Make the code pass -W again. +- * dmidecode.c: Fix return value of dmi_card_size. +- +-2002-09-20 Dave Johnson +- +- * dmidecode.c: Fix comparisons in dmi_bus_name. +- * dmidecode.c: Fix comparison in dmi_processor_type. +- * dmidecode.c: Fix bitmasking in dmi_onboard_type. +- * dmidecode.c: Fix return value of dmi_temp_loc. +- +-2002-09-17 Larry Lile +- +- * dmidecode.c: Type 16 & 17 structures displayed per SMBIOS 2.3.1 spec. +- +-2002-08-23 Alan Cox +- +- * dmidecode.c: Make the code pass -Wall -pedantic by fixing a few +- harmless sign of pointer mismatches. +- * dmidecode.c: Correct main() prototype. +- * dmidecode.c: Check for compilers with wrong type sizes. +- +-2002-08-09 Jean Delvare +- +- * dmidecode.c: Better DMI struct count/size error display. +- * dmidecode.c: More careful memory access in dmi_table. +- * dmidecode.c: DMI case 13 (Language) decoded. +- * dmidecode.c: C++ style comments removed. Commented out code removed. +- * dmidecode.c: DMI 0.0 case handled. +- * dmideocde.c: Fix return value of dmi_port_type and +- dmi_port_connector_type. +- +-2002-08-06 Jean Delvare +- +- * dmidecode.c: Reposition file pointer after DMI table display. +- * dmidecode.c: Disable first RSD PTR checksum (was not correct anyway). +- * dmidecode.c: Show actual DMI struct count and occupied size. +- * dmidecode.c: Check for NULL after malloc. +- * dmidecode.c: Use SEEK_* constants instead of numeric values. +- * dmidecode.c: Code optimization (and warning fix) in DMI cases 10 and +- 14. +- * dmidecode.c: Add else's to avoid unneeded cascaded if's in main loop. +- * dmidecode.c: Code optimization in DMI information display. +- * dmidecode.c: Fix all compilation warnings. +- +-2002-08-03 Mark D. Studebaker +- +- * dmidecode.c: Better indent in dump_raw_data. +- * dmidecode.c: Fix return value of dmi_bus_name. +- * dmidecode.c: Additional sensor fields decoded. +- * dmidecode.c: Fix compilation warnings. +- +-2001-12-13 Arjan van de Ven +- +- * dmidecode.c: Fix memory bank type (DMI case 6). +- +-2001-07-02 Matt Domsch +- +- * dmidecode.c: Additional structures displayed per SMBIOS 2.3.1 spec. +diff --git a/NEWS b/NEWS +new file mode 100644 +index 0000000..827dafd +--- /dev/null ++++ b/NEWS +@@ -0,0 +1,123 @@ ++Version 3.1 (Tue May 23 2017) ++ - Support for SMBIOS 3.1.0 and 3.1.1. This includes new chassis types, new ++ processor family names, new processor family upgrade names, and new slot ++ types, as well as support of larger BIOS ROM sizes and cache sizes, and a ++ new structure type (43, TPM Device.) ++ - A new command line option to query OEM strings. ++ - All error messages are now printed on stderr (#47274, #48158.) ++ - Several bug fixes related to 64-bit entry points (#50037 and more.) ++ - Important bug fixes: ++ #46176 (Unexpected end of file error) ++ #46066 (Crash with SIGBUS) ++ - Various minor fixes, improvements and cleanups. ++ ++Version 3.0 (Thu Sep 03 2015) ++ - Support for SMBIOS 3.0. This includes new chassis types, new ++ processor family names, new processor family upgrade names, new slot ++ types, and new memory device types. ++ - Support for the new 64-bit entry point (_SM3_) defined in SMBIOS 3.0. ++ - Support for the new kernel interface (as of Linux v4.2) as an ++ alternative to relying /dev/mem to access the entry point and DMI ++ table. ++ - Decoding of Acer-specific DMI type 170. ++ - Decoding of HP-specific DMI types 212, 219 and 233. ++ - Various minor fixes and output format cleanups. ++ ++Version 2.12 (Wed Apr 17 2013) ++ - Support of the SMBIOS 2.8.0 specification. ++ ++Version 2.11 (Wed Jan 19 2011) ++ - Support of the SMBIOS 2.7.0 specification: ++ - UEFI support ++ - Virtual machine flags in BIOS characteristics ++ - Limited support for the Management Controller Host Interface ++ - Various fixes that address stability. ++ ++Version 2.10 (Sun Nov 23 2008) ++ - Support for Solaris (x86 only, of course). ++ - Possibility to dump the SMBIOS/DMI table to a small binary file ++ (option --dump-bin). ++ - Possibility to read the SMBIOS/DMI table from such binary files ++ (option --from-dump). ++ - Support for SMBIOS 2.6. This includes new chassis types, new ++ processor family names, new processor family upgrade names, bus ++ address for system slots, and a new entry type for on-board devices, ++ amongst many other minor changes. ++ - Support for DMI entry type 31 (Boot integrity services). ++ - Many processor family names taken from the CIM Schema document. ++ - (vpddecode) No longer ask users to report broken records. ++ - (vpddecode) Fix --quiet option. ++ ++Version 2.9 (Mon Feb 26 2007) ++ - Support of the SMBIOS 2.5 specification. It adds many enumerated ++ values for recent hardware, as well as CPU core and thread count ++ reporting. ++ - Decoding of 3 HP-specific entries. More vendor-specific entries can ++ be supported later if vendors contribute code or documentation. ++ - Run-time detection of EFI, so that a single binary can support ++ Intel-based Macintosh machines and regular x86 machines. ++ - Better IA-64 support. ++ - Fixes to the decoding of individual fields, including the CPU ++ signature of recent CPU models. ++ - (biosdecode) Support of the FJKEYINF entry point type (for Fujitsu laptops). ++ - (vpddecode) The product name look-up table was dropped. It was unreliable ++ and a burden to maintain. ++ - biosdecode, ownership and vpddecode are no longer built on IA-64. ++ ++Version 2.8 (Sat Feb 04 2006) ++ - Option --string has four additional keywords available: ++ system-uuid, chassis-type, processor-family and processor-frequency. ++ These needed additional work because, technically speaking, they are ++ not DMI strings. ++ - IPMI interface type SSIF was added. This is a new interface type ++ defined by IPMI 2.0. ++ - (vpddecode) New --string option, much similar in spirit to ++ dmidecode's. Available keywords are bios-build-id, box-serial-number, ++ motherboard-serial-number, machine-type-model and bios-release-date. ++ - (vpddecode) 9 product names were added to the lookup table. ++ - A few bug fixes, cleanups and minor improvements all around the place. ++ ++Version 2.7 (Thu Aug 04 2005) ++ - New command line interface. For example, it is now possible to limit ++ the output of dmidecode to a given DMI type, or to extract a single ++ string from the DMI table. The documentation has been updated ++ accordingly. ++ - The default output of dmidecode was slightly modified to be more ++ easily readable by humans. This might break tools parsing its output. ++ Such tools may benefit from the new command line interface, although ++ this interface shouldn't be considered stable until version 2.8. ++ - (vpddecode) New command line interface. ++ - (vpddecode) 6 product names were added. ++ ++Version 2.6 (Mon Feb 28 2005) ++ - Fixes a 2 GB memory limit regression. ++ - Basic command-line handling. ++ - BeOS and Cygwin support. ++ ++Version 2.5 (Thu Nov 11 2004) ++ - Code cleanups. ++ - Compatibility fixes. ++ - Documentation updates. ++ ++Version 2.4 (Fri Mar 19 2004) ++ - Manual pages added. ++ - (vpddecode) Many improvements. ++ - A few fixes and minor improvements. ++ ++Version 2.3 (Sun Oct 19 2003) ++ - Support of x86_64 systems. ++ - Support of systems with 2 GB and more memory. ++ - Loads of bug fixes and corrections. ++ - New tool "vpddecode" added. ++ ++Version 2.2 (Fri Aug 08 2003) ++ - Support of IA-64 systems. ++ - Support of IBM and Fujitsu-Siemens laptops. ++ - Many minor bug fixes. ++ - New tool "ownership" added. ++ ++Version 2.1 (Tue Jun 10 2003) ++ - Support of the SMBIOS 2.3.4 specification. ++ - Better support of IPMI. ++ - Minor bugs fixed. ++ - Documentation added. +-- +2.9.5 + diff --git a/SOURCES/0002-dmidecode-Unmask-LRDIMM-in-memory-type-detail.patch b/SOURCES/0002-dmidecode-Unmask-LRDIMM-in-memory-type-detail.patch deleted file mode 100644 index 3034852..0000000 --- a/SOURCES/0002-dmidecode-Unmask-LRDIMM-in-memory-type-detail.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 23aa50565a65c98fc452ed8ffdffb49b6504941d Mon Sep 17 00:00:00 2001 -From: Petr Oros -Date: Thu, 30 Jun 2016 11:50:30 +0200 -Subject: [PATCH 2/9] dmidecode: Unmask LRDIMM in memory type detail - -For memory with bit 15 only set, dmidecode would show "None" in type -detail. - -Fixes: 0740adaea98a ("Bump release verison to 2.12") -Signed-off-by: Petr Oros -Signed-off-by: Jean Delvare ---- - AUTHORS | 1 + - CHANGELOG | 4 ++++ - dmidecode.c | 2 +- - 3 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/AUTHORS b/AUTHORS -index ccf7fbb..748b985 100644 ---- a/AUTHORS -+++ b/AUTHORS -@@ -20,6 +20,7 @@ Anton Arapov - Roy Franz - Tyler Bell - Xie XiuQi -+Petr Oros - - MANY THANKS TO (IN CHRONOLOGICAL ORDER) - Werner Heuser -diff --git a/CHANGELOG b/CHANGELOG -index ba61cab..ebae4b3 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,7 @@ -+2016-06-30 Petr Oros -+ -+ * dmidecode.c: Unmask LRDIMM in memory type detail (DMI type 17). -+ - 2015-11-02 Jean Delvare - - * dmidecode.c, util.c, util.h: Let read_file return the actual data -diff --git a/dmidecode.c b/dmidecode.c -index 84c18e1..48d9e66 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -2392,7 +2392,7 @@ static void dmi_memory_device_type_detail(u16 code) - "LRDIMM" /* 15 */ - }; - -- if ((code & 0x7FFE) == 0) -+ if ((code & 0xFFFE) == 0) - printf(" None"); - else - { --- -2.10.2 diff --git a/SOURCES/0002-dmioem-decode-HPE-UEFI-type-219-Misc-Features.patch b/SOURCES/0002-dmioem-decode-HPE-UEFI-type-219-Misc-Features.patch new file mode 100644 index 0000000..a16590c --- /dev/null +++ b/SOURCES/0002-dmioem-decode-HPE-UEFI-type-219-Misc-Features.patch @@ -0,0 +1,36 @@ +From 2ba4fab210e23cc97db57217af9a6f3b35a9b666 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Wed, 11 Apr 2018 14:33:20 +0200 +Subject: [PATCH 2/3] dmioem: decode HPE UEFI type 219 Misc Features + +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(-) + +diff --git a/dmioem.c b/dmioem.c +index 8a72ac9..1742330 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -268,7 +268,7 @@ static int dmi_decode_hp(const struct dmi_header *h) + 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: +-- +2.9.5 + diff --git a/SOURCES/0003-Fix-error-paths-in-mem_chunk.patch b/SOURCES/0003-Fix-error-paths-in-mem_chunk.patch deleted file mode 100644 index e57f46d..0000000 --- a/SOURCES/0003-Fix-error-paths-in-mem_chunk.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 458f73d58c24a7addce82bf1e8bfb8c2554ca458 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Wed, 14 Oct 2015 14:37:09 +0200 -Subject: [PATCH 3/9] Fix error paths in mem_chunk - -Use a common error path in function mem_chunk, to make sure it does -not leak memory and does not leave an opened file descriptor behind, -without duplicating the cleaning code. ---- - CHANGELOG | 1 + - util.c | 24 ++++++++++-------------- - 2 files changed, 11 insertions(+), 14 deletions(-) - -diff --git a/CHANGELOG b/CHANGELOG -index aa1c28f..c940c9f 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -3,6 +3,7 @@ - * util.c: Avoid SIGBUS on mmap failure. - This fixes Savannah bug #46066: - https://savannah.nongnu.org/bugs/?46066 -+ * util.c: Fix error paths in mem_chunk. - - 2015-10-01 Roy Franz - -diff --git a/util.c b/util.c -index 5795d02..f97ac0d 100644 ---- a/util.c -+++ b/util.c -@@ -166,7 +166,7 @@ void *mem_chunk(off_t base, size_t len, const char *devmem) - if ((p = malloc(len)) == NULL) - { - perror("malloc"); -- return NULL; -+ goto out; - } - - #ifdef USE_MMAP -@@ -174,8 +174,7 @@ void *mem_chunk(off_t base, size_t len, const char *devmem) - { - fprintf(stderr, "%s: ", devmem); - perror("stat"); -- free(p); -- return NULL; -+ goto err_free; - } - - /* -@@ -186,8 +185,7 @@ void *mem_chunk(off_t base, size_t len, const char *devmem) - { - fprintf(stderr, "mmap: Can't map beyond end of file %s\n", - devmem); -- free(p); -- return NULL; -+ goto err_free; - } - - #ifdef _SC_PAGESIZE -@@ -220,19 +218,17 @@ try_read: - { - fprintf(stderr, "%s: ", devmem); - perror("lseek"); -- free(p); -- return NULL; -+ goto err_free; - } - -- if (myread(fd, p, len, devmem) == -1) -- { -- free(p); -- return NULL; -- } -+ if (myread(fd, p, len, devmem) == 0) -+ goto out; -+ -+err_free: -+ free(p); -+ p = NULL; - --#ifdef USE_MMAP - out: --#endif - if (close(fd) == -1) - perror(devmem); - --- -2.5.0 - diff --git a/SOURCES/0003-Fix-install-doc-target.patch b/SOURCES/0003-Fix-install-doc-target.patch new file mode 100644 index 0000000..b9f9d88 --- /dev/null +++ b/SOURCES/0003-Fix-install-doc-target.patch @@ -0,0 +1,46 @@ +From 371056cc0345ba8e950f0c002a0e145a3930b39c Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Mon, 17 Jul 2017 09:45:39 +0200 +Subject: [PATCH 03/10] Fix install-doc target + +CHANGELOG was replaced by NEWS but I forgot to update the references +to that file. + +This fixes bug #51475: +https://savannah.nongnu.org/bugs/?51475 + +Fixes: 82a34ddbc524 ("Goodbye CHANGELOG, welcome NEWS") +--- + Makefile | 2 +- + README | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 1f54a1f..77c9310 100644 +--- a/Makefile ++++ b/Makefile +@@ -134,7 +134,7 @@ uninstall-man : + install-doc : + $(INSTALL_DIR) $(DESTDIR)$(docdir) + $(INSTALL_DATA) README $(DESTDIR)$(docdir) +- $(INSTALL_DATA) CHANGELOG $(DESTDIR)$(docdir) ++ $(INSTALL_DATA) NEWS $(DESTDIR)$(docdir) + $(INSTALL_DATA) AUTHORS $(DESTDIR)$(docdir) + + uninstall-doc : +diff --git a/README b/README +index f612b36..c87e52c 100644 +--- a/README ++++ b/README +@@ -56,7 +56,7 @@ Each tool has a manual page, found in the "man" subdirectory. Manual pages + are installed by "make install". See these manual pages for command line + interface details and tool specific information. + +-For an history of the changes made to dmidecode, see the CHANGELOG file. ++For an history of the changes made to dmidecode, see the NEWS file. + + If you need help, your best chances are to visit the web page (see the + INSTALLATION section above) or to get in touch with the developers directly. +-- +2.9.5 + diff --git a/SOURCES/0003-dmidecode-Clarify-error-message-on-table-read-failur.patch b/SOURCES/0003-dmidecode-Clarify-error-message-on-table-read-failur.patch deleted file mode 100644 index fc43e20..0000000 --- a/SOURCES/0003-dmidecode-Clarify-error-message-on-table-read-failur.patch +++ /dev/null @@ -1,37 +0,0 @@ -From dcbff064744f8b7c0d53d6932d25708b4bb13b4f Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Fri, 22 Jul 2016 10:26:41 +0200 -Subject: [PATCH 3/9] dmidecode: Clarify error message on table read failure - -Stop using the term "unreachable" when the DMI table can't be read. It -originates from the /dev/mem access method, but no longer makes sense -when reading from sysfs or from a binary dump file. - -Also don't suggest building with -DUSE_MMAP if reading from sysfs, as -it wouldn't help anyway. ---- - dmidecode.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index 48d9e66..ffd916c 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4550,11 +4550,12 @@ static void dmi_table(off_t base, u32 len, u16 num, u16 ver, const char *devmem, - - if (buf == NULL) - { -- fprintf(stderr, "Table is unreachable, sorry." -+ fprintf(stderr, "Failed to read table, sorry.\n"); - #ifndef USE_MMAP -- " Try compiling dmidecode with -DUSE_MMAP." -+ if (!(flags & FLAG_NO_FILE_OFFSET)) -+ fprintf(stderr, -+ "Try compiling dmidecode with -DUSE_MMAP.\n"); - #endif -- "\n"); - return; - } - --- -2.10.2 diff --git a/SOURCES/0003-dmidecode-Use-lowercase-letters-for-UUID.patch b/SOURCES/0003-dmidecode-Use-lowercase-letters-for-UUID.patch new file mode 100644 index 0000000..468914a --- /dev/null +++ b/SOURCES/0003-dmidecode-Use-lowercase-letters-for-UUID.patch @@ -0,0 +1,36 @@ +From aec83995082070c47edf394c4b7f9f17fea7fd16 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Mon, 16 Apr 2018 09:42:25 +0200 +Subject: [PATCH 3/3] dmidecode: Use lowercase letters for UUID + +RFC 4122 asks for letters a-f in UUID to be lowercase. Follow this +recommendation. + +This closes bug #53569: +https://savannah.nongnu.org/bugs/index.php?53569 + +--- + dmidecode.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dmidecode.c b/dmidecode.c +index a593170..d18a258 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -445,11 +445,11 @@ static void dmi_system_uuid(const u8 *p, u16 ver) + * for older versions. + */ + if (ver >= 0x0206) +- printf("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", ++ printf("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + p[3], p[2], p[1], p[0], p[5], p[4], p[7], p[6], + p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]); + else +- printf("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", ++ printf("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], + p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]); + } +-- +2.9.5 + diff --git a/SOURCES/0004-biosdecode-Add-option-pir-full.patch b/SOURCES/0004-biosdecode-Add-option-pir-full.patch new file mode 100644 index 0000000..36cfdee --- /dev/null +++ b/SOURCES/0004-biosdecode-Add-option-pir-full.patch @@ -0,0 +1,136 @@ +From 6486331cf66e35bcf01e1c15c4396af68b6eb4d4 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 25 Jul 2017 11:21:22 +0200 +Subject: [PATCH 04/10] biosdecode: Add option --pir full + +Add an option to decode the details of the PIR table. + +This implements support request #109339: +https://savannah.nongnu.org/support/index.php?109339 + +--- + biosdecode.c | 59 +++++++++++++++++++++++++++++++------------------------- + man/biosdecode.8 | 3 +++ + 2 files changed, 36 insertions(+), 26 deletions(-) + +diff --git a/biosdecode.c b/biosdecode.c +index ad3d4bc..8293e61 100644 +--- a/biosdecode.c ++++ b/biosdecode.c +@@ -73,12 +73,16 @@ struct opt + { + const char *devmem; + unsigned int flags; ++ unsigned char pir; + }; + static struct opt opt; + + #define FLAG_VERSION (1 << 0) + #define FLAG_HELP (1 << 1) + ++#define PIR_SHORT 0 ++#define PIR_FULL 1 ++ + struct bios_entry { + const char *anchor; + size_t anchor_len; /* computed */ +@@ -386,32 +390,29 @@ static int pir_decode(const u8 *p, size_t len) + i, p[(i + 1) * 16], p[(i + 1) * 16 + 1] >> 3); + pir_slot_number(p[(i + 1) * 16 + 14]); + printf("\n"); +-/* printf("\tSlot Entry %u\n", i); +- printf("\t\tID: %02x:%02x\n", +- p[(i + 1) * 16], p[(i + 1) * 16 + 1] >> 3); +- printf("\t\tLink Value for INTA#: %u\n", +- p[(i + 1) * 16 + 2]); +- printf("\t\tIRQ Bitmap for INTA#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 3)); +- printf("\n"); +- printf("\t\tLink Value for INTB#: %u\n", +- p[(i + 1) * 16 + 5]); +- printf("\t\tIRQ Bitmap for INTB#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 6)); +- printf("\n"); +- printf("\t\tLink Value for INTC#: %u\n", +- p[(i + 1) * 16 + 8]); +- printf("\t\tIRQ Bitmap for INTC#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 9)); +- printf("\n"); +- printf("\t\tLink Value for INTD#: %u\n", +- p[(i + 1) * 16 + 11]); +- printf("\t\tIRQ Bitmap for INTD#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 12)); +- printf("\n"); +- printf("\t\tSlot Number:"); +- pir_slot_number(p[(i + 1) * 16 + 14]); +- printf("\n");*/ ++ if (opt.pir == PIR_FULL) ++ { ++ printf("\t\tLink Value for INTA#: %u\n", ++ p[(i + 1) * 16 + 2]); ++ printf("\t\tIRQ Bitmap for INTA#:"); ++ pir_irqs(WORD(p + (i + 1) * 16 + 3)); ++ printf("\n"); ++ printf("\t\tLink Value for INTB#: %u\n", ++ p[(i + 1) * 16 + 5]); ++ printf("\t\tIRQ Bitmap for INTB#:"); ++ pir_irqs(WORD(p + (i + 1) * 16 + 6)); ++ printf("\n"); ++ printf("\t\tLink Value for INTC#: %u\n", ++ p[(i + 1) * 16 + 8]); ++ printf("\t\tIRQ Bitmap for INTC#:"); ++ pir_irqs(WORD(p + (i + 1) * 16 + 9)); ++ printf("\n"); ++ printf("\t\tLink Value for INTD#: %u\n", ++ p[(i + 1) * 16 + 11]); ++ printf("\t\tIRQ Bitmap for INTD#:"); ++ pir_irqs(WORD(p + (i + 1) * 16 + 12)); ++ printf("\n"); ++ } + } + + return 1; +@@ -616,6 +617,7 @@ static int parse_command_line(int argc, char * const argv[]) + const char *optstring = "d:hV"; + struct option longopts[] = { + { "dev-mem", required_argument, NULL, 'd' }, ++ { "pir", required_argument, NULL, 'P' }, + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' }, + { NULL, 0, NULL, 0 } +@@ -627,6 +629,10 @@ static int parse_command_line(int argc, char * const argv[]) + case 'd': + opt.devmem = optarg; + break; ++ case 'P': ++ if (strcmp(optarg, "full") == 0) ++ opt.pir = PIR_FULL; ++ break; + case 'h': + opt.flags |= FLAG_HELP; + break; +@@ -646,6 +652,7 @@ static void print_help(void) + "Usage: biosdecode [OPTIONS]\n" + "Options are:\n" + " -d, --dev-mem FILE Read memory from device FILE (default: " DEFAULT_MEM_DEV ")\n" ++ " --pir full Decode the details of the PCI IRQ routing table\n" + " -h, --help Display this help text and exit\n" + " -V, --version Display the version and exit\n"; + +diff --git a/man/biosdecode.8 b/man/biosdecode.8 +index c39d6a0..a96eb68 100644 +--- a/man/biosdecode.8 ++++ b/man/biosdecode.8 +@@ -60,6 +60,9 @@ program. + .BR "-d" ", " "--dev-mem FILE" + Read memory from device \fBFILE\fR (default: \fB/dev/mem\fR) + .TP ++.BR " " " " "--pir full" ++Decode the details of the PCI IRQ routing table ++.TP + .BR "-h" ", " "--help" + Display usage information and exit + .TP +-- +2.9.5 + diff --git a/SOURCES/0004-dmidecode-Handle-OEM-specific-types-in-group-associa.patch b/SOURCES/0004-dmidecode-Handle-OEM-specific-types-in-group-associa.patch deleted file mode 100644 index 945d53f..0000000 --- a/SOURCES/0004-dmidecode-Handle-OEM-specific-types-in-group-associa.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3acecbbab8ecaf3e3b324a2286e51cf9d7950ad5 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Tue, 20 Oct 2015 08:47:15 +0200 -Subject: [PATCH 4/9] dmidecode: Handle OEM-specific types in group - associations - ---- - CHANGELOG | 5 +++++ - dmidecode.c | 2 ++ - 2 files changed, 7 insertions(+) - -diff --git a/CHANGELOG b/CHANGELOG -index c940c9f..2aa1082 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,8 @@ -+2015-10-20 Jean Delvare -+ -+ * dmidecode.c: Handle OEM-specific types in group associations -+ (DMI type 14). -+ - 2015-10-14 Jean Delvare - - * util.c: Avoid SIGBUS on mmap failure. -diff --git a/dmidecode.c b/dmidecode.c -index f41c85b..ce0511b 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -172,6 +172,8 @@ static const char *dmi_smbios_structure_type(u8 code) - "Management Controller Host Interface", /* 42 */ - }; - -+ if (code >= 128) -+ return "OEM-specific"; - if (code <= 42) - return type[code]; - return out_of_spec; --- -2.5.0 - diff --git a/SOURCES/0004-dmidecode-Move-error-messages-to-stderr.patch b/SOURCES/0004-dmidecode-Move-error-messages-to-stderr.patch deleted file mode 100644 index 17e9713..0000000 --- a/SOURCES/0004-dmidecode-Move-error-messages-to-stderr.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 74614633b31a2ac01240c72890722a86a3f3fc97 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Fri, 22 Jul 2016 10:26:50 +0200 -Subject: [PATCH 4/9] dmidecode: Move error messages to stderr - -Consistently write error messages to stderr, to avoid messing up the -output of "dmidecode -s". Based on preliminary patches by -Kevin Bowling and Simon Rettberg. - -Fixes bug #47274: -https://savannah.nongnu.org/bugs/?47274 -Fixes bug #48158: -https://savannah.nongnu.org/bugs/?48158 -Supersedes patch #8989: -https://savannah.nongnu.org/patch/?8989 ---- - dmidecode.c | 37 ++++++++++++++++++++++++++----------- - 1 file changed, 26 insertions(+), 11 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index ffd916c..f56d0c5 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -2958,7 +2958,8 @@ static void dmi_fixup_type_34(struct dmi_header *h, int display) - && is_printable(p + 0x0B, 0x10 - 0x0B)) - { - if (!(opt.flags & FLAG_QUIET) && display) -- printf("Invalid entry length (%u). Fixed up to %u.\n", -+ fprintf(stderr, -+ "Invalid entry length (%u). Fixed up to %u.\n", - 0x10, 0x0B); - h->length = 0x0B; - } -@@ -4427,9 +4428,14 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, u16 ver, u32 flags) - */ - if (h.length < 4) - { -- printf("Invalid entry length (%u). DMI table is " -- "broken! Stop.\n\n", (unsigned int)h.length); -- opt.flags |= FLAG_QUIET; -+ if (!(opt.flags & FLAG_QUIET)) -+ { -+ fprintf(stderr, -+ "Invalid entry length (%u). DMI table " -+ "is broken! Stop.\n\n", -+ (unsigned int)h.length); -+ opt.flags |= FLAG_QUIET; -+ } - break; - } - -@@ -4490,11 +4496,11 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, u16 ver, u32 flags) - if (!(opt.flags & FLAG_QUIET)) - { - if (num && i != num) -- printf("Wrong DMI structures count: %d announced, " -+ fprintf(stderr, "Wrong DMI structures count: %d announced, " - "only %d decoded.\n", num, i); - if ((unsigned long)(data - buf) > len - || (num && (unsigned long)(data - buf) < len)) -- printf("Wrong DMI structures length: %u bytes " -+ fprintf(stderr, "Wrong DMI structures length: %u bytes " - "announced, structures occupy %lu bytes.\n", - len, (unsigned long)(data - buf)); - } -@@ -4539,7 +4545,7 @@ static void dmi_table(off_t base, u32 len, u16 num, u16 ver, const char *devmem, - buf = read_file(&size, devmem); - if (!(opt.flags & FLAG_QUIET) && num && size != (size_t)len) - { -- printf("Wrong DMI structures length: %u bytes " -+ fprintf(stderr, "Wrong DMI structures length: %u bytes " - "announced, only %lu bytes available.\n", - len, (unsigned long)size); - } -@@ -4652,14 +4658,16 @@ static int smbios_decode(u8 *buf, const char *devmem, u32 flags) - case 0x021F: - case 0x0221: - if (!(opt.flags & FLAG_QUIET)) -- printf("SMBIOS version fixup (2.%d -> 2.%d).\n", -- ver & 0xFF, 3); -+ fprintf(stderr, -+ "SMBIOS version fixup (2.%d -> 2.%d).\n", -+ ver & 0xFF, 3); - ver = 0x0203; - break; - case 0x0233: - if (!(opt.flags & FLAG_QUIET)) -- printf("SMBIOS version fixup (2.%d -> 2.%d).\n", -- 51, 6); -+ fprintf(stderr, -+ "SMBIOS version fixup (2.%d -> 2.%d).\n", -+ 51, 6); - ver = 0x0206; - break; - } -@@ -4771,6 +4779,13 @@ int main(int argc, char * const argv[]) - int efi; - u8 *buf; - -+ /* -+ * We don't want stdout and stderr to be mixed up if both are -+ * redirected to the same file. -+ */ -+ setlinebuf(stdout); -+ setlinebuf(stderr); -+ - if (sizeof(u8) != 1 || sizeof(u16) != 2 || sizeof(u32) != 4 || '\0' != 0) - { - fprintf(stderr, "%s: compiler incompatibility\n", argv[0]); --- -2.10.2 diff --git a/SOURCES/0005-Clarify-a-comment-in-dmi_memory_device_extended_size.patch b/SOURCES/0005-Clarify-a-comment-in-dmi_memory_device_extended_size.patch deleted file mode 100644 index 1f031e0..0000000 --- a/SOURCES/0005-Clarify-a-comment-in-dmi_memory_device_extended_size.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5696fa33e5f9fce843fa3b5972b87a705fed2067 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Wed, 7 Sep 2016 22:16:16 +0200 -Subject: [PATCH 5/9] Clarify a comment in dmi_memory_device_extended_size - -Improve the comment to avoid the confusion as reported in bug #48723: -http://savannah.nongnu.org/bugs/?48723 ---- - dmidecode.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/dmidecode.c b/dmidecode.c -index f56d0c5..f929b28 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -2277,7 +2277,10 @@ static void dmi_memory_device_extended_size(u32 code) - { - code &= 0x7FFFFFFFUL; - -- /* Use the most suitable unit depending on size */ -+ /* -+ * Use the greatest unit for which the exact value can be displayed -+ * as an integer without rounding -+ */ - if (code & 0x3FFUL) - printf(" %lu MB", (unsigned long)code); - else if (code & 0xFFFFFUL) --- -2.10.2 diff --git a/SOURCES/0005-Fix-No-SMBIOS-nor-DMI-entry-point-found-on-SMBIOS3.patch b/SOURCES/0005-Fix-No-SMBIOS-nor-DMI-entry-point-found-on-SMBIOS3.patch deleted file mode 100644 index d6ed349..0000000 --- a/SOURCES/0005-Fix-No-SMBIOS-nor-DMI-entry-point-found-on-SMBIOS3.patch +++ /dev/null @@ -1,63 +0,0 @@ -From bf7bad24ce141dab5b5acc3ffb98ce5fe4a8e0f9 Mon Sep 17 00:00:00 2001 -From: Xie XiuQi -Date: Wed, 21 Oct 2015 15:12:50 +0200 -Subject: [PATCH 5/9] Fix 'No SMBIOS nor DMI entry point found' on SMBIOS3 - -address_from_efi may return a SMBIOS or SMBIOS3 format entry -point, so add this condition. ---- - AUTHORS | 1 + - CHANGELOG | 4 ++++ - dmidecode.c | 12 ++++++++++-- - 3 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/AUTHORS b/AUTHORS -index d4badfa..ccf7fbb 100644 ---- a/AUTHORS -+++ b/AUTHORS -@@ -19,6 +19,7 @@ Jarod Wilson - Anton Arapov - Roy Franz - Tyler Bell -+Xie XiuQi - - MANY THANKS TO (IN CHRONOLOGICAL ORDER) - Werner Heuser -diff --git a/CHANGELOG b/CHANGELOG -index 2aa1082..be2092a 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,7 @@ -+2015-10-21 Xie XiuQi -+ -+ * dmidecode.c: Handle SMBIOS 3.0 entry points on EFI systems. -+ - 2015-10-20 Jean Delvare - - * dmidecode.c: Handle OEM-specific types in group associations -diff --git a/dmidecode.c b/dmidecode.c -index ce0511b..cfcade4 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4866,8 +4866,16 @@ int main(int argc, char * const argv[]) - goto exit_free; - } - -- if (smbios_decode(buf, opt.devmem, 0)) -- found++; -+ if (memcmp(buf, "_SM3_", 5) == 0) -+ { -+ if (smbios3_decode(buf, opt.devmem, 0)) -+ found++; -+ } -+ else if (memcmp(buf, "_SM_", 4) == 0) -+ { -+ if (smbios_decode(buf, opt.devmem, 0)) -+ found++; -+ } - goto done; - - memory_scan: --- -2.5.0 - diff --git a/SOURCES/0005-biosdecode-Clean-up-the-PIR-table-output.patch b/SOURCES/0005-biosdecode-Clean-up-the-PIR-table-output.patch new file mode 100644 index 0000000..7f8d8ae --- /dev/null +++ b/SOURCES/0005-biosdecode-Clean-up-the-PIR-table-output.patch @@ -0,0 +1,96 @@ +From baeacaa7b9930badc074eaad3700b075ed9d622f Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 25 Jul 2017 11:21:27 +0200 +Subject: [PATCH 05/10] biosdecode: Clean up the PIR table output + +* Remove entry numbers. +* Use "Device" instead of "ID". +* Put repeated code in a function. +* Don't display unconnected links. +* Shorten "slot number" to just "slot". + +--- + biosdecode.c | 42 ++++++++++++++++++------------------------ + 1 file changed, 18 insertions(+), 24 deletions(-) + +diff --git a/biosdecode.c b/biosdecode.c +index 8293e61..b37e510 100644 +--- a/biosdecode.c ++++ b/biosdecode.c +@@ -355,7 +355,7 @@ static void pir_slot_number(u8 code) + if (code == 0) + printf(" on-board"); + else +- printf(" slot number %u", code); ++ printf(" slot %u", code); + } + + static size_t pir_length(const u8 *p) +@@ -363,6 +363,16 @@ static size_t pir_length(const u8 *p) + return WORD(p + 6); + } + ++static void pir_link_bitmap(char letter, const u8 *p) ++{ ++ if (p[0] == 0) /* Not connected */ ++ return; ++ ++ printf("\t\tINT%c#: Link 0x%02x, IRQ Bitmap", letter, p[0]); ++ pir_irqs(WORD(p + 1)); ++ printf("\n"); ++} ++ + static int pir_decode(const u8 *p, size_t len) + { + int i; +@@ -372,7 +382,7 @@ static int pir_decode(const u8 *p, size_t len) + + printf("PCI Interrupt Routing %u.%u present.\n", + p[5], p[4]); +- printf("\tRouter ID: %02x:%02x.%1x\n", ++ printf("\tRouter Device: %02x:%02x.%1x\n", + p[8], p[9]>>3, p[9] & 0x07); + printf("\tExclusive IRQs:"); + pir_irqs(WORD(p + 10)); +@@ -386,32 +396,16 @@ static int pir_decode(const u8 *p, size_t len) + + for (i = 1; i <= (WORD(p + 6) - 32) / 16; i++) + { +- printf("\tSlot Entry %u: ID %02x:%02x,", +- i, p[(i + 1) * 16], p[(i + 1) * 16 + 1] >> 3); ++ printf("\tDevice: %02x:%02x,", ++ p[(i + 1) * 16], p[(i + 1) * 16 + 1] >> 3); + pir_slot_number(p[(i + 1) * 16 + 14]); + printf("\n"); + if (opt.pir == PIR_FULL) + { +- printf("\t\tLink Value for INTA#: %u\n", +- p[(i + 1) * 16 + 2]); +- printf("\t\tIRQ Bitmap for INTA#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 3)); +- printf("\n"); +- printf("\t\tLink Value for INTB#: %u\n", +- p[(i + 1) * 16 + 5]); +- printf("\t\tIRQ Bitmap for INTB#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 6)); +- printf("\n"); +- printf("\t\tLink Value for INTC#: %u\n", +- p[(i + 1) * 16 + 8]); +- printf("\t\tIRQ Bitmap for INTC#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 9)); +- printf("\n"); +- printf("\t\tLink Value for INTD#: %u\n", +- p[(i + 1) * 16 + 11]); +- printf("\t\tIRQ Bitmap for INTD#:"); +- pir_irqs(WORD(p + (i + 1) * 16 + 12)); +- printf("\n"); ++ pir_link_bitmap('A', p + (i + 1) * 16 + 2); ++ pir_link_bitmap('B', p + (i + 1) * 16 + 5); ++ pir_link_bitmap('C', p + (i + 1) * 16 + 8); ++ pir_link_bitmap('D', p + (i + 1) * 16 + 11); + } + } + +-- +2.9.5 + diff --git a/SOURCES/0006-Prevent-static-code-analyzer-confusion.patch b/SOURCES/0006-Prevent-static-code-analyzer-confusion.patch deleted file mode 100644 index 010b260..0000000 --- a/SOURCES/0006-Prevent-static-code-analyzer-confusion.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0b5c47c64b6fb3b626c5f75d9dc36bc864907fca Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Wed, 7 Sep 2016 22:16:20 +0200 -Subject: [PATCH 6/9] Prevent static code analyzer confusion - -As reported in bug #48723: -http://savannah.nongnu.org/bugs/?48723 - -This is a false positive and the static code analyzer output should -be made clearer. Nevertheless we can write the code differently so -that it doesn't trigger a warning. ---- - dmidecode.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dmidecode.c b/dmidecode.c -index f929b28..3993592 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -2283,7 +2283,7 @@ static void dmi_memory_device_extended_size(u32 code) - */ - if (code & 0x3FFUL) - printf(" %lu MB", (unsigned long)code); -- else if (code & 0xFFFFFUL) -+ else if (code & 0xFFC00UL) - printf(" %lu GB", (unsigned long)code >> 10); - else - printf(" %lu TB", (unsigned long)code >> 20); --- -2.10.2 diff --git a/SOURCES/0006-biosdecode-Avoid-repeating-pointer-arithmetic.patch b/SOURCES/0006-biosdecode-Avoid-repeating-pointer-arithmetic.patch new file mode 100644 index 0000000..2e568e1 --- /dev/null +++ b/SOURCES/0006-biosdecode-Avoid-repeating-pointer-arithmetic.patch @@ -0,0 +1,54 @@ +From 2b5c925d19e1eeecf6a24809396fed2774ee0695 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 25 Jul 2017 11:21:30 +0200 +Subject: [PATCH 06/10] biosdecode: Avoid repeating pointer arithmetic + +This makes the code both more efficient and more readable. + +--- + biosdecode.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/biosdecode.c b/biosdecode.c +index b37e510..99a27fe 100644 +--- a/biosdecode.c ++++ b/biosdecode.c +@@ -375,7 +375,7 @@ static void pir_link_bitmap(char letter, const u8 *p) + + static int pir_decode(const u8 *p, size_t len) + { +- int i; ++ int i, n; + + if (len < 32 || !checksum(p, WORD(p + 6))) + return 0; +@@ -394,18 +394,18 @@ static int pir_decode(const u8 *p, size_t len) + printf("\tMiniport Data: 0x%08X\n", + DWORD(p + 16)); + +- for (i = 1; i <= (WORD(p + 6) - 32) / 16; i++) ++ n = (len - 32) / 16; ++ for (i = 1, p += 32; i <= n; i++, p += 16) + { +- printf("\tDevice: %02x:%02x,", +- p[(i + 1) * 16], p[(i + 1) * 16 + 1] >> 3); +- pir_slot_number(p[(i + 1) * 16 + 14]); ++ printf("\tDevice: %02x:%02x,", p[0], p[1] >> 3); ++ pir_slot_number(p[14]); + printf("\n"); + if (opt.pir == PIR_FULL) + { +- pir_link_bitmap('A', p + (i + 1) * 16 + 2); +- pir_link_bitmap('B', p + (i + 1) * 16 + 5); +- pir_link_bitmap('C', p + (i + 1) * 16 + 8); +- pir_link_bitmap('D', p + (i + 1) * 16 + 11); ++ pir_link_bitmap('A', p + 2); ++ pir_link_bitmap('B', p + 5); ++ pir_link_bitmap('C', p + 8); ++ pir_link_bitmap('D', p + 11); + } + } + +-- +2.9.5 + diff --git a/SOURCES/0006-dmidecode-Introduce-SYS_FIRMWARE_DIR.patch b/SOURCES/0006-dmidecode-Introduce-SYS_FIRMWARE_DIR.patch deleted file mode 100644 index 2603de3..0000000 --- a/SOURCES/0006-dmidecode-Introduce-SYS_FIRMWARE_DIR.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2330b708a6d57fd2b8b7e353dd64d037f980a042 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Mon, 2 Nov 2015 09:45:13 +0100 -Subject: [PATCH 6/9] dmidecode: Introduce SYS_FIRMWARE_DIR - -Have SYS_FIRMWARE_DIR point to the sysfs directory where our files -live, and use it in the definition of their paths. This makes it -easier to temporarily point somewhere else for debugging. ---- - dmidecode.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/dmidecode.c b/dmidecode.c -index cfcade4..183ced4 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -74,8 +74,9 @@ static const char *bad_index = ""; - #define FLAG_NO_FILE_OFFSET (1 << 0) - #define FLAG_STOP_AT_EOT (1 << 1) - --#define SYS_ENTRY_FILE "/sys/firmware/dmi/tables/smbios_entry_point" --#define SYS_TABLE_FILE "/sys/firmware/dmi/tables/DMI" -+#define SYS_FIRMWARE_DIR "/sys/firmware/dmi/tables" -+#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point" -+#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI" - - /* - * Type-independant Stuff --- -2.5.0 - diff --git a/SOURCES/0007-Cygwin-is-no-longer-supported.patch b/SOURCES/0007-Cygwin-is-no-longer-supported.patch deleted file mode 100644 index 2c21217..0000000 --- a/SOURCES/0007-Cygwin-is-no-longer-supported.patch +++ /dev/null @@ -1,49 +0,0 @@ -From df9ebd5ffbe039550ca4f9d5075db09aa7dd2bfe Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Thu, 22 Sep 2016 17:59:09 +0200 -Subject: [PATCH 7/9] Cygwin is no longer supported - ---- - CHANGELOG | 4 ++++ - README | 7 +++---- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/CHANGELOG b/CHANGELOG -index ebae4b3..ac748b0 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,7 @@ -+2016-09-22 Jean Delvare -+ -+ * README: Explain that we can no longer support Cygwin. -+ - 2016-06-30 Petr Oros - - * dmidecode.c: Unmask LRDIMM in memory type detail (DMI type 17). -diff --git a/README b/README -index 391a5cb..f612b36 100644 ---- a/README -+++ b/README -@@ -28,7 +28,7 @@ and other interesting material, such as a list of related projects and - articles. - - This program was first written for Linux, and has since been reported to work --on FreeBSD, NetBSD, OpenBSD, BeOS, Cygwin and Solaris as well. -+on FreeBSD, NetBSD, OpenBSD, BeOS and Solaris as well. - - There's no configure script, so simply run "make" to build dmidecode, and - "make install" to install it. You also can use "make uninstall" to remove -@@ -83,9 +83,8 @@ successfully run. - - CYGWIN - --Dmidecode was reported to work under Cygwin. It seems that /dev/mem doesn't --work properly before version 1.5.10 though, so you will need to use at least --this version. -+Dmidecode used to work under Cygwin. However the /dev/mem interface was -+removed at some point in time so it no longer works. - - - ** MISCELLANEOUS TOOLS ** --- -2.10.2 diff --git a/SOURCES/0007-Let-read_file-return-the-actual-data-size.patch b/SOURCES/0007-Let-read_file-return-the-actual-data-size.patch deleted file mode 100644 index 031dd3d..0000000 --- a/SOURCES/0007-Let-read_file-return-the-actual-data-size.patch +++ /dev/null @@ -1,112 +0,0 @@ -From de9a74e1c60210bee229fcf55b1678a99d1b44dd Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Mon, 2 Nov 2015 09:45:26 +0100 -Subject: [PATCH 7/9] Let read_file return the actual data size - -Let read_file return the actual data size to the caller. This gives -the caller the possibility to check that the data size is as expected -and large enough for the purpose, and report to the user if not. ---- - CHANGELOG | 5 +++++ - dmidecode.c | 4 +++- - util.c | 11 +++++++---- - util.h | 2 +- - 4 files changed, 16 insertions(+), 6 deletions(-) - -diff --git a/CHANGELOG b/CHANGELOG -index be2092a..1e5437a 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,8 @@ -+2015-11-02 Jean Delvare -+ -+ * dmidecode.c, util.c, util.h: Let read_file return the actual data -+ size. -+ - 2015-10-21 Xie XiuQi - - * dmidecode.c: Handle SMBIOS 3.0 entry points on EFI systems. -diff --git a/dmidecode.c b/dmidecode.c -index 183ced4..a43cfd1 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4751,6 +4751,7 @@ int main(int argc, char * const argv[]) - int ret = 0; /* Returned value */ - int found = 0; - off_t fp; -+ size_t size; - int efi; - u8 *buf; - -@@ -4820,8 +4821,9 @@ int main(int argc, char * const argv[]) - * contain one of several types of entry points, so read enough for - * the largest one, then determine what type it contains. - */ -+ size = 0x20; - if (!(opt.flags & FLAG_NO_SYSFS) -- && (buf = read_file(0x20, SYS_ENTRY_FILE)) != NULL) -+ && (buf = read_file(&size, SYS_ENTRY_FILE)) != NULL) - { - if (!(opt.flags & FLAG_QUIET)) - printf("Getting SMBIOS data from sysfs.\n"); -diff --git a/util.c b/util.c -index f97ac0d..52ed413 100644 ---- a/util.c -+++ b/util.c -@@ -94,10 +94,11 @@ int checksum(const u8 *buf, size_t len) - * needs to be freed by the caller. - * This provides a similar usage model to mem_chunk() - * -- * Returns pointer to buffer of max_len bytes, or NULL on error -+ * Returns pointer to buffer of max_len bytes, or NULL on error, and -+ * sets max_len to the length actually read. - * - */ --void *read_file(size_t max_len, const char *filename) -+void *read_file(size_t *max_len, const char *filename) - { - int fd; - size_t r2 = 0; -@@ -115,7 +116,7 @@ void *read_file(size_t max_len, const char *filename) - return(NULL); - } - -- if ((p = malloc(max_len)) == NULL) -+ if ((p = malloc(*max_len)) == NULL) - { - perror("malloc"); - return NULL; -@@ -123,7 +124,7 @@ void *read_file(size_t max_len, const char *filename) - - do - { -- r = read(fd, p + r2, max_len - r2); -+ r = read(fd, p + r2, *max_len - r2); - if (r == -1) - { - if (errno != EINTR) -@@ -140,6 +141,8 @@ void *read_file(size_t max_len, const char *filename) - while (r != 0); - - close(fd); -+ *max_len = r2; -+ - return p; - } - -diff --git a/util.h b/util.h -index 9d409cd..b8748f1 100644 ---- a/util.h -+++ b/util.h -@@ -25,7 +25,7 @@ - #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) - - int checksum(const u8 *buf, size_t len); --void *read_file(size_t len, const char *filename); -+void *read_file(size_t *len, const char *filename); - void *mem_chunk(off_t base, size_t len, const char *devmem); - int write_dump(size_t base, size_t len, const void *data, const char *dumpfile, int add); - u64 u64_range(u64 start, u64 end); --- -2.5.0 - diff --git a/SOURCES/0007-dmioem-Reflect-HPE-s-new-company-name.patch b/SOURCES/0007-dmioem-Reflect-HPE-s-new-company-name.patch new file mode 100644 index 0000000..c9a10fc --- /dev/null +++ b/SOURCES/0007-dmioem-Reflect-HPE-s-new-company-name.patch @@ -0,0 +1,141 @@ +From ee07a1b4249560d620d05194eb8ff61b40d3ce23 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Wed, 13 Sep 2017 15:54:22 -0600 +Subject: [PATCH 07/10] dmioem: Reflect HPE's new company name + +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(-) + +diff --git a/dmioem.c b/dmioem.c +index 034ad9f..a032344 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -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 dmi_header *h) + 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 dmi_header *h) + 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 dmi_header *h) + * + * 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 dmi_header *h) + + 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 dmi_header *h) + * 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 dmi_header *h) + + 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 dmi_header *h) + + 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_header *h) + switch (dmi_vendor) + { + case VENDOR_HP: ++ case VENDOR_HPE: + return dmi_decode_hp(h); + case VENDOR_ACER: + return dmi_decode_acer(h); +-- +2.9.5 + diff --git a/SOURCES/0008-Only-decode-one-DMI-table.patch b/SOURCES/0008-Only-decode-one-DMI-table.patch deleted file mode 100644 index d4b28e4..0000000 --- a/SOURCES/0008-Only-decode-one-DMI-table.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 12fbde92a26da61eda9f2ff0ba3c316779163f10 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Fri, 20 Jan 2017 10:57:12 +0100 -Subject: [PATCH 8/9] Only decode one DMI table - -Since version 3.0.0 of the SMBIOS specification, there can be -multiple entry points in memory, pointing to one or two DMI tables. -If both a 32-bit ("_SM_") entry point and a 64-bit ("_SM3_") entry -point are present, the specification requires that the latter points -to a table which is a super-set of the table pointed to by the -former. Therefore it makes no sense to decode both. - -Per specification, look for a 64-bit ("_SM3_") entry point first, and -if we can't find any, look for a 32-bit ("_SM_" or "_DMI_") entry -point. - -This fixes bug #50022: -https://savannah.nongnu.org/bugs/?50022 ---- - CHANGELOG | 6 ++++++ - dmidecode.c | 19 ++++++++++++++----- - 2 files changed, 20 insertions(+), 5 deletions(-) - -diff --git a/CHANGELOG b/CHANGELOG -index ac748b0..67aef99 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,3 +1,9 @@ -+2017-01-20 Jean Delvare -+ -+ * dmidecode.c: Only decode one DMI table. -+ This fixes Savannah bug #50022: -+ https://savannah.nongnu.org/bugs/?50022 -+ - 2016-09-22 Jean Delvare - - * README: Explain that we can no longer support Cygwin. -diff --git a/dmidecode.c b/dmidecode.c -index 3993592..4b46a13 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4925,28 +4925,37 @@ memory_scan: - goto exit_free; - } - -- for (fp = 0; fp <= 0xFFF0; fp += 16) -+ /* Look for a 64-bit entry point first */ -+ for (fp = 0; fp <= 0xFFE0; fp += 16) - { -- if (memcmp(buf + fp, "_SM3_", 5) == 0 && fp <= 0xFFE0) -+ if (memcmp(buf + fp, "_SM3_", 5) == 0) - { - if (smbios3_decode(buf + fp, opt.devmem, 0)) - { - found++; -- fp += 16; -+ goto done; - } - } -- else if (memcmp(buf + fp, "_SM_", 4) == 0 && fp <= 0xFFE0) -+ } -+ -+ /* If none found, look for a 32-bit entry point */ -+ for (fp = 0; fp <= 0xFFF0; fp += 16) -+ { -+ if (memcmp(buf + fp, "_SM_", 4) == 0 && fp <= 0xFFE0) - { - if (smbios_decode(buf + fp, opt.devmem, 0)) - { - found++; -- fp += 16; -+ goto done; - } - } - else if (memcmp(buf + fp, "_DMI_", 5) == 0) - { - if (legacy_decode(buf + fp, opt.devmem, 0)) -+ { - found++; -+ goto done; -+ } - } - } - --- -2.10.2 diff --git a/SOURCES/0008-dmidecode-Use-read_file-to-read-the-DMI-table-from-s.patch b/SOURCES/0008-dmidecode-Use-read_file-to-read-the-DMI-table-from-s.patch deleted file mode 100644 index 97ca998..0000000 --- a/SOURCES/0008-dmidecode-Use-read_file-to-read-the-DMI-table-from-s.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 364055211b1956539c6a6268e111e244e1292c8c Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Mon, 2 Nov 2015 09:45:31 +0100 -Subject: [PATCH 8/9] dmidecode: Use read_file() to read the DMI table from - sysfs - -We shouldn't use mem_chunk() to read the DMI table from sysfs. This -will fail for SMBIOS v3 implementations which specify a maximum length -for the table rather than its exact length. The kernel will trim the -table to the actual length, so the DMI file will be shorter than the -length announced in entry point. - -read_file() fits the bill in this case, as it deals with end of file -nicely. - -This also helps with corrupted DMI tables, as the kernel will not -export the part of the table that it wasn't able to parse, effectively -trimming it. - -This fixes bug #46176: -https://savannah.nongnu.org/bugs/?46176 -Unexpected end of file error ---- - CHANGELOG | 3 +++ - dmidecode.c | 29 +++++++++++++++++++++-------- - 2 files changed, 24 insertions(+), 8 deletions(-) - -diff --git a/CHANGELOG b/CHANGELOG -index 1e5437a..fcfc244 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -2,6 +2,9 @@ - - * dmidecode.c, util.c, util.h: Let read_file return the actual data - size. -+ * dmidecode.c: Use read_file to read the DMI table from sysfs. -+ This fixes Savannah bug #46176: -+ https://savannah.nongnu.org/bugs/?46176 - - 2015-10-21 Xie XiuQi - -diff --git a/dmidecode.c b/dmidecode.c -index a43cfd1..16d1823 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4524,16 +4524,29 @@ static void dmi_table(off_t base, u32 len, u16 num, u16 ver, const char *devmem, - printf("\n"); - } - -- /* -- * When we are reading the DMI table from sysfs, we want to print -- * the address of the table (done above), but the offset of the -- * data in the file is 0. When reading from /dev/mem, the offset -- * in the file is the address. -- */ - if (flags & FLAG_NO_FILE_OFFSET) -- base = 0; -+ { -+ /* -+ * When reading from sysfs, the file may be shorter than -+ * announced. For SMBIOS v3 this is expcted, as we only know -+ * the maximum table size, not the actual table size. For older -+ * implementations (and for SMBIOS v3 too), this would be the -+ * result of the kernel truncating the table on parse error. -+ */ -+ size_t size = len; -+ buf = read_file(&size, devmem); -+ if (!(opt.flags & FLAG_QUIET) && num && size != (size_t)len) -+ { -+ printf("Wrong DMI structures length: %u bytes " -+ "announced, only %lu bytes available.\n", -+ len, (unsigned long)size); -+ } -+ len = size; -+ } -+ else -+ buf = mem_chunk(base, len, devmem); - -- if ((buf = mem_chunk(base, len, devmem)) == NULL) -+ if (buf == NULL) - { - fprintf(stderr, "Table is unreachable, sorry." - #ifndef USE_MMAP --- -2.5.0 - diff --git a/SOURCES/0008-dmioem-Sort-vendor-names-alphabetically.patch b/SOURCES/0008-dmioem-Sort-vendor-names-alphabetically.patch new file mode 100644 index 0000000..9414efd --- /dev/null +++ b/SOURCES/0008-dmioem-Sort-vendor-names-alphabetically.patch @@ -0,0 +1,134 @@ +From 6517fa7c8c8a74a9eae9e6192de316ef8952f2a8 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Thu, 14 Sep 2017 10:08:10 +0200 +Subject: [PATCH 08/10] dmioem: Sort vendor names alphabetically + +Signed-off-by: Jean Delvare +--- + dmioem.c | 92 ++++++++++++++++++++++++++++++++-------------------------------- + 1 file changed, 46 insertions(+), 46 deletions(-) + +diff --git a/dmioem.c b/dmioem.c +index a032344..8a72ac9 100644 +--- a/dmioem.c ++++ b/dmioem.c +@@ -33,8 +33,8 @@ + enum DMI_VENDORS + { + VENDOR_UNKNOWN, +- VENDOR_HP, + VENDOR_ACER, ++ VENDOR_HP, + VENDOR_HPE, + }; + +@@ -57,12 +57,54 @@ void dmi_set_vendor(const char *s) + while (len && s[len - 1] == ' ') + len--; + +- if (strncmp(s, "HP", len) == 0 || strncmp(s, "Hewlett-Packard", len) == 0) ++ if (strncmp(s, "Acer", len) == 0) ++ dmi_vendor = VENDOR_ACER; ++ else 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; ++} ++ ++/* ++ * Acer-specific data structures are decoded here. ++ */ ++ ++static int dmi_decode_acer(const struct dmi_header *h) ++{ ++ u8 *data = h->data; ++ u16 cap; ++ ++ switch (h->type) ++ { ++ case 170: ++ /* ++ * Vendor Specific: Acer Hotkey Function ++ * ++ * Source: acer-wmi kernel driver ++ * ++ * Probably applies to some laptop models of other ++ * brands, including Fujitsu-Siemens, Medion, Lenovo, ++ * and eMachines. ++ */ ++ printf("Acer Hotkey Function\n"); ++ if (h->length < 0x0F) break; ++ cap = WORD(data + 0x04); ++ printf("\tFunction bitmap for Communication Button: 0x%04hx\n", cap); ++ printf("\t\tWiFi: %s\n", cap & 0x0001 ? "Yes" : "No"); ++ printf("\t\t3G: %s\n", cap & 0x0040 ? "Yes" : "No"); ++ printf("\t\tWiMAX: %s\n", cap & 0x0080 ? "Yes" : "No"); ++ printf("\t\tBluetooth: %s\n", cap & 0x0800 ? "Yes" : "No"); ++ printf("\tFunction bitmap for Application Button: 0x%04hx\n", WORD(data + 0x06)); ++ printf("\tFunction bitmap for Media Button: 0x%04hx\n", WORD(data + 0x08)); ++ printf("\tFunction bitmap for Display Button: 0x%04hx\n", WORD(data + 0x0A)); ++ printf("\tFunction bitmap for Others Button: 0x%04hx\n", WORD(data + 0x0C)); ++ printf("\tCommunication Function Key Number: %d\n", data[0x0E]); ++ break; ++ ++ default: ++ return 0; ++ } ++ return 1; + } + + /* +@@ -236,48 +278,6 @@ static int dmi_decode_hp(const struct dmi_header *h) + } + + /* +- * Acer-specific data structures are decoded here. +- */ +- +-static int dmi_decode_acer(const struct dmi_header *h) +-{ +- u8 *data = h->data; +- u16 cap; +- +- switch (h->type) +- { +- case 170: +- /* +- * Vendor Specific: Acer Hotkey Function +- * +- * Source: acer-wmi kernel driver +- * +- * Probably applies to some laptop models of other +- * brands, including Fujitsu-Siemens, Medion, Lenovo, +- * and eMachines. +- */ +- printf("Acer Hotkey Function\n"); +- if (h->length < 0x0F) break; +- cap = WORD(data + 0x04); +- printf("\tFunction bitmap for Communication Button: 0x%04hx\n", cap); +- printf("\t\tWiFi: %s\n", cap & 0x0001 ? "Yes" : "No"); +- printf("\t\t3G: %s\n", cap & 0x0040 ? "Yes" : "No"); +- printf("\t\tWiMAX: %s\n", cap & 0x0080 ? "Yes" : "No"); +- printf("\t\tBluetooth: %s\n", cap & 0x0800 ? "Yes" : "No"); +- printf("\tFunction bitmap for Application Button: 0x%04hx\n", WORD(data + 0x06)); +- printf("\tFunction bitmap for Media Button: 0x%04hx\n", WORD(data + 0x08)); +- printf("\tFunction bitmap for Display Button: 0x%04hx\n", WORD(data + 0x0A)); +- printf("\tFunction bitmap for Others Button: 0x%04hx\n", WORD(data + 0x0C)); +- printf("\tCommunication Function Key Number: %d\n", data[0x0E]); +- break; +- +- default: +- return 0; +- } +- return 1; +-} +- +-/* + * Dispatch vendor-specific entries decoding + * Return 1 if decoding was successful, 0 otherwise + */ +-- +2.9.5 + diff --git a/SOURCES/0009-UEFI-support-on-FreeBSD.patch b/SOURCES/0009-UEFI-support-on-FreeBSD.patch new file mode 100644 index 0000000..dc71bd3 --- /dev/null +++ b/SOURCES/0009-UEFI-support-on-FreeBSD.patch @@ -0,0 +1,90 @@ +From e629bccb2ced5f9e52e142bd841d310434975c63 Mon Sep 17 00:00:00 2001 +From: Alexey Dokuchaev +Date: Thu, 30 Nov 2017 16:27:48 +0100 +Subject: [PATCH 09/10] UEFI support on FreeBSD + +Currently, dmidecode(8) does not work on FreeBSD booted in UEFI mode. +Previously it was understandable, since there are no things like Linuxish +/proc/efi/systab or /sys/firmware/efi/systab to read from under FreeBSD. + +However, 7 months ago, ambrisko@ had added support for exposing the SMBIOS +anchor base address via kernel environment: + + https://svnweb.freebsd.org/base?view=revision&revision=307326 + +I've patched dmidecode.c to try to get the address from hint.smbios.0.mem +and fall back to traditional address space scanning. I've tested it both +on EFI (amd64 laptop) and non-EFI (i386 desktop) machines. + +--- + dmidecode.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/dmidecode.c b/dmidecode.c +index 6559567..aadef75 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -64,6 +64,11 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#include ++#endif ++ + #include "version.h" + #include "config.h" + #include "types.h" +@@ -4934,13 +4939,18 @@ static int legacy_decode(u8 *buf, const char *devmem, u32 flags) + #define EFI_NO_SMBIOS (-2) + static int address_from_efi(off_t *address) + { ++#if defined(__linux__) + FILE *efi_systab; + const char *filename; + char linebuf[64]; ++#elif defined(__FreeBSD__) ++ char addrstr[KENV_MVALLEN + 1]; ++#endif + int ret; + + *address = 0; /* Prevent compiler warning */ + ++#if defined(__linux__) + /* + * Linux up to 2.6.6: /proc/efi/systab + * Linux 2.6.7 and up: /sys/firmware/efi/systab +@@ -4972,6 +4982,29 @@ static int address_from_efi(off_t *address) + + if (ret == EFI_NO_SMBIOS) + fprintf(stderr, "%s: SMBIOS entry point missing\n", filename); ++#elif defined(__FreeBSD__) ++ /* ++ * On FreeBSD, SMBIOS anchor base address in UEFI mode is exposed ++ * via kernel environment: ++ * https://svnweb.freebsd.org/base?view=revision&revision=307326 ++ */ ++ ret = kenv(KENV_GET, "hint.smbios.0.mem", addrstr, sizeof(addrstr)); ++ if (ret == -1) ++ { ++ if (errno != ENOENT) ++ perror("kenv"); ++ return EFI_NOT_FOUND; ++ } ++ ++ *address = strtoull(addrstr, NULL, 0); ++ if (!(opt.flags & FLAG_QUIET)) ++ printf("# SMBIOS entry point at 0x%08llx\n", ++ (unsigned long long)*address); ++ ++ ret = 0; ++#else ++ ret = EFI_NOT_FOUND; ++#endif + return ret; + } + +-- +2.9.5 + diff --git a/SOURCES/0009-biosdecode-Decode-Intel-Multiprocessor-entry-point.patch b/SOURCES/0009-biosdecode-Decode-Intel-Multiprocessor-entry-point.patch deleted file mode 100644 index 43c01ea..0000000 --- a/SOURCES/0009-biosdecode-Decode-Intel-Multiprocessor-entry-point.patch +++ /dev/null @@ -1,95 +0,0 @@ -From adbd050d70b6173dd6880b21fd6f995af5ea79d2 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Fri, 20 Jan 2017 17:26:02 +0100 -Subject: [PATCH 9/9] biosdecode: Decode Intel Multiprocessor entry point - -Decode the entry point defined in the Intel Multiprocessor -specification. ---- - CHANGELOG | 5 +++++ - biosdecode.c | 34 +++++++++++++++++++++++++++++++++- - 2 files changed, 38 insertions(+), 1 deletion(-) - -diff --git a/CHANGELOG b/CHANGELOG -index 67aef99..26a8f35 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -1,5 +1,10 @@ - 2017-01-20 Jean Delvare - -+ * biosdecode.c: Decode the entry point defined in the Intel -+ Multiprocessor specification. -+ -+2017-01-20 Jean Delvare -+ - * dmidecode.c: Only decode one DMI table. - This fixes Savannah bug #50022: - https://savannah.nongnu.org/bugs/?50022 -diff --git a/biosdecode.c b/biosdecode.c -index 3bbfe28..ad3d4bc 100644 ---- a/biosdecode.c -+++ b/biosdecode.c -@@ -2,7 +2,7 @@ - * BIOS Decode - * - * Copyright (C) 2000-2002 Alan Cox -- * Copyright (C) 2002-2015 Jean Delvare -+ * Copyright (C) 2002-2017 Jean Delvare - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -52,6 +52,9 @@ - * - Fujitsu application panel technical details - * As of July 23rd, 2004 - * http://apanel.sourceforge.net/tech.php -+ * - Intel Multiprocessor Specification -+ * Version 1.4 -+ * http://www.intel.com/design/archives/processors/pro/docs/242016.htm - */ - - #include -@@ -546,6 +549,34 @@ static int fjkeyinf_decode(const u8 *p, size_t len) - } - - /* -+ * Intel Multiprocessor -+ */ -+ -+static size_t mp_length(const u8 *p) -+{ -+ return 16 * p[8]; -+} -+ -+static int mp_decode(const u8 *p, size_t len) -+{ -+ if (!checksum(p, len)) -+ return 0; -+ -+ printf("Intel Multiprocessor present.\n"); -+ printf("\tSpecification Revision: %s\n", -+ p[9] == 0x01 ? "1.1" : p[9] == 0x04 ? "1.4" : "Invalid"); -+ if (p[11]) -+ printf("\tDefault Configuration: #%d\n", p[11]); -+ else -+ printf("\tConfiguration Table Address: 0x%08X\n", -+ DWORD(p + 4)); -+ printf("\tMode: %s\n", p[12] & (1 << 7) ? -+ "IMCR and PIC" : "Virtual Wire"); -+ -+ return 1; -+} -+ -+/* - * Main - */ - -@@ -562,6 +593,7 @@ static struct bios_entry bios_entries[] = { - { "32OS", 0, 0xE0000, 0xFFFFF, compaq_length, compaq_decode }, - { "\252\125VPD", 0, 0xF0000, 0xFFFFF, vpd_length, vpd_decode }, - { "FJKEYINF", 0, 0xF0000, 0xFFFFF, fjkeyinf_length, fjkeyinf_decode }, -+ { "_MP_", 0, 0xE0000, 0xFFFFF, mp_length, mp_decode }, - { NULL, 0, 0, 0, NULL, NULL } - }; - --- -2.10.2 diff --git a/SOURCES/0009-dmidecode-Check-sysfs-entry-point-length.patch b/SOURCES/0009-dmidecode-Check-sysfs-entry-point-length.patch deleted file mode 100644 index 05340ab..0000000 --- a/SOURCES/0009-dmidecode-Check-sysfs-entry-point-length.patch +++ /dev/null @@ -1,52 +0,0 @@ -From e5c73239404931d4d1b73eb595c3802fbce74c61 Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Mon, 2 Nov 2015 09:45:36 +0100 -Subject: [PATCH 9/9] dmidecode: Check sysfs entry point length - -Before passing the sysfs entry point data over for decoding, check -that its length meets the expectations. ---- - CHANGELOG | 1 + - dmidecode.c | 6 +++--- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/CHANGELOG b/CHANGELOG -index fcfc244..ba61cab 100644 ---- a/CHANGELOG -+++ b/CHANGELOG -@@ -5,6 +5,7 @@ - * dmidecode.c: Use read_file to read the DMI table from sysfs. - This fixes Savannah bug #46176: - https://savannah.nongnu.org/bugs/?46176 -+ * dmidecode.c: Check the sysfs entry point length. - - 2015-10-21 Xie XiuQi - -diff --git a/dmidecode.c b/dmidecode.c -index 16d1823..b47c469 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4840,17 +4840,17 @@ int main(int argc, char * const argv[]) - { - if (!(opt.flags & FLAG_QUIET)) - printf("Getting SMBIOS data from sysfs.\n"); -- if (memcmp(buf, "_SM3_", 5) == 0) -+ if (size >= 24 && memcmp(buf, "_SM3_", 5) == 0) - { - if (smbios3_decode(buf, SYS_TABLE_FILE, FLAG_NO_FILE_OFFSET)) - found++; - } -- else if (memcmp(buf, "_SM_", 4) == 0) -+ else if (size >= 31 && memcmp(buf, "_SM_", 4) == 0) - { - if (smbios_decode(buf, SYS_TABLE_FILE, FLAG_NO_FILE_OFFSET)) - found++; - } -- else if (memcmp(buf, "_DMI_", 5) == 0) -+ else if (size >= 15 && memcmp(buf, "_DMI_", 5) == 0) - { - if (legacy_decode(buf, SYS_TABLE_FILE, FLAG_NO_FILE_OFFSET)) - found++; --- -2.5.0 - diff --git a/SOURCES/0010-Use-DWORD-for-Structure-table-maximum-size-in-SMBIOS.patch b/SOURCES/0010-Use-DWORD-for-Structure-table-maximum-size-in-SMBIOS.patch deleted file mode 100644 index aae02df..0000000 --- a/SOURCES/0010-Use-DWORD-for-Structure-table-maximum-size-in-SMBIOS.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ab02b117511230e46bbef7febbd854b9c832c13c Mon Sep 17 00:00:00 2001 -From: Xie XiuQi -Date: Mon, 1 Feb 2016 09:30:31 +0100 -Subject: [PATCH 10/10] Use DWORD for Structure table maximum size in SMBIOS3 - -0Ch DWORD "Structure table maximum size" - -Maximum size of SMBIOS Structure Table, pointed to by -the Structure Table Address, in bytes. The actual size is -guaranteed to be less or equal to the maximum size. - -Signed-off-by: Xie XiuQi -Signed-off-by: Jean Delvare ---- - dmidecode.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dmidecode.c b/dmidecode.c -index b47c469..0c26685 100644 ---- a/dmidecode.c -+++ b/dmidecode.c -@@ -4615,7 +4615,7 @@ static int smbios3_decode(u8 *buf, const char *devmem, u32 flags) - } - - dmi_table(((off_t)offset.h << 32) | offset.l, -- WORD(buf + 0x0C), 0, ver, devmem, flags | FLAG_STOP_AT_EOT); -+ DWORD(buf + 0x0C), 0, ver, devmem, flags | FLAG_STOP_AT_EOT); - - if (opt.flags & FLAG_DUMP_BIN) - { --- -2.5.0 - diff --git a/SOURCES/0010-dmidecode-Share-common-EFI-code.patch b/SOURCES/0010-dmidecode-Share-common-EFI-code.patch new file mode 100644 index 0000000..0eedc52 --- /dev/null +++ b/SOURCES/0010-dmidecode-Share-common-EFI-code.patch @@ -0,0 +1,58 @@ +From 97d23fb9a642574ef4415e71e4a01387d06744d6 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Thu, 30 Nov 2017 16:27:56 +0100 +Subject: [PATCH 10/10] dmidecode: Share common EFI code + +Avoid duplicating code between OS-specific paths. + +--- + dmidecode.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/dmidecode.c b/dmidecode.c +index aadef75..87faaa9 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -4946,6 +4946,7 @@ static int address_from_efi(off_t *address) + #elif defined(__FreeBSD__) + char addrstr[KENV_MVALLEN + 1]; + #endif ++ const char *eptype; + int ret; + + *address = 0; /* Prevent compiler warning */ +@@ -4970,9 +4971,7 @@ static int address_from_efi(off_t *address) + || strcmp(linebuf, "SMBIOS") == 0) + { + *address = strtoull(addrp, NULL, 0); +- if (!(opt.flags & FLAG_QUIET)) +- printf("# %s entry point at 0x%08llx\n", +- linebuf, (unsigned long long)*address); ++ eptype = linebuf; + ret = 0; + break; + } +@@ -4997,14 +4996,16 @@ static int address_from_efi(off_t *address) + } + + *address = strtoull(addrstr, NULL, 0); +- if (!(opt.flags & FLAG_QUIET)) +- printf("# SMBIOS entry point at 0x%08llx\n", +- (unsigned long long)*address); +- ++ eptype = "SMBIOS"; + ret = 0; + #else + ret = EFI_NOT_FOUND; + #endif ++ ++ if (ret == 0 && !(opt.flags & FLAG_QUIET)) ++ printf("# %s entry point at 0x%08llx\n", ++ eptype, (unsigned long long)*address); ++ + return ret; + } + +-- +2.9.5 + diff --git a/SPECS/dmidecode.spec b/SPECS/dmidecode.spec index aa63261..5f03699 100644 --- a/SPECS/dmidecode.spec +++ b/SPECS/dmidecode.spec @@ -1,31 +1,25 @@ Summary: Tool to analyse BIOS DMI data Name: dmidecode -Version: 3.0 -Release: 5%{?dist} +Version: 3.1 +Release: 2%{?dist} Epoch: 1 Group: System Environment/Base License: GPLv2+ Source0: %{name}-%{version}.tar.xz URL: http://www.nongnu.org/dmidecode/ -Patch0: 0001-Add-no-sysfs-option-description-to-h-output.patch -Patch1: 0002-Avoid-SIGBUS-on-mmap-failure.patch -Patch2: 0003-Fix-error-paths-in-mem_chunk.patch -Patch3: 0004-dmidecode-Handle-OEM-specific-types-in-group-associa.patch -Patch4: 0005-Fix-No-SMBIOS-nor-DMI-entry-point-found-on-SMBIOS3.patch -Patch5: 0006-dmidecode-Introduce-SYS_FIRMWARE_DIR.patch -Patch6: 0007-Let-read_file-return-the-actual-data-size.patch -Patch7: 0008-dmidecode-Use-read_file-to-read-the-DMI-table-from-s.patch -Patch8: 0009-dmidecode-Check-sysfs-entry-point-length.patch -Patch9: 0010-Use-DWORD-for-Structure-table-maximum-size-in-SMBIOS.patch -Patch10: 0001-dmidecode-Hide-irrelevant-fixup-message.patch -Patch11: 0002-dmidecode-Unmask-LRDIMM-in-memory-type-detail.patch -Patch12: 0003-dmidecode-Clarify-error-message-on-table-read-failur.patch -Patch13: 0004-dmidecode-Move-error-messages-to-stderr.patch -Patch14: 0005-Clarify-a-comment-in-dmi_memory_device_extended_size.patch -Patch15: 0006-Prevent-static-code-analyzer-confusion.patch -Patch16: 0007-Cygwin-is-no-longer-supported.patch -Patch17: 0008-Only-decode-one-DMI-table.patch -Patch18: 0009-biosdecode-Decode-Intel-Multiprocessor-entry-point.patch +Patch0: 0001-dmidecode-Add-system-family-direct-string-option.patch +Patch1: 0002-Goodbye-CHANGELOG-welcome-NEWS.patch +Patch2: 0003-Fix-install-doc-target.patch +Patch3: 0004-biosdecode-Add-option-pir-full.patch +Patch4: 0005-biosdecode-Clean-up-the-PIR-table-output.patch +Patch5: 0006-biosdecode-Avoid-repeating-pointer-arithmetic.patch +Patch6: 0007-dmioem-Reflect-HPE-s-new-company-name.patch +Patch7: 0008-dmioem-Sort-vendor-names-alphabetically.patch +Patch8: 0009-UEFI-support-on-FreeBSD.patch +Patch9: 0010-dmidecode-Share-common-EFI-code.patch +Patch10: 0001-dmidecode-Fix-firmware-version-of-TPM-device.patch +Patch11: 0002-dmioem-decode-HPE-UEFI-type-219-Misc-Features.patch +Patch12: 0003-dmidecode-Use-lowercase-letters-for-UUID.patch Buildroot: %{_tmppath}/%{name}-%{version}-root BuildRequires: automake autoconf @@ -44,25 +38,19 @@ I/O ports (e.g. serial, parallel, USB). %prep %setup -q -%patch0 -p1 -b .no_sysfs -%patch1 -p1 -b .avoid_sigbus -%patch2 -p1 -b .fix_errorpaths -%patch3 -p1 -b .oem_specific -%patch4 -p1 -b .entry_point -%patch5 -p1 -b .sys_firmware_dir -%patch6 -p1 -b .return_actual -%patch7 -p1 -b .read_file -%patch8 -p1 -b .sysfs_entry_check -%patch9 -p1 -b .dword +%patch0 -p1 -b .add_system_family +%patch1 -p1 -b .changelog_to_new +%patch2 -p1 -b .fix_install_doc +%patch3 -p1 -b .add_option_pir +%patch4 -p1 -b .clean_up_pir +%patch5 -p1 -b .avoid_repeating +%patch6 -p1 -b .reflect_hpe +%patch7 -p1 -b .sort_vendor_names +%patch8 -p1 -b .uefi_support_bsd +%patch9 -p1 -b .share_common_efi %patch10 -p1 %patch11 -p1 %patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 %build make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS="-pie -Wl,-z,now" @@ -75,7 +63,7 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- rm -rf ${buildroot} %files -%doc AUTHORS CHANGELOG README +%doc AUTHORS NEWS README %{!?_licensedir:%global license %%doc} %license LICENSE %{_sbindir}/dmidecode @@ -87,6 +75,10 @@ rm -rf ${buildroot} %{_mandir}/man8/* %changelog +* Thu Apr 26 2018 Lianbo Jiang - 1:3.1-1 +- Sync with upstream +- Resolves: rhbz#1568227 + * Wed May 3 2017 Petr Oros - 1:3.0-5 - Update compiler flags for hardened builds - Resolves: #1420763