From e9adaa75bb38ded5cf4e460270315afd891d141c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 4 Feb 2021 21:17:20 -0700 Subject: smbios: Add more options for the BIOS version string At present the version string is obtained from PLAIN_VERSION. Some boards may want to configure this using the device tree, since the build system can more easily insert things there after U-Boot itself is built. Add this option to the code. Also in some cases the version needs to be generated programmatically, such as when it is stored elsewhere in the ROM and must be read first. To handle this, keep a pointer around so that it can be updated later. This works by storing the last string in the context, since it is easier than passing out a little-used extra parameter. Provide a function to update the version string. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- include/asm-generic/global_data.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/asm-generic') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 998beb01760..b6a9991fc9a 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -447,6 +447,12 @@ struct global_data { */ struct acpi_ctx *acpi_ctx; #endif +#if CONFIG_IS_ENABLED(GENERATE_SMBIOS_TABLE) + /** + * @smbios_version: Points to SMBIOS type 0 version + */ + char *smbios_version; +#endif }; /** -- cgit