Intel e7505: enable ECC scrubbing
It takes about 3 seconds to scrub 8GiB DDR266 RAM.
After ECC scrub XIP cache is disabled for system stability. There is
very little to do in romstage after ECC scrub, especially when RAM
debug messages are turned off. So the delay caused by this is hardly
noticeable.
Cache for complete ROM is re-enabled before ramstage is decompressed,
and it has no unstability issues. So the code required to re-enable
cache for ROM currently already exists in cache-as-ram_ht.inc.
A Kconfig option HW_SCRUBBER enables the scrub to be run on hard
reboots and power-ons.
Change-Id: Icf27acf73240c06b58091f1229efc0f01cca3f85
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/905
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
diff --git a/src/mainboard/aopen/dxplplusu/romstage.c b/src/mainboard/aopen/dxplplusu/romstage.c
index 73e445b..ee900e9 100644
--- a/src/mainboard/aopen/dxplplusu/romstage.c
+++ b/src/mainboard/aopen/dxplplusu/romstage.c
@@ -68,8 +68,23 @@
// If this is a warm boot, some initialization can be skipped
if (!bios_reset_detected()) {
enable_smbus();
- sdram_initialize(ARRAY_SIZE(memctrl), memctrl);
+
+ /* The real MCH initialisation. */
+ e7505_mch_init(memctrl);
+
+ /*
+ * ECC scrub invalidates cache, so all stack in CAR
+ * is lost. Only return addresses from main() and
+ * scrub_ecc() are recovered to stack via xmm0-xmm3.
+ */
+#if CONFIG_HW_SCRUBBER
+ unsigned long ret_addr = (unsigned long)((unsigned long*)&bist - 1);
+ e7505_mch_scrub_ecc(ret_addr);
+#endif
+
+ /* Hook for post ECC scrub settings and debug. */
+ e7505_mch_done(memctrl);
}
- print_debug("SDRAM is up.\n");
+ printk(BIOS_DEBUG, "SDRAM is up.\n");
}