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>
This commit is contained in:
parent
7581352759
commit
1d28668296
1 changed files with 11 additions and 4 deletions
|
|
@ -128,7 +128,6 @@ static void dl_oem_smbios_strings(struct device *dev, struct smbios_type11 *t)
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG(GENERATE_SMBIOS_TABLES)
|
||||
static int create_smbios_type9(int *handle, unsigned long *current)
|
||||
{
|
||||
int index;
|
||||
|
|
@ -234,7 +233,17 @@ static int mainboard_smbios_data(struct device *dev, int *handle, unsigned long
|
|||
|
||||
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 @@ static void mainboard_enable(struct device *dev)
|
|||
{
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue