summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorJingleHsuWiwynn <jingle_hsu@wiwynn.com>2021-01-28 09:13:42 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-02-01 08:50:48 +0000
commit4330b961c472e359475bd17d56088c16e4a175b8 (patch)
tree5b5ba2b04f53331d5fcab991189c8ebc7e8142fe /src/arch
parentf578b6f8f4374597cea5ce887c80216b5f7eccb9 (diff)
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>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/smbios.c1
-rw-r--r--src/arch/x86/smbios_defaults.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index b3e1c138f8..8c595ff3d4 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -609,6 +609,7 @@ static int smbios_write_type3(unsigned long *current, int handle)
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 4d8883f3cd..3d26bbbd85 100644
--- a/src/arch/x86/smbios_defaults.c
+++ b/src/arch/x86/smbios_defaults.c
@@ -143,3 +143,8 @@ __weak const char *smbios_processor_serial_number(void)
{
return "";
}
+
+__weak u8 smbios_chassis_power_cords(void)
+{
+ return 1;
+}