Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32853
Change subject: soc/intel/cannonlake: Fill DIMM serial number from SPD ......................................................................
soc/intel/cannonlake: Fill DIMM serial number from SPD
Fill the DIMM serial number field for SMBIOS from the saved SPD data that is returned by FSP.
BUG=b:132970635 TEST=This was tested on sarien to ensure that SMBIOS type 17 filled the serial number from the DIMM:
Handle 0x000B, DMI type 17, 40 bytes Memory Device Locator: DIMM-A Serial Number: 41164beb
Change-Id: I85438bd1d581095ea3482dcf077a7f3389f1cd47 Signed-off-by: Duncan Laurie dlaurie@google.com --- M src/soc/intel/cannonlake/romstage/romstage.c 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/32853/1
diff --git a/src/soc/intel/cannonlake/romstage/romstage.c b/src/soc/intel/cannonlake/romstage/romstage.c index 661c98a..8dd9d4b 100644 --- a/src/soc/intel/cannonlake/romstage/romstage.c +++ b/src/soc/intel/cannonlake/romstage/romstage.c @@ -37,6 +37,8 @@ 0x8d, 0x09, 0x11, 0xcf, 0x8b, 0x9f, 0x03, 0x23 \ }
+#define SPD_SAVE_SERIAL_OFFSET 5 + void __weak mainboard_get_dram_part_num(const char **part_num, size_t *len) { /* Default weak implementation, no need to override part number. */ @@ -113,6 +115,11 @@ dram_part_num_len, memory_info_hob->DataWidth); index++; + + /* Extract serial number from SPD */ + memcpy(dest_dimm->serial, + src_dimm->SpdSave + SPD_SAVE_SERIAL_OFFSET, + DIMM_INFO_SERIAL_SIZE); } } mem_info->dimm_cnt = index;