diff options
author | Tom Rini | 2021-04-05 11:29:57 -0400 |
---|---|---|
committer | Tom Rini | 2021-04-05 11:29:57 -0400 |
commit | 90eba245a66aa20589404ba537215faf2012c1a3 (patch) | |
tree | c581cd1f00dd162aeac4262bb4e74c2a9fea98c9 /include/smbios.h | |
parent | b46dd116ce03e235f2a7d4843c6278e1da44b5e1 (diff) | |
parent | db8b46120aed6554d1ff405260ea6d2cc2439fcc (diff) |
Merge branch 'next'
Diffstat (limited to 'include/smbios.h')
-rw-r--r-- | include/smbios.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/smbios.h b/include/smbios.h index ecc4fd1de3b..ffeefb47372 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -14,6 +14,10 @@ #define SMBIOS_MAJOR_VER 3 #define SMBIOS_MINOR_VER 0 +enum { + SMBIOS_STR_MAX = 64, /* Maximum length allowed for a string */ +}; + /* SMBIOS structure types */ enum { SMBIOS_BIOS_INFORMATION = 0, @@ -269,4 +273,20 @@ const char *smbios_string(const struct smbios_header *header, int index); */ int smbios_update_version(const char *version); +/** + * smbios_update_version_full() - Update the version string + * + * This can be called after the SMBIOS tables are written (e.g. after the U-Boot + * main loop has started) to update the BIOS version string (SMBIOS table 0). + * It scans for the correct place to put the version, so does not need U-Boot + * to have actually written the tables itself (e.g. if a previous bootloader + * did it). + * + * @smbios_tab: Start of SMBIOS tables + * @version: New version string to use + * @return 0 if OK, -ENOENT if no version string was previously written, + * -ENOSPC if the new string is too large to fit + */ +int smbios_update_version_full(void *smbios_tab, const char *version); + #endif /* _SMBIOS_H_ */ |