diff options
author | Patrick Rudolph <siro@das-labor.org> | 2018-08-17 15:24:56 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2018-08-20 09:51:22 +0000 |
commit | 15e6469ef9ef76678aae0a5244bda1d9cbb3ee72 (patch) | |
tree | f7266b0eef1ef1cffb14dd14148f51d335d9477d /src | |
parent | eac84ca35c9b8052d198a7ab3593ae8f5bbb1aa8 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/device/dram/ddr3.c | 2 | ||||
-rw-r--r-- | src/include/device/dram/ddr3.h | 2 | ||||
-rw-r--r-- | src/northbridge/intel/sandybridge/raminit.c | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c index a084ca06e0..7655b32012 100644 --- a/src/device/dram/ddr3.c +++ b/src/device/dram/ddr3.c @@ -398,6 +398,8 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd) memcpy(dimm->part_number, &spd[128], 16); printram(" Part number : %s\n", dimm->part_number); + memcpy(dimm->serial, &spd[SPD_DIMM_SERIAL_NUM], SPD_DIMM_SERIAL_LEN); + return ret; } diff --git a/src/include/device/dram/ddr3.h b/src/include/device/dram/ddr3.h index 9a246617d9..563be10c07 100644 --- a/src/include/device/dram/ddr3.h +++ b/src/include/device/dram/ddr3.h @@ -174,6 +174,8 @@ typedef struct dimm_attr_st { u16 manufacturer_id; /* ASCII part number - NULL terminated */ u8 part_number[17]; + /* Serial number */ + u8 serial[SPD_DIMM_SERIAL_LEN]; } dimm_attr; enum ddr3_xmp_profile { diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c index f646a7706e..3b73b7215c 100644 --- a/src/northbridge/intel/sandybridge/raminit.c +++ b/src/northbridge/intel/sandybridge/raminit.c @@ -114,6 +114,10 @@ static void fill_smbios17(ramctr_timing *ctrl) dimm->mod_id = info->dimm[channel][slot].manufacturer_id; dimm->mod_type = info->dimm[channel][slot].dimm_type; 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++; } } |