Yiwei Tang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75737?usp=email )
Change subject: arch/x86/smbios: Add weak function for BIOS Vendor in SMBIOS Type0 ......................................................................
arch/x86/smbios: Add weak function for BIOS Vendor in SMBIOS Type0
Change-Id: I6dfcca338ffc48b150c966b9aefcefe928704d24 Signed-off-by: Yiwei Tang tangyiwei.2022@bytedance.com --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/75737/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 1ec0ad2..46096af 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -356,7 +356,7 @@ struct smbios_type0 *t = smbios_carve_table(*current, SMBIOS_BIOS_INFORMATION, sizeof(*t), handle);
- t->vendor = smbios_add_string(t->eos, "coreboot"); + t->vendor = smbios_add_string(t->eos, get_bios_vendor()); t->bios_release_date = smbios_add_string(t->eos, coreboot_dmi_date);
if (CONFIG(CHROMEOS_NVS)) { diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 8b62ebb..9738c22 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -162,3 +162,8 @@ { return 1; } + +__weak const char *get_bios_vendor(void) +{ + return "coreboot"; +} diff --git a/src/include/smbios.h b/src/include/smbios.h index 446652c..c06d67e 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -79,6 +79,7 @@ const char *smbios_processor_serial_number(void); u8 smbios_chassis_power_cords(void);
+const char *get_bios_vendor(void); /* This string could be filled late in payload. */ void smbios_type0_bios_version(uintptr_t address);