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
This commit is contained in:
Ronald G. Minnich 2006-09-13 01:57:47 +00:00 committed by Ronald G. Minnich
parent 5ef4c598fb
commit aefa3d74f9
2 changed files with 24 additions and 2 deletions

View File

@ -94,6 +94,17 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
msr.lo = 0x8ea0ad6a; msr.lo = 0x8ea0ad6a;
wrmsr(0x4c00000f, msr); 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;
}
} }

View File

@ -135,6 +135,17 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
print_debug("DRAM controller init done.\r\n"); 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;
}
} }