From 07c9e683a484bc8e5e22976feb54b1c1a460068d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 4 Feb 2021 21:17:23 -0700 Subject: 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 Reviewed-by: Bin Meng --- include/sysinfo.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/sysinfo.h b/include/sysinfo.h index 6e021253524..743f3554659 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -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 -- cgit v1.2.3