From d712c628e7686d344698b8185f03e019bcee50ec Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 23 Feb 2023 16:23:34 -0700 Subject: soc/amd/common/fsp/dmi.c: Fill in mem manufacturer from CBI Because the ChromeOS boards don't fill a manufacturer in for the memory SPDs, that information isn't available from the FSP. We can get the Manufacturer ID based on the memory name from CBI instead. Use this information to fill in an ID so that the manufacturer name is available in the SMBIOS information. BUG=None TEST=Look at dmidecode output Signed-off-by: Martin Roth Change-Id: I810c3191180dd3b566d7ea64006f29b625b10526 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73255 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/amd/common/fsp/dmi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/soc/amd') diff --git a/src/soc/amd/common/fsp/dmi.c b/src/soc/amd/common/fsp/dmi.c index 9c89792123..a671476c9d 100644 --- a/src/soc/amd/common/fsp/dmi.c +++ b/src/soc/amd/common/fsp/dmi.c @@ -234,6 +234,22 @@ static void prepare_dmi_16_17(void *unused) null terminated */ strncpy((char *)dimm_info->module_part_number, cbi_part_number, sizeof(dimm_info->module_part_number) - 1); + + /* These ID values match what's used in device/dram/spd.c */ + switch (dimm_info->module_part_number[0]) { + case 'H': + dimm_info->mod_id = 0xad00; // Hynix + break; + case 'K': + dimm_info->mod_id = 0x9801; // Kingston + break; + case 'M': + dimm_info->mod_id = 0x2c00; // Micron + break; + case 'N': + dimm_info->mod_id = 0x0b83; // Nanya + break; + } } print_dimm_info(dimm_info); dimm_cnt++; -- cgit v1.2.3