summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* dmidecode: Make dmi_print_cpuid more flexibleJean Delvare2022-05-202-25/+27
| | | | | | Let the caller choose which printing helper function will be used. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Helper function to print CPUIDJean Delvare2022-05-202-53/+64
| | | | | | | | Split the printing of the CPUID into a human-friendly way to a separate function. That way, it can be reused for other record types as needed. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Split CPUID type detection from dmi_processor_idJean Delvare2022-05-202-114/+144
| | | | | | | Move the code which decides the CPUID type to a separate function, so that it can be called from a different context. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: dmi_processor_id: Don't set the same variable twiceJean Delvare2022-05-201-1/+0
| | | | Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Don't display the raw CPU ID in quiet modeJean Delvare2022-05-201-2/+3
| | | | | | | It has little value on supported systems as we decode the same information in a more human-friendly way immediately after. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Support new byte value of Processor Upgrade field from SMBIOS 3.5.0Coiby Xu2021-10-211-2/+3
| | | | | | | | | | | Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz has byte value 3Fh which means Socket LGA4677 for Processor Information - Processor Upgrade field. [JD: Fix upper array boundary check.] Signed-off-by: Coiby Xu <coxu@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Support new format of Processor ID from SMBIOS 3.4.0Nhi Pham2021-09-211-10/+47
| | | | | | | | | | | | For ARM64-class CPUs, the format of the Processor ID field depends on the processor's support of the SMCCC_ARCH_SOC_ID architectural call. This supports decoding the Processor ID correctly in case the SoC ID is supported. This patch should work for ARM32-class CPUs also. [JD: Simplify boolean test.] Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* man pages: Improve roff formattingIvan Tkachenko2021-06-184-61/+97
| | | | | | | | | | | - Use italic for synopsis, options' arguments and file paths. - Use \fP instead of \fR. It's a good practice, and makes markup more robust to surrounding context. - Disable hyphenation for naturally hyphenated keywords to reduce reader's potential confusion. This closes bug #60769: https://savannah.nongnu.org/bugs/?60769
* dmioem: Present HPE type 240 attributes in a nicer wayJean Delvare2021-01-191-16/+18
| | | | | | | | Present HPE type 240 attributes as a proper list instead of packing them on a single line. This makes it more readable overall, and will also scale better if the number of attributes increases. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Fix crash with -u optionJean Delvare2021-01-191-1/+1
| | | | | | | | | | A segmentation fault was reported with option -u. Turns out to be a stupid thinko where the buffer offset was reset at the wrong loop depth. Reported-by: Jerry Hoemann <jerry.hoemann@hpe.com> Fixes: da06888d08b9 ("dmidecode: Use the print helpers in dump mode too") Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Add length check to HPE OEM 236Jerry Hoemann2021-01-151-1/+1
| | | | | | | Check for minimal length of record when decoding HPE OEM 236. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvarte <jdelvare@suse.de>
* dmioem: Decode HPE OEM Record 203Jerry Hoemann2021-01-151-0/+178
| | | | | | | HP Device Correlation Record (Type 203) Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Decode HPE OEM Record 240Jerry Hoemann2021-01-151-0/+61
| | | | | | | HP Firmware Inventory Record (Type 240) Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Make dmi_print_memory_size globalJerry Hoemann2021-01-152-1/+2
| | | | | | | | Make dmi_print_memory_size() global so that it can be called from outside of dmidecode.c. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Fix format warningsJean Delvare2021-01-152-8/+8
| | | | | | | | | Use the appropriate format specifiers to make the compiler happy. This fixes support ticket #110421: https://savannah.nongnu.org/support/index.php?110421 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Set vendor earlyJean Delvare2021-01-151-5/+45
| | | | | | | | | | If OEM type entries come before the type 1 entry (System Information), we aren't able to decode them because we don't know the vendor yet. To fix this, figure out the vendor during a first pass, and walk the table again once we have the information. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reported-by: Erwan Velu <e.velu@criteo.com>
* dmidecode: Fix the condition error in ascii_filterTianjia Zhang2021-01-051-1/+1
| | | | | | | | The normal printable ASCII range is 32 to 127 (not included), so fix the error in this if condition. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Use _dmi_string for dmi_set_vendorJean Delvare2020-12-102-2/+3
| | | | | | | | | The strings passed to dmi_set_vendor will never be printed, they are used for comparison purposes only, so the pre- and post-processing done by dmi_string is not needed. Call _dmi_string instead, which is faster. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Rename the first parameter of dmi_set_vendorJean Delvare2020-12-101-4/+4
| | | | | | | | When dmi_set_vendor took a single parameter, naming it "s" for "string" was OK. But now it takes two, so this could be confusing. Rename "s" to "v" to make it clear it is the vendor. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Fix vendor string comparisonJean Delvare2020-12-101-11/+20
| | | | | | | | | | | | | | The vendor string comparison code made an incorrect assumption about the length of the vendor string found in the DMI table. We would hit a false positive if that string was shorter than, and an exact prefix of, the vendor string we were comparing with. Explicitly check for length equality before comparing the strings. Also rewrite the whole thing as an iteration over a table, instead of open-coding it. This will make it easier to add support for more vendors in the future. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Missing comma in the dmi_slot_type()Lianbo Jiang2020-12-101-2/+2
| | | | | | | | | | | | | In the initialization of "type", a suspicious concatenated string "PCI Express Mini 76-pinPCI Express 4 SFF-8639 (U.2)" is produced due to a missing comma between lines. [JD: Fixed a similar bug in dmi_processor_characteristics.] Fixes: b289de9deb32 ("Add new processor characteristics bits from SMBIOS spec 3.4.0") Fixes: c54348130a2a ("dmidecode: Add new system slot types from SMBIOS spec 3.4.0") Signed-off-by: Lianbo Jiang <lijiang@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Decode HPE OEM record 236Jerry Hoemann2020-11-301-0/+35
| | | | | | | | | | | HPE OEM record 236 describes the HPE ProLiant HDD Backplane. A non-backward compatible change was introduced with Gen10 Plus which retracted three fields and made them "Reserved". Based on initial work by Erwan Velu. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Use product name to determine GenerationJerry Hoemann2020-11-301-0/+32
| | | | | | | | | | | | | Generally, HPE OEM records are extended by adding additional fields at the end or record and increasing the length. But, this isn't always the case and will less likely be so going into the future. Determine the generation of the HPE OEM records by examining the "Product Name" string. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Some OEM records require Product NameJerry Hoemann2020-11-303-4/+7
| | | | | | | | | Decoding of OEM records can depend upon the product in addition to the manufacturer. So, save "Product Name" from type 1 record in addition to "Manufacturer" in dmi_set_vendor. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmioem: Sort OEM records in dmi_decode_hpJerry Hoemann2020-11-301-29/+29
| | | | | | | Non-functional change. Sort the OEM records in dmi_decode_hp. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Skip details of uninstalled memory modulesJean Delvare2020-10-301-0/+3
| | | | | | | | | | | If a memory slot is empty then by definition the fields containing the memory module details are irrelevant. Best case they are filled with "Unused" and "None", but in some cases they are even invalid because the manufacturer did not bother setting the fields to valid neutral values. So it is better to not print these fields at all, so as to not confuse the user. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Add new processor characteristics bits from SMBIOS spec 3.4.0Prabhakar pujeri2020-10-231-2/+4
| | | | | * The bit to indicate 128-bit capable processor * The bit to indicate processor supports returning ARM64 SoC ID
* dmidecode: Add new system slot types from SMBIOS spec 3.4.0Jean Delvare2020-10-211-6/+20
| | | | | | | | | Based on an earlier patch from Prabhakar Pujeri (Dell). Version 3.4.0 of the SMBIOS specification adds 14 new system slot types and updates 2 (DMI type 9). Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Handle memory module extended speed fieldsJean Delvare2020-10-211-6/+20
| | | | | | | | | These fields were added by SMBIOS version 3.3.0. and although there is no hardware fast enough to need them yet, we can support them already. I missed them before because their addition is not mentioned in the specification change log. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Add new slot characteristics2 from SMBIOS spec 3.4.0Prabhakar pujeri2020-10-191-2/+5
| | | | | | * The bit to indicate PCIe surprise removal support. * The bit to indicate Flexbus CXL 1.0 version. * The bit to indicate Flexbus CXL 2.0 version.
* Add new processor upgrades from SMBIOS spec 3.4.0Prabhakar pujeri2020-10-191-2/+4
| | | | Added 2 more new values (0x3D and 0x3E).
* Add new memory device types from SMBIOS spec 3.4.0Prabhakar pujeri2020-10-191-2/+4
| | | | Added 2 more new values (0x22 and 0x23).
* dmidecode: Fix typos in commentsBastien Nocera2020-10-191-4/+4
|
* Set version to 3.3dmidecode-3-3Jean Delvare2020-10-142-1/+19
|
* Pretend to support SMBIOS version 3.3.0Jean Delvare2020-10-141-1/+1
| | | | | | | | Even though we do not fully support SMBIOS version 3.3.0 yet, the missing parts are not even in the works, and I have yet to see an actual system needing them. So stop warning the users. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Revert "updating system slot types with smbios spec 3.4.0"Jean Delvare2020-10-141-9/+6
| | | | | | | This reverts commit 85a05114311a78c493eeb6c9b664b22c0d1c2e35. This change was not properly reviewed before being committed and introduces a regression, in addition to having coding style issues.
* Revert "fix: Memory Technology <OUT OF SPEC> when slot is empty"Jean Delvare2020-10-141-5/+3
| | | | | | | This reverts commit 92853b621ff72e3ba87e0ed7675d2103d05b8d3c. This is not a bug in dmidecode. It is the BIOS' responsibility to encode the memory technology to 0x02 for "Unknown" when a slot is not in use.
* fix: Memory Technology <OUT OF SPEC> when slot is emptyPrabhakar Pujeri2020-10-131-3/+5
| | | | According to SMBIOS spec 3.4.0 Table 75 – Memory Device (Type 17) structure if the size of the memory device is 0 then we should consider the slot is empty
* updating system slot types with smbios spec 3.4.0Prabhakar Pujeri2020-10-131-6/+9
| | | | In SMBIOS SPEC 3.4.0 section 7.10.1 System Slots — Slot Type some of fields are missing in current dmidecode source.
* dmidecode: Adding system-sku-number support to -s optionTimo Teräs2020-07-072-1/+2
| | | | | | | | | | | | Allow extracting the System SKU number directly via the -s option. [JD: Update the man page accordingly.] This fixes bug #58715: https://savannah.nongnu.org/bugs/?58715 Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Allow overriding build settings from the environmentJean Delvare2020-04-171-8/+9
| | | | | | | | | | | Let packagers pass their own CC, CFLAGS and LDFLAGS settings. The settings which are specific to dmidecode are appended later so that they are applied no matter what. This should fix bug #55805: https://savannah.nongnu.org/bugs/?55805 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Add missing build dependencies on dmioutput.hJean Delvare2020-04-071-2/+2
| | | | | | | dmidecode.c and dmioem.c both include dmioutput.h so they must be rebuilt if that header file changes. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Update copyright yearJean Delvare2020-04-014-4/+4
|
* dmidecode: White space fixesJean Delvare2020-04-011-2/+2
|
* dmidecode: Add helper function for structure errorsJean Delvare2020-04-013-1/+14
| | | | | | | Add a helper function to print structure errors, specifically for structures which do not fit in the table. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Add helper function for separatorsJean Delvare2020-04-013-4/+11
| | | | | | A simple helper function to print a blank line between records. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Use the print helpers in dump mode tooJean Delvare2020-04-011-12/+18
| | | | Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Add helper function pr_subattrJean Delvare2020-04-014-38/+55
| | | | | | Print all second-level attributes through a helper function pr_subattr. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Add helper functions pr_list_start/item/endJean Delvare2020-04-013-114/+184
| | | | | | | | | Print lists through helper functions. pr_list_start() starts the list, with an optional value. pr_list_item() prints a single item. pr_list_end() is a no-op for plain text output, but is in place in anticipation of supporting other output formats such as HTML. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* dmidecode: Add helper function pr_attrJean Delvare2020-04-014-745/+691
| | | | | | Print all first-level attributes through a helper function pr_attr. Signed-off-by: Jean Delvare <jdelvare@suse.de>