Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/28191
Change subject: nb/intel/sandybridge: Fill in DIMM serial number ......................................................................
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 --- M src/device/dram/ddr3.c M src/include/device/dram/ddr3.h M src/northbridge/intel/sandybridge/raminit.c 3 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/28191/1
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c index a084ca0..2fe9a62 100644 --- a/src/device/dram/ddr3.c +++ b/src/device/dram/ddr3.c @@ -398,6 +398,9 @@ memcpy(dimm->part_number, &spd[128], 16); printram(" Part number : %s\n", dimm->part_number);
+ memcpy(&dimm->serial, &spd[122], 4); + printram(" Serial number : 0x%x\n", dimm->serial); + return ret; }
diff --git a/src/include/device/dram/ddr3.h b/src/include/device/dram/ddr3.h index 9a24661..951d9c5 100644 --- a/src/include/device/dram/ddr3.h +++ b/src/include/device/dram/ddr3.h @@ -174,6 +174,8 @@ u16 manufacturer_id; /* ASCII part number - NULL terminated */ u8 part_number[17]; + /* Serial number */ + u32 serial; } dimm_attr;
enum ddr3_xmp_profile { diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c index 47474ee..c397fa5 100644 --- a/src/northbridge/intel/sandybridge/raminit.c +++ b/src/northbridge/intel/sandybridge/raminit.c @@ -114,6 +114,8 @@ 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, + DIMM_INFO_SERIAL_SIZE); mem_info->dimm_cnt++; } }