nb/intel/sandybridge: Fill in DIMM serial number

Fill in SMBIOS type 17 DIMM serial number, read from SPD.

Fixes FWTS SMBIOS type 17 test.

Change-Id: Id6e818bfdf4af0fd34af56dc23df052a3f8c348d
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/28191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Patrick Rudolph 2018-08-17 15:24:56 +02:00 committed by Felix Held
parent eac84ca35c
commit 15e6469ef9
3 changed files with 8 additions and 0 deletions

View File

@ -398,6 +398,8 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
memcpy(dimm->part_number, &spd[128], 16); memcpy(dimm->part_number, &spd[128], 16);
printram(" Part number : %s\n", dimm->part_number); printram(" Part number : %s\n", dimm->part_number);
memcpy(dimm->serial, &spd[SPD_DIMM_SERIAL_NUM], SPD_DIMM_SERIAL_LEN);
return ret; return ret;
} }

View File

@ -174,6 +174,8 @@ typedef struct dimm_attr_st {
u16 manufacturer_id; u16 manufacturer_id;
/* ASCII part number - NULL terminated */ /* ASCII part number - NULL terminated */
u8 part_number[17]; u8 part_number[17];
/* Serial number */
u8 serial[SPD_DIMM_SERIAL_LEN];
} dimm_attr; } dimm_attr;
enum ddr3_xmp_profile { enum ddr3_xmp_profile {

View File

@ -114,6 +114,10 @@ static void fill_smbios17(ramctr_timing *ctrl)
dimm->mod_id = info->dimm[channel][slot].manufacturer_id; dimm->mod_id = info->dimm[channel][slot].manufacturer_id;
dimm->mod_type = info->dimm[channel][slot].dimm_type; dimm->mod_type = info->dimm[channel][slot].dimm_type;
dimm->bus_width = MEMORY_BUS_WIDTH_64; // non-ECC only dimm->bus_width = MEMORY_BUS_WIDTH_64; // non-ECC only
memcpy(dimm->serial, info->dimm[channel][slot].serial,
MIN(sizeof(dimm->serial),
sizeof(info->dimm[channel][slot].serial)));
mem_info->dimm_cnt++; mem_info->dimm_cnt++;
} }
} }