summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2018-08-17 15:47:23 +0200
committerFelix Held <felix-coreboot@felixheld.de>2018-08-20 09:51:46 +0000
commit08c9a7ce1fa0f7b2ec7972ac2826ed3b48b4831f (patch)
treefc61883c94d250217266ce04353ce0e28932bc3a /src
parent15e6469ef9ef76678aae0a5244bda1d9cbb3ee72 (diff)
downloadcoreboot-08c9a7ce1fa0f7b2ec7972ac2826ed3b48b4831f.tar.xz
nb/intel/sandybridge/raminit: Fix DIMM type mapping
The DIMM type read from SPD needs to be converted to make sure SMBIOS fills in the correct formfactor. Tested on Lenovo T430: The Form Factor no longer reads as unknown. Change-Id: Ia0211fa133f4ba9d60dfbd5f0dd45a43df68c030 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/28192 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 3b73b7215c..4d02a64e2c 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -112,7 +112,29 @@ static void fill_smbios17(ramctr_timing *ctrl)
memcpy(dimm->module_part_number,
info->dimm[channel][slot].part_number, 16);
dimm->mod_id = info->dimm[channel][slot].manufacturer_id;
- dimm->mod_type = info->dimm[channel][slot].dimm_type;
+
+ switch (info->dimm[channel][slot].dimm_type) {
+ case SPD_DIMM_TYPE_SO_DIMM:
+ dimm->mod_type = SPD_SODIMM;
+ break;
+ case SPD_DIMM_TYPE_72B_SO_CDIMM:
+ dimm->mod_type = SPD_72B_SO_CDIMM;
+ break;
+ case SPD_DIMM_TYPE_72B_SO_RDIMM:
+ dimm->mod_type = SPD_72B_SO_RDIMM;
+ break;
+ case SPD_DIMM_TYPE_UDIMM:
+ dimm->mod_type = SPD_UDIMM;
+ break;
+ case SPD_DIMM_TYPE_RDIMM:
+ dimm->mod_type = SPD_RDIMM;
+ break;
+ case SPD_DIMM_TYPE_UNDEFINED:
+ default:
+ dimm->mod_type = SPD_UNDEFINED;
+ break;
+ }
+
dimm->bus_width = MEMORY_BUS_WIDTH_64; // non-ECC only
memcpy(dimm->serial, info->dimm[channel][slot].serial,