[coreboot-gerrit] Change in coreboot[master]: smbios: Add option to select the enclosure type
Julien Viard de Galbert (Code Review)
gerrit at coreboot.org
Thu Feb 22 16:44:47 CET 2018
Julien Viard de Galbert has uploaded this change for review. ( https://review.coreboot.org/23841
Change subject: smbios: Add option to select the enclosure type
......................................................................
smbios: Add option to select the enclosure type
Also use it for scaleway/tagada
Change-Id: I35bc913af69565531831746040a0afe0cabe1c58
Signed-off-by: Julien Viard de Galbert <jviarddegalbert at online.net>
---
M src/arch/x86/smbios.c
M src/mainboard/scaleway/tagada/Kconfig
2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/23841/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index 548e6ed..9475034 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -434,10 +434,14 @@
t->bootup_state = SMBIOS_STATE_SAFE;
t->power_supply_state = SMBIOS_STATE_SAFE;
t->thermal_state = SMBIOS_STATE_SAFE;
+#ifdef CONFIG_SMBIOS_ENCLOSURE_TYPE
+ t->_type = CONFIG_SMBIOS_ENCLOSURE_TYPE;
+#else
if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP))
t->_type = SMBIOS_ENCLOSURE_LAPTOP;
else
t->_type = SMBIOS_ENCLOSURE_DESKTOP;
+#endif
t->security_status = SMBIOS_STATE_SAFE;
len = t->length + smbios_string_table_len(t->eos);
*current += len;
diff --git a/src/mainboard/scaleway/tagada/Kconfig b/src/mainboard/scaleway/tagada/Kconfig
index f8f4ece..691346b 100644
--- a/src/mainboard/scaleway/tagada/Kconfig
+++ b/src/mainboard/scaleway/tagada/Kconfig
@@ -42,4 +42,8 @@
help
Location of BMC SERIAL information.
+config SMBIOS_ENCLOSURE_TYPE
+ hex
+ default 0x19
+
endif # BOARD_SCALEWAY_TAGADA
--
To view, visit https://review.coreboot.org/23841
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I35bc913af69565531831746040a0afe0cabe1c58
Gerrit-Change-Number: 23841
Gerrit-PatchSet: 1
Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert at online.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180222/3b178ce7/attachment.html>
More information about the coreboot-gerrit
mailing list