summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRonald G. Minnich <Ronald G. Minnich>2006-09-13 01:57:47 +0000
committerRonald G. Minnich <rminnich@gmail.com>2006-09-13 01:57:47 +0000
commitaefa3d74f950ad684fceed55d4c955593d33a14a (patch)
treeec3662f6c03f2de21659f97dd224b1fcc4869c14 /src
parent5ef4c598fb76a490a8a57455c244a8be03c7097e (diff)
warm boot patch from richard smith.
signed-off-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2404 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/amd/gx2/raminit.c13
-rw-r--r--src/northbridge/amd/lx/raminit.c13
2 files changed, 24 insertions, 2 deletions
diff --git a/src/northbridge/amd/gx2/raminit.c b/src/northbridge/amd/gx2/raminit.c
index 636c60b9d2..fcc05e92f4 100644
--- a/src/northbridge/amd/gx2/raminit.c
+++ b/src/northbridge/amd/gx2/raminit.c
@@ -94,6 +94,17 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
msr.lo = 0x8ea0ad6a;
wrmsr(0x4c00000f, msr);
- /* DRAM working now?? */
+ /* Fixes from Jordan Crouse of AMD. */
+
+ /* make sure there is nothing stale in the cache */
+ __asm__("wbinvd\n");
+
+ print_debug("RAM DLL lock\r\n");
+ /* The RAM dll needs a write to lock on so generate a few dummy writes */
+ volatile unsigned long *ptr;
+ for (i=0;i<5;i++) {
+ ptr = (void *)i;
+ *ptr = (unsigned long)i;
+ }
}
diff --git a/src/northbridge/amd/lx/raminit.c b/src/northbridge/amd/lx/raminit.c
index d4a5d7b701..3aeea646c1 100644
--- a/src/northbridge/amd/lx/raminit.c
+++ b/src/northbridge/amd/lx/raminit.c
@@ -135,6 +135,17 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
print_debug("DRAM controller init done.\r\n");
- /* DRAM working now?? */
+ /* Fixes from Jordan Crouse of AMD. */
+
+ /* make sure there is nothing stale in the cache */
+ __asm__("wbinvd\n");
+
+ print_debug("RAM DLL lock\r\n");
+ /* The RAM dll needs a write to lock on so generate a few dummy writes */
+ volatile unsigned long *ptr;
+ for (i=0;i<5;i++) {
+ ptr = (void *)i;
+ *ptr = (unsigned long)i;
+ }
}