Angel Pons submitted this change.
mb/ocp/deltalake: Override smbios_fill_dimm_locator for type 17
Override smbios_fill_dimm_locator for type 17 Locator and Bank Locator.
Also remove CONFIG(GENERATE_SMBIOS_TABLES) compile option because SMBIOS
is always enabled and it makes the code cleaner.
One sample type 17 table displayed as below:
Handle 0x0010, DMI type 17, 40 bytes
Memory Device
...
Locator: DIMM F0
Bank Locator: _Node0_Channel5_Dimm0
Tested=On OCP Delta Lake, the Locator and Bank Locator strings
are expected.
Change-Id: I84531f9ee8bc76d9529aa983bc13e64f40c93138
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
---
M src/mainboard/ocp/deltalake/ramstage.c
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c
index e00f1c3..c03ad68 100644
--- a/src/mainboard/ocp/deltalake/ramstage.c
+++ b/src/mainboard/ocp/deltalake/ramstage.c
@@ -128,7 +128,6 @@
}
}
-#if CONFIG(GENERATE_SMBIOS_TABLES)
static int create_smbios_type9(int *handle, unsigned long *current)
{
int index;
@@ -234,7 +233,17 @@
return len;
}
-#endif
+
+void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t)
+{
+ char buf[40];
+
+ snprintf(buf, sizeof(buf), "DIMM %c0", 'A' + dimm->channel_num);
+ t->device_locator = smbios_add_string(t->eos, buf);
+
+ snprintf(buf, sizeof(buf), "_Node0_Channel%d_Dimm0", dimm->channel_num);
+ t->bank_locator = smbios_add_string(t->eos, buf);
+}
unsigned int smbios_processor_family(struct cpuid_result res)
{
@@ -251,9 +260,7 @@
{
dev->ops->get_smbios_strings = dl_oem_smbios_strings,
read_fru_areas(CONFIG_BMC_KCS_BASE, CONFIG_FRU_DEVICE_ID, 0, &fru_strings);
-#if (CONFIG(GENERATE_SMBIOS_TABLES))
dev->ops->get_smbios_data = mainboard_smbios_data;
-#endif
}
void mainboard_silicon_init_params(FSPS_UPD *params)
To view, visit change 45799. To unsubscribe, or for help writing mail filters, visit settings.