1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-26 16:13:55 +01:00

smbios: Allow a few values to come from sysinfo

While static configuration is useful it cannot cover every case. Sometimes
board revisions are encoded in resistor straps and must be read at
runtime.

The easiest way to provide this information is via sysinfo, since the
board can then provide a driver to read whatever is needed.

Add some standard sysinfo options for this, and use them to obtain the
required information.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2021-02-04 21:17:23 -07:00
committed by Bin Meng
parent 2764cf5e97
commit 07c9e683a4
2 changed files with 40 additions and 3 deletions

View File

@@ -31,6 +31,17 @@
* to read the serial number.
*/
/** enum sysinfo_id - Standard IDs defined by U-Boot */
enum sysinfo_id {
SYSINFO_ID_NONE,
SYSINFO_ID_SMBIOS_SYSTEM_VERSION,
SYSINFO_ID_SMBIOS_BASEBOARD_VERSION,
/* First value available for downstream/board used */
SYSINFO_ID_USER = 0x1000,
};
struct sysinfo_ops {
/**
* detect() - Run the hardware info detection procedure for this