| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Let the caller choose which printing helper function will be used.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
HP Device Correlation Record (Type 203)
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
| |
HP Firmware Inventory Record (Type 240)
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
* The bit to indicate 128-bit capable processor
* The bit to indicate processor supports returning ARM64 SoC ID
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
Added 2 more new values (0x3D and 0x3E).
|
|
|
|
| |
Added 2 more new values (0x22 and 0x23).
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This reverts commit 85a05114311a78c493eeb6c9b664b22c0d1c2e35.
This change was not properly reviewed before being committed and
introduces a regression, in addition to having coding style issues.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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
|
|
|
|
| |
In SMBIOS SPEC 3.4.0 section 7.10.1 System Slots — Slot Type some of fields are missing in current dmidecode source.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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.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>
|
| |
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
A simple helper function to print a blank line between records.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
| |
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
| |
Print all second-level attributes through a helper function pr_subattr.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Print all first-level attributes through a helper function pr_attr.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|