[coreboot-gerrit] Change in coreboot[master]: nb/intel/sandybridge/raminit: Fix dual DIMM command rate

Patrick Rudolph (Code Review) gerrit at coreboot.org
Mon Jun 19 19:38:10 CEST 2017


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


Change subject: nb/intel/sandybridge/raminit: Fix dual DIMM command rate
......................................................................

nb/intel/sandybridge/raminit: Fix dual DIMM command rate

On boards that are able to take two DIMMs per channel the
command rate should be 2T. It is possible to use 1T with
load reduced "1T" DIMMs, but it's not clear how to detect
those DIMMs. Raminit might fail for those who do not have
such DIMMS installed.

Hardcode command rate of 2T to make sure raminit works on
dual DIMM per channel boards (currently only desktop boards).

The command rate of 1T is still tested if only 1 DIMM per
channel is present.

Change-Id: I029d01092fd0e11390cebcd94ca6f23bf0ee2cab
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/northbridge/intel/sandybridge/raminit_common.c
1 file changed, 19 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/20270/1

diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index be0589d..92106f4 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -2350,7 +2350,25 @@
 	}
 
 	FOR_ALL_POPULATED_CHANNELS {
-		/* try command rate 1T and 2T */
+		/*
+		 * Dual DIMM per channel:
+		 * Skip 1T in dual DIMM mode - only supported by a few DIMMs
+		 * TODO: How to detect 1T DIMMs ?
+		 */
+		if ((ctrl->rankmap[channel] & 0x5) == 0x5) {
+			err = try_cmd_stretch(ctrl, channel, 2);
+			if (err) {
+				printk(BIOS_EMERG, "c320c discovery failed\n");
+				return err;
+			}
+
+			continue;
+		}
+
+		/*
+		 * Single DIMM per channel:
+		 * Try command rate 1T and 2T
+		 */
 		err = try_cmd_stretch(ctrl, channel, 0);
 		if (err) {
 			err = try_cmd_stretch(ctrl, channel, 2);

-- 
To view, visit https://review.coreboot.org/20270
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I029d01092fd0e11390cebcd94ca6f23bf0ee2cab
Gerrit-Change-Number: 20270
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>



More information about the coreboot-gerrit mailing list