summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2015-08-16 17:06:30 +0200
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-10-09 15:00:10 +0000
commit9733e283815b03d2ae602257ac080b195877df37 (patch)
tree656c6caeb80500930bf6cc288c13dbd795ab2d38 /src
parent2a510a7a8627526d9516998248dda9c762333391 (diff)
downloadcoreboot-9733e283815b03d2ae602257ac080b195877df37.tar.xz
nb/intel/sandybridge/raminit: Add edge write discovery check
Make sure edge write test results are sane. Check rn.all to make sure rn.start and rn.end are valid. Most likely the following test is going to fail on the same rank anyway. Change-Id: Ifa601406e6c74ceb8d70063be5ce1bf6bc512c18 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/11247 Tested-by: build bot (Jenkins) Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/sandybridge/raminit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 9df102afc6..76f62a6a8d 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -3130,6 +3130,8 @@ static void discover_edges_write_real(ramctr_timing * ctrl, int channel,
upper[lane] =
min(rn.end - ctrl->edge_offset[i], upper[lane]);
edges[lane] = (lower[lane] + upper[lane]) / 2;
+ if (rn.all || (lower[lane] > upper[lane]))
+ die("edge write discovery failed");
}
}