From fc5a3c949dd7ea2aa1d495fb59bbca32e96c0ef6 Mon Sep 17 00:00:00 2001 From: Lijian Zhao Date: Thu, 11 Apr 2019 00:50:39 -0700 Subject: [PATCH] mb/google/sarien: Update SMBIOS type17 Match SMBIOS type 17 device locator with motherboard silk screen,using "DIMM-A" and "DIMM-B" instead of "Channel-0-DIMM-0" and "Chaneel-1-DIMM-0". TEST=Boot up with sarien platform and run dmidecode to check SMBIOS type 17 have expected output. Signed-off-by: Lijian Zhao Change-Id: Ie2125c0381bd24d96f725f68cde93a53da8c94c8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/32280 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie --- src/mainboard/google/sarien/ramstage.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/mainboard/google/sarien/ramstage.c b/src/mainboard/google/sarien/ramstage.c index 96321f8d49..d8d1c9dbe3 100644 --- a/src/mainboard/google/sarien/ramstage.c +++ b/src/mainboard/google/sarien/ramstage.c @@ -14,11 +14,31 @@ */ #include +#include #include #include #include #include +#if CONFIG(GENERATE_SMBIOS_TABLES) +/* mainboard silk screen shows DIMM-A and DIMM-B */ +void smbios_fill_dimm_locator(const struct dimm_info *dimm, + struct smbios_type17 *t) +{ + switch (dimm->channel_num) { + case 0: + t->device_locator = smbios_add_string(t->eos, "DIMM-A"); + break; + case 1: + t->device_locator = smbios_add_string(t->eos, "DIMM-B"); + break; + default: + t->device_locator = smbios_add_string(t->eos, "UNKNOWN"); + break; + } +} +#endif + void mainboard_silicon_init_params(FSP_S_CONFIG *params) { const struct pad_config *gpio_table;