[coreboot-gerrit] Change in coreboot[master]: nb/intel/sandybridge/raminit: Fix DIMM type mapping

Patrick Rudolph (Code Review) gerrit at coreboot.org
Fri Aug 17 15:50:17 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/28192


Change subject: nb/intel/sandybridge/raminit: Fix DIMM type mapping
......................................................................

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 at das-labor.org>
---
M src/northbridge/intel/sandybridge/raminit.c
1 file changed, 23 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/28192/1

diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index c397fa5..6e408f1 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -112,7 +112,29 @@
 			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,
 			       DIMM_INFO_SERIAL_SIZE);

-- 
To view, visit https://review.coreboot.org/28192
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0211fa133f4ba9d60dfbd5f0dd45a43df68c030
Gerrit-Change-Number: 28192
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180817/0e976398/attachment.html>


More information about the coreboot-gerrit mailing list