smbios: Allow writing to the coreboot version string
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 05:00:11 +0000 (18:00 +1300)
committerSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 00:59:37 +0000 (13:59 +1300)
commit272e62cb83f01acf7ae89449eaa9f020e76bff23
tree6cc4a049fcd22bc1e95987e5a6285464224df29f
parent11a38a2573fa6a765043df94eae44544a0d948f4
smbios: Allow writing to the coreboot version string

When U-Boot is booted from coreboot the SMBIOS tables are written by
coreboot, not U-Boot. The existing method of updating the BIOS version
string does not work in that case, since gd->smbios_version is only set
when U-Boot writes the tables.

Add a new function which allows the version to be updated by parsing the
tables and writing the string in the correct place. Since coreboot
provides a pointer to the SMBIOS tables in its sysinfo structure, this
makes it easy to do the update.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/smbios.h
lib/smbios-parser.c
lib/smbios.c