Mathew King has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34646 )
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
smbios: Make SMBIOS type 3 enclosure type settable at runtime
smbios.h had already declared smbios_mainboard_enclosure_type so this change defines it. It can be overridden in a mainboard so the enclosure type can be set at runtime.
BUG=b:138745917 TEST=Built arcada firmware and verified via dmidecode that enclosure type is correctly set to "Convertible", then temporarily added a smbios_mainboard_enclosure_type to arcadas board file returning 0x20 and verified with dmidecode that the enclosure type is "Detachable"
Change-Id: Iba6e582640989f5cb7e6613813e7b033760a977c --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/34646/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 2f5c3a6..346e874 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -500,6 +500,11 @@ return SMBIOS_BOARD_TYPE_UNKNOWN; }
+u8 __weak smbios_mainboard_enclosure_type(void) +{ + return CONFIG_SMBIOS_ENCLOSURE_TYPE; +} + const char *__weak smbios_system_serial_number(void) { return smbios_mainboard_serial_number(); @@ -620,7 +625,7 @@ t->bootup_state = SMBIOS_STATE_SAFE; t->power_supply_state = SMBIOS_STATE_SAFE; t->thermal_state = SMBIOS_STATE_SAFE; - t->_type = CONFIG_SMBIOS_ENCLOSURE_TYPE; + t->_type = smbios_mainboard_enclosure_type(); t->security_status = SMBIOS_STATE_SAFE; len = t->length + smbios_string_table_len(t->eos); *current += len;
Hello build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34646
to look at the new patch set (#2).
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
smbios: Make SMBIOS type 3 enclosure type settable at runtime
smbios.h had already declared smbios_mainboard_enclosure_type so this change defines it. It can be overridden in a mainboard so the enclosure type can be set at runtime.
BUG=b:138745917 TEST=Built arcada firmware and verified via dmidecode that enclosure type is correctly set to "Convertible", then temporarily added a smbios_mainboard_enclosure_type to arcadas board file returning 0x20 and verified with dmidecode that the enclosure type is "Detachable"
Change-Id: Iba6e582640989f5cb7e6613813e7b033760a977c Signed-off-by: Mathew King mathewk@chromium.org --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/34646/2
Lance Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34646 )
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34646/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/34646/2/src/arch/x86/smbios.c@a623 PS2, Line 623: Set different CONFIG setting in different mainboard Kconfig is good enough?
Mathew King has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34646 )
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34646/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/34646/2/src/arch/x86/smbios.c@a623 PS2, Line 623:
Set different CONFIG setting in different mainboard Kconfig is good enough?
We have a mainboard that will be used in different enclosures and we are planning on using a single BIOS image for all of the enclosures so it will be set dynamically based on sku.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34646 )
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/34646/2/src/arch/x86/smbios.c File src/arch/x86/smbios.c:
https://review.coreboot.org/c/coreboot/+/34646/2/src/arch/x86/smbios.c@a623 PS2, Line 623:
We have a mainboard that will be used in different enclosures and we are planning on using a single […]
Mat, You might put this information in the commit message to explain why its needed.
Hello build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34646
to look at the new patch set (#3).
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
smbios: Make SMBIOS type 3 enclosure type settable at runtime
smbios.h had already declared smbios_mainboard_enclosure_type so this change defines it. It can be overridden in a mainboard so the enclosure type can be set at runtime.
We have a mainboard that will be used in different enclosures and we are planning on using a single BIOS image for all of the enclosures so it will need to be set dynamically based on sku.
BUG=b:138745917 TEST=Built arcada firmware and verified via dmidecode that enclosure type is correctly set to "Convertible", then temporarily added a smbios_mainboard_enclosure_type to arcadas board file returning 0x20 and verified with dmidecode that the enclosure type is "Detachable"
Change-Id: Iba6e582640989f5cb7e6613813e7b033760a977c Signed-off-by: Mathew King mathewk@chromium.org --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/34646/3
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34646 )
Change subject: smbios: Make SMBIOS type 3 enclosure type settable at runtime ......................................................................
smbios: Make SMBIOS type 3 enclosure type settable at runtime
smbios.h had already declared smbios_mainboard_enclosure_type so this change defines it. It can be overridden in a mainboard so the enclosure type can be set at runtime.
We have a mainboard that will be used in different enclosures and we are planning on using a single BIOS image for all of the enclosures so it will need to be set dynamically based on sku.
BUG=b:138745917 TEST=Built arcada firmware and verified via dmidecode that enclosure type is correctly set to "Convertible", then temporarily added a smbios_mainboard_enclosure_type to arcadas board file returning 0x20 and verified with dmidecode that the enclosure type is "Detachable"
Change-Id: Iba6e582640989f5cb7e6613813e7b033760a977c Signed-off-by: Mathew King mathewk@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/34646 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com --- M src/arch/x86/smbios.c 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 2f5c3a6..346e874 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -500,6 +500,11 @@ return SMBIOS_BOARD_TYPE_UNKNOWN; }
+u8 __weak smbios_mainboard_enclosure_type(void) +{ + return CONFIG_SMBIOS_ENCLOSURE_TYPE; +} + const char *__weak smbios_system_serial_number(void) { return smbios_mainboard_serial_number(); @@ -620,7 +625,7 @@ t->bootup_state = SMBIOS_STATE_SAFE; t->power_supply_state = SMBIOS_STATE_SAFE; t->thermal_state = SMBIOS_STATE_SAFE; - t->_type = CONFIG_SMBIOS_ENCLOSURE_TYPE; + t->_type = smbios_mainboard_enclosure_type(); t->security_status = SMBIOS_STATE_SAFE; len = t->length + smbios_string_table_len(t->eos); *current += len;