diff options
author | Furquan Shaikh <furquan@google.com> | 2018-08-03 09:34:25 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2018-08-07 02:38:41 +0000 |
commit | efc71c8059a269d2a0e9b22df905941c275ed3a3 (patch) | |
tree | dc22fe0a304b3f4900cb0d3bdf960519f10174fc /src/mainboard | |
parent | 509e5fd4c0d2da06bd7f413e01db1c094156206f (diff) |
mb/google/poppy/variants/nautilus: Add SKU info to SMBIOS
This change provides implementation of smbios_mainboard_sku() to add
proper "skuX" string to SMBIOS table 1.
BUG=b:112163362
TEST=Verified "dmidecode -t 1" reports skuX correctly.
Change-Id: I7e42d2c80d791ea7170d066d2eeaa0c6811eb9c9
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27862
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/poppy/variants/nautilus/mainboard.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainboard/google/poppy/variants/nautilus/mainboard.c b/src/mainboard/google/poppy/variants/nautilus/mainboard.c index 502195e473..e51370cfa3 100644 --- a/src/mainboard/google/poppy/variants/nautilus/mainboard.c +++ b/src/mainboard/google/poppy/variants/nautilus/mainboard.c @@ -17,6 +17,8 @@ #include <chip.h> #include <gpio.h> #include <device/device.h> +#include <smbios.h> +#include <string.h> #include <variant/sku.h> uint32_t variant_board_sku(void) @@ -40,6 +42,15 @@ uint32_t variant_board_sku(void) return sku_id; } +const char *smbios_mainboard_sku(void) +{ + static char sku_str[5]; /* sku{0-1} */ + + snprintf(sku_str, sizeof(sku_str), "sku%u", variant_board_sku()); + + return sku_str; +} + /* Override dev tree settings per board */ void variant_devtree_update(void) { |