diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-07 12:50:57 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-06-09 06:29:59 +0000 |
commit | be242788c23fe3ee1ac1e5585584969deb50def4 (patch) | |
tree | 522c9a847955a852a86df37c8eded430e6e33e97 /src/arch/x86 | |
parent | 8770954b99aedaa95f4066b0b35d52ba44373daa (diff) | |
download | coreboot-be242788c23fe3ee1ac1e5585584969deb50def4.tar.xz |
SMBIOS: Remove Kconfig SYSTEM_ENCLOSURE_TYPE
This gets rid of the magic numbers in Kconfig.
Change-Id: Ibee033b6c99e3131bb323f0d86d306dcd82f9b45
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42139
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/smbios.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 29d5d54181..ee694087eb 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -479,9 +479,24 @@ smbios_board_type __weak smbios_mainboard_board_type(void) return SMBIOS_BOARD_TYPE_UNKNOWN; } +/* + * System Enclosure or Chassis Types as defined in SMBIOS specification. + * The default value is SMBIOS_ENCLOSURE_DESKTOP (0x03) but laptop, + * convertible, or tablet enclosure will be used if the appropriate + * system type is selected. + */ smbios_enclosure_type __weak smbios_mainboard_enclosure_type(void) { - return CONFIG_SMBIOS_ENCLOSURE_TYPE; + if (CONFIG(SYSTEM_TYPE_LAPTOP)) + return SMBIOS_ENCLOSURE_LAPTOP; + else if (CONFIG(SYSTEM_TYPE_TABLET)) + return SMBIOS_ENCLOSURE_TABLET; + else if (CONFIG(SYSTEM_TYPE_CONVERTIBLE)) + return SMBIOS_ENCLOSURE_CONVERTIBLE; + else if (CONFIG(SYSTEM_TYPE_DETACHABLE)) + return SMBIOS_ENCLOSURE_DETACHABLE; + else + return SMBIOS_ENCLOSURE_DESKTOP; } const char *__weak smbios_system_serial_number(void) |