summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/device/dram/ddr3.c2
-rw-r--r--src/include/device/dram/ddr3.h2
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c4
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++;
}
}