summaryrefslogtreecommitdiff
path: root/dmidecode.c
Commit message (Collapse)AuthorAgeFilesLines
* Typo correction in 2.8 specSai Kiran2015-08-291-1/+1
| | | | | Corrected a typo for Type 4 Processor Family field. Table 22, hex value 0xCC.
* dmioem: Move function is_printable to dmidecode.cJean Delvare2015-05-211-10/+18
| | | | | Move function is_printable to dmidecode.c so that a single implementation can be used in both dmidecode.c and dmioem.c.
* dmidecode: Fix up invalid DMI type 34 structure lengthJean Delvare2015-05-211-0/+27
| | | | | | | Several boards have a bug where some type 34 structures have their length incorrectly set to 0x10 instead of 0x0B. This causes the first 5 characters of the device name to be trimmed. It's easy to check and fix, so do it, but warn.
* Fix warnings about comparison between signed and unsigned integersJean Delvare2015-05-131-7/+8
|
* dmidecode: Add support for SMBIOS3 EFI tableJean Delvare2015-05-131-6/+7
| | | | | The SMBIOS v3 entry point has a different identifier in the EFI systab. Add support for it, as well as 64-bit addresses.
* dmidecode: Remove extra blank line after hidden type 40Jean Delvare2015-05-121-2/+3
| | | | | When we don't decode type 40 in quiet mode, we shouldn't print the blank line after it either.
* Coding style fixesJean Delvare2015-05-041-1/+1
|
* dmidecode: Get OEM vendor from System Information (DMI type 1)Jean Delvare2015-05-041-1/+1
| | | | | | | | DMI type 0 is the BIOS information, it doesn't tell us about the system vendor. DMI type 1 does that. It made no difference so far because the only vendor with support for OEM-type decoding was HP and they make their own BIOS, but it will matter as soon as we add support for more vendors.
* dmidecode: Display types 41 and 42 in quiet mode tooJean Delvare2015-05-041-1/+1
| | | | | | | | | | | | | Originally the highest regular DMI structure type was 39, and non-OEM types greater than that (including 126/disabled and 127/end-of-table) wouldn't show up in quiet mode. The limit was not updated when types 41 and 42 were added to the SMBIOS specification, so these types do not show up in quiet mode. Fix that. We could simply raise the limit from 39 to 42, but the fact that this bug went unnoticed for years is probably a good indication that this limit was a bad idea in the first place and it is safer to only explicitly hide types 126 and 127 in quiet mode.
* dmidecode: Simplify function dmi_table_dumpJean Delvare2015-05-041-17/+5
| | | | | We can let function dmi_table read the memory chunk and free the memory for us, this avoids some code duplication.
* dmidecode: Move table decoding to a separate functionJean Delvare2015-05-041-49/+55
| | | | This will let us share more code between the decode and dump options.
* Update the list of untested DMI typesJean Delvare2015-04-281-1/+1
|
* dmidecode: Fix --dump-bin when reading from sysfsJean Delvare2015-04-271-6/+6
| | | | | | | | FLAG_NO_FILE_OFFSET must be honored also in --dump-bin mode. As a side effect, the --dump-bin mode becomes a little more verbose by default, but I don't think this is a problem. It can still be silenced completely with -q if needed.
* dmidecode: Stop decoding v3 tables at End-of-Table markerJean Delvare2015-04-271-1/+6
| | | | | | The SMBIOS v3 64-bit entry points do not provide the exact size of the DMI table, only a maximum, so we have to stop decoding at the End-of-Table (127) type structure.
* dmidecode: Add support for 64-bit addressesJean Delvare2015-04-271-5/+7
| | | | | | | | We can easily support 64-bit addresses by compiling dmidecode with -D_FILE_OFFSET_BITS=64. This looks reasonably portable. Also add support for 32-bit long tables, as SMBIOS 3.0.0 allows it, even though I don't expect to see such a long DMI table any time soon.
* dmidecode: Add fields from the SMBIOS 3.0.0 specificationJean Delvare2015-04-271-5/+11
| | | | | | Add support for 3 new fields in DMI type 4 (Processor Information): extended core and thread counts, for systems with more than 255 of those.
* dmidecode: Add enums from the SMBIOS 3.0.0 specificationJean Delvare2015-04-271-8/+38
| | | | | | Add 28 new enumerated values from the SMBIOS 3.0.0 specification (3 chassis types, 4 processor families, 4 processor upgrades, 13 slot types and 4 memory device types.)
* dmidecode: Preliminary support for 64-bit entry pointJean Delvare2015-04-271-10/+83
| | | | | | | | Add preliminary support for the new _SM3_ 64-bit entry point defined in the SMBIOS specification version 3.0.0. 64-bit addresses are not actually supported yet, nor tables with size over 16-bit.
* dmidecode: Add --no-sysfs option to disable use of sysfsJean Delvare2015-04-211-1/+2
| | | | | | | | This option forces any SMBIOS information in sysfs to be ignored, resulting in dmidecode using /dev/mem for SMBIOS access. This is likely most useful for debugging. Contributed by Roy Franz.
* dmidecode: Add reading of SMBIOS tables from sysfsJean Delvare2015-04-211-1/+40
| | | | | | | | | | | | | | | | | | | | | Add preferential reading of the SMBIOS tables from /sys/firmware/dmi/tables. If these files are not present or not valid, the previously supported methods of locating SMBIOS tables are attempted. Messages indicating which source is used for the tables have been added. These are printed before the tables have been validated so they can go at the top of the output. This also shows what methods have been tried and failed due to invalid tables. The address of the entry point is not known when read from sysfs, so it is not printed in that case. A placeholder print is added where 64-bit entry point processing will be added. Contributed by Roy Franz.
* dmidecode: Add passing of flags parameter to dmi_table()Jean Delvare2015-04-211-10/+22
| | | | | | | | | | | | | This allows dmi_table() to print the address that the table was read from, even when reading from a sysfs file. Previous to sysfs support, the address of the table was always the same as the offset within the file it was read from (usually /dev/mem.) For sysfs files that contain just the table at offset 0, we still want to pass the address and display that as normal, but read from offset 0 in the file. If the flag FLAG_NO_FILE_OFFSET is passed, dmi_table() uses 'base' as the DMI table address for display, but uses 0 as the file offset. Contributed by Roy Franz.
* Add support for DDR4 (DMI type 17). Patch from Tomohiro Kimura. The valueJean Delvare2014-10-131-2/+3
| | | | | was taken from preliminary SMBIOS specification version 3.0.0d. This closes bug #43370.
* Decode the CPUID of recent AMD processors (DMI type 4).Jean Delvare2014-07-111-3/+3
|
* Skip the SMBIOS version comparison in quiet mode.Jean Delvare2014-03-201-1/+1
| | | | Patch from Jens Rosenboom.
* Let legacy_decode be quiet in dump mode too.Jean Delvare2014-03-201-1/+3
|
* Fix spacing of memory module voltage attributes (DMI type 17)Jean Delvare2014-02-251-3/+3
|
* dmidecode.c: Decode ID of PCI Express 3 slots (DMI type 9).Jean Delvare2014-01-131-1/+11
| | | | | This fixes Savannah bug #40178: https://savannah.nongnu.org/bugs/?40178
* Bump SUPPORTED_SMBIOS_VER so that SMBIOS 2.8 implementations don't triggerJean Delvare2013-04-261-1/+1
| | | | a warning.
* Fix support for new processor upgrade types (DMI type 4) and new memoryJean Delvare2013-04-241-4/+2
| | | | device type (DMI type 17.)
* Strip trailig zeroes from memory voltage values.Jean Delvare2013-04-241-1/+1
|
* Drop unneeded and possibly dangerous cast.Jean Delvare2013-04-231-1/+1
| | | | Not that I really expect memory modules running above 32 V...
* Make voltage labels case consistent.Jean Delvare2013-04-231-3/+3
|
* Bump release verison to 2.12dmidecode-2-12Anton Arapov2013-04-171-5/+35
|
* dmidecode.c: Properly print the hexadecimal value of invalid stringJean Delvare2011-11-181-1/+1
| | | | characters.
* Make dmi_chassis_type aware of the lock bit (Closes: #33978).Anton Arapov2011-11-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . Previously all bits of the parameter passed to dmi_chassis_type were used to derive the chassis type although the 7th bit indicates a lock and only bits 6:0 encode the chassis type (7.4 System Enclosure or Chassis (Type 3), offset 05h). This is ok as long as the input is masked as it was done in dmi_decode, but it was forgotten in dmi_table_string, resulting in wrong output if there is a lock present: . dmidecode -s chassis-type <OUT OF SPEC> . although the normal output is correct: . [...] Handle 0x0003, DMI type 3, 17 bytes Chassis Information Manufacturer: Chassis Manufacture Type: Desktop Lock: Present [...] . dump (the 5th byte (83) is the interesting one): . dmidecode -t chassis -u SMBIOS 2.3 present. . Handle 0x0003, DMI type 3, 17 bytes Header and Data: 03 11 03 00 01 83 02 03 04 03 03 03 03 01 00 00 00 . Tested with current CVS code on a "Laptop" without a lock (by me) and on the "Desktop" board dumped above (by Florian Zumbiehl, thanks!). Patch from Stefan Tauner
* Update to support SMBIOS specification version 2.7.1.Jean Delvare2011-04-201-7/+31
|
* Fix boundary checks of memory array location codes (DMI type 16). ReportedJean Delvare2011-01-251-1/+1
| | | | by Andrey Matveyev.
* Reword "PCI Express Gen 2" to just "PCI Express 2" (DMI type 9).Jean Delvare2010-11-241-6/+17
| | | | | Decode the slot ID for all PCI Express and PCI Express 2 slots (DMI type 9).
* Fix CPU flags mask (DMI type 4).Jean Delvare2010-11-241-1/+1
|
* Trivial style fixes.Jean Delvare2010-11-241-2/+2
|
* Decode BIOS language information flags (DMI type 13).Jean Delvare2010-11-241-0/+13
|
* Fix offset of partition width (DMI type 19).Jean Delvare2010-11-241-1/+1
|
* Consistently use hexadecimal for offsets.Jean Delvare2010-11-241-1/+1
|
* Assume that the max power capacity is expressed in Watts, notJean Delvare2010-11-241-1/+1
| | | | | | | milliWatts. 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.
* Add description of cooling device (DMI type 27).Jean Delvare2010-11-241-3/+53
| | | | | Add limited support for new DMI type 42 (Management Controller Host Interface).
* Add support for memory arrays of 2 TB and more (DMI types 16, 19 andJean Delvare2010-11-241-37/+150
| | | | | 20). Add support for memory devices of 32 GB and more (DMI type 17).
* Add UEFI support and virtual machine flags to BIOS characteristicsJean Delvare2010-11-241-12/+42
| | | | | | | | (DMI type 0). Add SKU number field to system enclosure or chassis (DMI type 3). Add many Intel, AMD and VIA CPU family names (DMI type 4). Add many socket formats (DMI type 4). Add processor characteristics flags (DMI type 4).
* Update all references to the SMBIOS specification to match the newJean Delvare2010-11-241-147/+147
| | | | numbering in version 2.7.0 of the document.
* Fix length condition when decoding battery capacity. Probably not a bigJean Delvare2010-11-181-1/+1
| | | | deal in practice, but there's no point in checking beyond our needs.
* Handle DMI type 2 record of size 0x0E.Jean Delvare2010-11-161-1/+2
|