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 <gaumless@gmail.com>
Change-Id: I810c3191180dd3b566d7ea64006f29b625b10526
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73255
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
This commit is contained in:
Martin Roth
2023-02-23 16:23:34 -07:00
committed by Felix Held
parent 2c6c353b5b
commit d712c628e7

View File

@@ -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++;