Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/50015 )
Change subject: arch/x86/smbios: Add Number Of Power Cords field to be overriden ......................................................................
arch/x86/smbios: Add Number Of Power Cords field to be overriden
For SMBIOS type 3, add function to override number of power cords
Tested=Exectute dmidecode -t 3 to verify.
Signed-off-by: JingleHsuWiwynn jingle_hsu@wiwynn.com Change-Id: I7dee3a944a49ffcfdc2f4408d92a17aa39761bb0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50015 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/arch/x86/smbios.c M src/arch/x86/smbios_defaults.c M src/include/smbios.h 3 files changed, 7 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index b3e1c13..8c595ff 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -609,6 +609,7 @@ t->thermal_state = SMBIOS_STATE_SAFE; t->_type = smbios_mainboard_enclosure_type(); t->security_status = SMBIOS_STATE_SAFE; + t->number_of_power_cords = smbios_chassis_power_cords(); t->asset_tag_number = smbios_add_string(t->eos, smbios_mainboard_asset_tag()); t->version = smbios_add_string(t->eos, smbios_chassis_version()); t->serial_number = smbios_add_string(t->eos, smbios_chassis_serial_number()); diff --git a/src/arch/x86/smbios_defaults.c b/src/arch/x86/smbios_defaults.c index 4d8883f3..3d26bbb 100644 --- a/src/arch/x86/smbios_defaults.c +++ b/src/arch/x86/smbios_defaults.c @@ -143,3 +143,8 @@ { return ""; } + +__weak u8 smbios_chassis_power_cords(void) +{ + return 1; +} diff --git a/src/include/smbios.h b/src/include/smbios.h index 2f63aac..5cbd3c3 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -54,6 +54,7 @@ const char *smbios_chassis_version(void); const char *smbios_chassis_serial_number(void); const char *smbios_processor_serial_number(void); +u8 smbios_chassis_power_cords(void);
/* This string could be filled late in payload. */ void smbios_type0_bios_version(uintptr_t address);