]> git.baikalelectronics.ru Git - uboot.git/commit
smbios: Fix SMBIOS tables
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Thu, 10 Jun 2021 09:33:15 +0000 (12:33 +0300)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 28 Jun 2021 17:57:13 +0000 (19:57 +0200)
commit48d3c34b237319eb0c5fb6abaaef94d78d30ceef
tree3cc0568466792482908eb229eb2743bdacbcd5ba
parentb2448b3bbfe0f659f8b88714031d724ee765bc53
smbios: Fix SMBIOS tables

Commit f274b45aeba0("smbios: Drop the unused Kconfig options")
break SMBIOS tables.  The reason is that the patch drops the Kconfig
options *after* removing the code using them,  but that changes the semantics
of the code completely.  Prior to the change a non NULL value was used in
the 'product' and 'manufacturer ' fields.

Chapter 6.2 of the DMTF spec requires Manufacturer and Product Name to be
non-null on some of the tables. So let's add sane defaults for Type1/2/3.

* Before the patchset:

<snip>
Handle 0x0002, DMI type 2, 14 bytes
Base Board Information
        Manufacturer: Not Specified
        Product Name: Not Specified
        Version: Not Specified
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Features:
                Board is a hosting board
        Location In Chassis: Not Specified
        Chassis Handle: 0x0000
        Type: Motherboard

Invalid entry length (0). DMI table is broken! Stop.

* After the patchset:

<snip>
Handle 0x0005, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

Handle 0x0006, DMI type 127, 4 bytes
End Of Table

Fixes: f274b45aeba0 ("smbios: Drop the unused Kconfig options")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/smbios.c