From e14f5e80d1019c7a41b53c7f1a6d6b4d55b3d4f0 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Fri, 13 Jun 2014 08:46:27 +0800 Subject: [PATCH] smbios: Allow custom Type3 entry Add config option for customize this value by board. BUG=chromium:366940 TEST=Manual add config for specific board and verify by dmidecode. Signed-off-by: Kevin Cheng Change-Id: I6deb7f07c00c899bad1eb08fa6a2410deb7a8c6a Reviewed-on: https://chromium-review.googlesource.com/203657 Reviewed-by: David Hendricks Commit-Queue: Kevin Cheng Tested-by: Kevin Cheng --- src/arch/x86/boot/smbios.c | 2 +- src/mainboard/Kconfig | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c index 78c0a0ca8f..75f7853164 100644 --- a/src/arch/x86/boot/smbios.c +++ b/src/arch/x86/boot/smbios.c @@ -214,7 +214,7 @@ static int smbios_write_type3(unsigned long *current, int handle) t->bootup_state = SMBIOS_STATE_SAFE; t->power_supply_state = SMBIOS_STATE_SAFE; t->thermal_state = SMBIOS_STATE_SAFE; - t->_type = 3; + t->_type = CONFIG_MAINBOARD_ENCLOSURE_TYPE; t->security_status = SMBIOS_STATE_SAFE; len = t->length + smbios_string_table_len(t->eos); *current += len; diff --git a/src/mainboard/Kconfig b/src/mainboard/Kconfig index fb6428cab5..62ac72f0c0 100644 --- a/src/mainboard/Kconfig +++ b/src/mainboard/Kconfig @@ -341,4 +341,9 @@ config MAINBOARD_VERSION default "1.0" help Define the used version number which will be used by SMBIOS tables. + +config MAINBOARD_ENCLOSURE_TYPE + hex "System Enclosure or Chassis type" + depends on GENERATE_SMBIOS_TABLES + default 0x3 endmenu