[coreboot-gerrit] Patch set updated for coreboot: [Needs Test]nb/intel/i945: Fix detection of one DIMM per channel
HAOUAS Elyes (ehaouas@noos.fr)
gerrit at coreboot.org
Sun Mar 12 08:02:08 CET 2017
HAOUAS Elyes (ehaouas at noos.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18548
-gerrit
commit f73935e8e2451e7e60880b37a591ecd4d64d3a4d
Author: Elyes HAOUAS <ehaouas at noos.fr>
Date: Thu Mar 2 19:55:44 2017 +0100
[Needs Test]nb/intel/i945: Fix detection of one DIMM per channel
Fix one DIMM per channel detection.
"if ( !(sysinfo->dimm[0] != SYSINFO_DIMM_NOT_POPULATED &&
sysinfo->dimm[1] != SYSINFO_DIMM_NOT_POPULATED) ) {"
is true when both of dimm[0] and dimm[1] are not populated.
Change-Id: I7aec35f45250da554ddc5a68f5add157c313399c
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
src/northbridge/intel/i945/raminit.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c
index a7ccefb..1ccf6ab 100644
--- a/src/northbridge/intel/i945/raminit.c
+++ b/src/northbridge/intel/i945/raminit.c
@@ -2793,19 +2793,34 @@ static void sdram_on_die_termination(struct sys_info *sysinfo)
u32 reg32;
int cas;
+ int chan0has1dimm, chan1has1dimm;
+
+ chan0has1dimm = (sysinfo->dimm[0] != SYSINFO_DIMM_NOT_POPULATED &&
+ sysinfo->dimm[1] == SYSINFO_DIMM_NOT_POPULATED) ||
+ (sysinfo->dimm[0] == SYSINFO_DIMM_NOT_POPULATED &&
+ sysinfo->dimm[1] != SYSINFO_DIMM_NOT_POPULATED);
+
+ chan1has1dimm = (sysinfo->dimm[2] != SYSINFO_DIMM_NOT_POPULATED &&
+ sysinfo->dimm[3] == SYSINFO_DIMM_NOT_POPULATED) ||
+ (sysinfo->dimm[2] == SYSINFO_DIMM_NOT_POPULATED &&
+ sysinfo->dimm[3] != SYSINFO_DIMM_NOT_POPULATED);
reg32 = MCHBAR32(ODTC);
reg32 &= ~(3 << 16);
reg32 |= (1 << 14) | (1 << 6) | (2 << 16);
MCHBAR32(ODTC) = reg32;
- if ( !(sysinfo->dimm[0] != SYSINFO_DIMM_NOT_POPULATED &&
- sysinfo->dimm[1] != SYSINFO_DIMM_NOT_POPULATED) ) {
- printk(BIOS_DEBUG, "one dimm per channel config..\n");
+ if ( chan0has1dimm ) {
+ printk(BIOS_DEBUG, "One dimm on channel0 config..\n");
reg32 = MCHBAR32(C0ODT);
reg32 &= ~(7 << 28);
MCHBAR32(C0ODT) = reg32;
+ }
+
+ if ( chan1has1dimm ) {
+ printk(BIOS_DEBUG, "One dimm on channel1 config..\n");
+
reg32 = MCHBAR32(C1ODT);
reg32 &= ~(7 << 28);
MCHBAR32(C1ODT) = reg32;
More information about the coreboot-gerrit
mailing list