Start unifying ram_check() usage in coreboot.
- Make all boards use ram_check() to test the first 640KB of RAM.
- Add a kconfig option which allows a user to enable/disable this
check at compile-time. Run-time changing of this option is planned
too, based on CMOS bits (but not yet included in this patch).
Support for checking the rest of RAM (1MB-TOM) should be added later, but
this is a first good step to at least get a first RAM sanity check. This
is useful (for example) to be able to tell users who have coreboot problems
"Please enable the RAM check in menuconfig and send a boot log" etc.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
===================================================================
@@ -445,6 +445,22 @@
If enabled, you will be able to set breakpoints for gdb debugging.
See src/arch/i386/lib/c_start.S for details.
+config RAM_CHECK
+ bool "Check RAM after initialization"
+ default n
+ help
+ Enable this option if coreboot should do a very simple RAM check
+ after it has initialized the memory.
+
+ Note: This is NOT a check whether your RAM is faulty, it merely
+ does a sanity check whether the RAM initialization of coreboot
+ has worked correctly. For more advanced RAM testing please use
+ memtest86(+) as coreboot payload or loaded from GRUB.
+
+ Currently coreboot checks the first 640KB of RAM only.
+
+ If unsure, say N.
+
endmenu
config LIFT_BSP_APIC_ID
===================================================================
@@ -312,6 +312,7 @@
init_timer(); // Need to use TMICT to synconize FID/VID
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
#if 0
dump_pci_devices();
===================================================================
@@ -312,6 +312,7 @@
init_timer(); // Need to use TMICT to synconize FID/VID
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
#if 0
dump_pci_devices();
===================================================================
@@ -312,6 +312,7 @@
init_timer(); // Need to use TMICT to synconize FID/VID
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
#if 0
dump_pci_devices();
===================================================================
@@ -44,5 +44,6 @@
report_bist_failure(bist);
cs5530_enable_rom();
sdram_init();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -121,7 +121,7 @@
ddr_ram_setup(&ctrl);
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
print_spew("Leaving auto.c:main()\r\n");
}
===================================================================
@@ -51,6 +51,5 @@
/* Initialize RAM. */
sdram_init();
- /* Check whether RAM works. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -51,6 +51,5 @@
/* Initialize RAM. */
sdram_init();
- /* Check whether RAM works. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -254,6 +254,8 @@
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
#if 0
print_pci_devices();
#endif
===================================================================
@@ -119,7 +119,7 @@
sdram_enable(0, memctrl);
/* Check RAM. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* ram_check(64512 * 1024, 65536 * 1024); */
ac97_io_enable();
===================================================================
@@ -120,6 +120,8 @@
// dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
===================================================================
@@ -345,6 +345,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram(); // bsp swtich stack to ram and copy sysinfo ram now
}
===================================================================
@@ -131,6 +131,8 @@
dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
===================================================================
@@ -422,6 +422,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram(); // bsp swtich stack to ram and copy sysinfo ram now
}
===================================================================
@@ -370,6 +370,9 @@
raminit_amdmct(sysinfo);
post_code(0x41);
+ /* FIXME: Proper location? Same for all post_cache_as_ram() calls. */
+ ram_check(0, 640 * 1024);
+
// printk_debug("\n*** Yes, the copy/decompress is taking a while, FIXME!\n");
post_cache_as_ram(); // BSP switch stack to ram, copy then execute LB.
post_code(0x42); // Should never see this post code.
===================================================================
@@ -132,6 +132,8 @@
//dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
===================================================================
@@ -132,6 +132,8 @@
dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
===================================================================
@@ -132,6 +132,8 @@
dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -452,8 +452,8 @@
u32 tom = pci_read_config32(PCI_DEV(0,2,0), 0x5c);
printk_debug("TOM: 0x%08x\n", tom);
- ram_check(0x00000000, 0x000a0000);
- //ram_check(0x00100000, tom);
+ ram_check(0, 640 * 1024);
+ //ram_check(1024 * 1024, tom);
}
#endif
#endif
===================================================================
@@ -55,6 +55,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
@@ -238,6 +239,8 @@
fill_mem_ctrl(sysinfo->nodes, sysinfo->ctrl, spd_addr);
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
rs690_before_pci_init();
sb600_before_pci_init();
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -369,6 +369,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram(); // bsp swtich stack to ram and copy sysinfo ram now
}
===================================================================
@@ -357,6 +357,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
sis_init_stage2();
post_cache_as_ram(); // bsp swtich stack to ram and copy sysinfo ram now
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -132,6 +132,5 @@
sdram_initialize(1, memctrl); //GX3 OK almost
- /* Check all of memory */
- //ram_check(0x00000000, 640*1024);
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -92,8 +92,7 @@
sdram_initialize(1, memctrl);
- /* Check all of memory */
- ram_check(0x00000000, 640*1024);
+ ram_check(0, 640 * 1024);
/* Switch from Cache as RAM to real RAM */
/* There are two ways we could think about this.
===================================================================
@@ -126,6 +126,8 @@
dump_pci_device(PCI_DEV(0, 0, 0));
#endif
+ ram_check(0, 640 * 1024);
+
/*
#if 0
ram_check(0x00000000, msr.lo+(msr.hi<<32));
===================================================================
@@ -236,6 +236,8 @@
dump_pci_device(PCI_DEV(0, 0, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0
print_err("RAM CHECK!\r\n");
// Check 16MB of memory @ 0
===================================================================
@@ -64,5 +64,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -13,6 +13,7 @@
#include "arch/i386/lib/console.c"
#include "pc80/udelay_io.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
static void main(void)
@@ -25,4 +26,6 @@
//print_pci_devices();
//dump_pci_devices();
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -188,6 +188,5 @@
sdram_initialize(1, memctrl);
- /* Check all of memory */
- //ram_check(0x00000000, 640*1024);
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -188,6 +188,5 @@
sdram_initialize(1, memctrl);
- /* Check all of memory */
- //ram_check(0x00000000, 640*1024);
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -166,12 +166,10 @@
identify_system();
#endif
-#if 0
- // Check 32MB of memory @ 0 (very slow!)
- print_err("Checking memory:\r\n");
+ // Check 640KB of memory @ 0 (very slow!)
ram_check(0x00000000, 0x000a0000);
- ram_check(0x000b0000, 0x02000000);
-#endif
+ // Check 32MB of memory @ 0 (very slow!)
+ // ram_check(0x000b0000, 0x02000000);
TS5300_LED_OFF;
}
===================================================================
@@ -48,6 +48,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
@@ -244,6 +245,8 @@
post_code(0x08);
+ ram_check(0, 640 * 1024);
+
rs690_before_pci_init();
sb600_before_pci_init();
===================================================================
@@ -54,6 +54,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
@@ -235,6 +236,8 @@
fill_mem_ctrl(sysinfo->nodes, sysinfo->ctrl, spd_addr);
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
rs690_before_pci_init();
sb600_before_pci_init();
===================================================================
@@ -142,6 +142,5 @@
msr_init();
- /* Check all of memory */
- //ram_check(0x00000000, 640*1024);
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -61,6 +61,7 @@
#include "cpu/x86/bist.h"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "northbridge/amd/amdk8/debug.c"
#include "cpu/amd/mtrr/amd_earlymtrr.c"
@@ -383,6 +384,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
#if 0
print_pci_devices();
#endif
===================================================================
@@ -126,8 +126,7 @@
sdram_initialize(1, memctrl);
- /* Check memory. */
- /* ram_check(0x00000000, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Memory is setup. Return to cache_as_ram.inc and continue to boot. */
return;
===================================================================
@@ -365,6 +365,9 @@
dump_pci_device_range(PCI_DEV(0, 0x18, 3), 0, 0x200);
*/
+ /* TODO: Check from 0..640KB? Or is this based off of 0x00200000? */
+ ram_check(0x00200000, 0x00200000 + (640 * 1024));
+
// ram_check(0x00200000, 0x00200000 + (640 * 1024));
// ram_check(0x40200000, 0x40200000 + (640 * 1024));
===================================================================
@@ -124,8 +124,7 @@
sdram_initialize(1, memctrl);
- /* Check memory. */
- /* ram_check(0x00000000, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Memory is setup. Return to cache_as_ram.inc and continue to boot. */
return;
===================================================================
@@ -68,5 +68,5 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -57,5 +57,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -119,7 +119,7 @@
sdram_enable(0, memctrl);
/* Check RAM. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* ram_check(130048 * 1024, 131072 * 1024); */
ac97_io_enable();
===================================================================
@@ -52,6 +52,5 @@
/* Initialize RAM. */
sdram_init();
- /* Check RAM. */
- /* ram_check(0x00000000, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -129,7 +129,7 @@
sdram_initialize(1, memctrl);
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Memory is setup. Return to cache_as_ram.inc and continue to boot. */
return;
===================================================================
@@ -57,6 +57,5 @@
/* Initialize RAM. */
sdram_init();
- /* Check RAM. */
- /* ram_check(0x00000000, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -368,6 +368,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -63,5 +63,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -208,8 +208,7 @@
print_debug(" \n");
}*/
- /* Check memory. */
- /* ram_check(0x00000000, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Memory is setup. Return to cache_as_ram.inc and continue to boot */
return;
===================================================================
@@ -172,9 +172,7 @@
sdram_initialize(1, memctrl);
- /* Check memory */
- /* Enable this only if you are having questions. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Switch from Cache as RAM to real RAM.
*
===================================================================
@@ -353,8 +353,9 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram(); // bsp swtich stack to ram and copy sysinfo ram now
-
}
===================================================================
@@ -206,5 +206,7 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -173,6 +173,8 @@
memreset_setup();
sdram_initialize(1, memctrl);
+ ram_check(0, 640 * 1024);
+
#if 0
dump_pci_devices();
#endif
===================================================================
@@ -205,5 +205,7 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -235,5 +235,7 @@
dump_pci_devices();
#endif
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -254,5 +254,7 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -251,5 +251,7 @@
dump_pci_devices();
#endif
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -208,6 +208,8 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -219,5 +219,7 @@
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -203,6 +203,7 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
-
}
===================================================================
@@ -243,6 +243,7 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
-
}
===================================================================
@@ -228,6 +228,8 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
#if 0
dump_pci_devices();
#endif
===================================================================
@@ -286,6 +286,8 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
#endif
===================================================================
@@ -373,6 +373,9 @@
raminit_amdmct(sysinfo);
post_code(0x41);
+ /* FIXME: Correct location for this function call? */
+ ram_check(0, 640 * 1024);
+
printk_debug("\n*** Yes, the copy/decompress is taking a while, FIXME!\n");
post_cache_as_ram(); // BSP switch stack to ram, copy then execute LB.
post_code(0x43); // Should never see this post code.
===================================================================
@@ -43,5 +43,6 @@
report_bist_failure(bist);
cs5530_enable_rom();
sdram_init();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -51,6 +51,5 @@
/* Initialize RAM. */
sdram_init();
- /* Check whether RAM works. */
- /* ram_check(0x00000000, 0x4000); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -160,8 +160,7 @@
sdram_initialize(1, memctrl);
- /* Check memory. */
- /* ram_check(0x00000000, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Memory is setup. Return to cache_as_ram.inc and continue to boot. */
return;
===================================================================
@@ -129,7 +129,7 @@
print_debug_hex8(temp);print_debug("\n");
/* Check all of memory */
// ram_check(0, 16384);
- ram_check(0x20000, 0x24000);
-// ram_check(0x00000000, 640*1024);
+// ram_check(0x20000, 0x24000);
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -229,8 +229,7 @@
sdram_initialize(1, memctrl);
- /* Check memory. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
/* Memory is setup. Return to cache_as_ram.inc and continue to boot. */
return;
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -120,6 +120,8 @@
enable_shadow_ram(cx700);
sdram_enable(cx700);
+ ram_check(0, 640 * 1024);
+
#ifdef DEACTIVATE_CAR
print_debug("Deactivating CAR");
#include DEACTIVATE_CAR_FILE
===================================================================
@@ -121,6 +121,8 @@
ddr_ram_setup((const struct mem_controller *)0);
+ ram_check(0, 640 * 1024);
+
/* Check all of memory */
#if 0
ram_check(0x00000000, msr.lo);
===================================================================
@@ -153,7 +153,7 @@
early_mtrr_init();
}
- //ram_check(0, 640 * 1024);
+ ram_check(0, 640 * 1024);
print_spew("Leaving auto.c:main()\r\n");
}
===================================================================
@@ -118,7 +118,7 @@
ddr_ram_setup(&ctrl);
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
print_spew("Leaving auto.c:main()\r\n");
}
===================================================================
@@ -104,6 +104,8 @@
sdram_set_spd_registers((const struct mem_controller *) 0);
sdram_enable(0, (const struct mem_controller *) 0);
+ ram_check(0, 640 * 1024);
+
/* Check all of memory */
#if 0
ram_check(0x00000000, msr.lo);
===================================================================
@@ -80,5 +80,5 @@
ddr_ram_setup(&ctrl);
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -350,7 +350,9 @@
// dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
-#if 1 // temporarily disabled
+ ram_check(0, 640 * 1024);
+
+#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
// ram_check(0x00000000, 0x000a0000);
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -263,6 +263,8 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
#if 0
print_pci_devices();
dump_pci_devices();
===================================================================
@@ -68,5 +68,5 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -68,8 +68,8 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
+ ram_check(0, 640 * 1024); /* DOS-area */
#if 0
- ram_check(0, 640 * 1024); /* DOS-area */
ram_check(0x00100000, 0x00400000); /* 1MB to 4MB */
ram_check(0x00100000, 0x03ffffff); /* 1MB to 64MB- */
ram_check(0x03fff000, 0x04000010); /* Across 64MB boundary */
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -57,6 +57,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
@@ -288,6 +289,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -64,5 +64,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -73,8 +73,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
-
-
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
#include "northbridge/amd/amdk8/debug.c"
@@ -354,6 +353,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
#if 0
print_pci_devices();
#endif
===================================================================
@@ -335,6 +335,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
/* bsp switch stack to RAM and copy sysinfo RAM now. */
post_cache_as_ram();
}
===================================================================
@@ -213,5 +213,7 @@
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -262,5 +262,7 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -43,5 +43,6 @@
report_bist_failure(bist);
cs5530_enable_rom();
sdram_init();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -35,6 +35,8 @@
sdram_init();
+ ram_check(0, 640 * 1024);
+
/* Check all of memory */
#if 0
ram_check(0x00000000, msr.lo);
===================================================================
@@ -237,6 +237,8 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
#if 0
dump_pci_devices();
#endif
===================================================================
@@ -123,7 +123,7 @@
ddr_ram_setup(&ctrl);
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
print_spew("Leaving auto.c:main()\r\n");
}
===================================================================
@@ -54,6 +54,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
@@ -236,6 +237,8 @@
fill_mem_ctrl(sysinfo->nodes, sysinfo->ctrl, spd_addr);
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
rs690_before_pci_init();
sb600_before_pci_init();
===================================================================
@@ -54,6 +54,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
@@ -236,6 +237,8 @@
fill_mem_ctrl(sysinfo->nodes, sysinfo->ctrl, spd_addr);
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
rs690_before_pci_init();
sb600_before_pci_init();
===================================================================
@@ -211,6 +211,8 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -211,6 +211,8 @@
memreset_setup();
sdram_initialize(ARRAY_SIZE(cpu), cpu);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram();
}
===================================================================
@@ -356,6 +356,8 @@
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
+
post_cache_as_ram(); // bsp swtich stack to ram and copy sysinfo ram now
}
===================================================================
@@ -312,8 +312,8 @@
u32 tom = pci_read_config32(PCI_DEV(0,2,0), 0x5c);
printk_debug("TOM: 0x%08x\n", tom);
- ram_check(0x00000000, 0x000a0000);
- //ram_check(0x00100000, tom);
+ ram_check(0, 640 * 1024);
+ //ram_check(1024 * 1024, tom);
}
#endif
#endif
===================================================================
@@ -123,5 +123,6 @@
/* dump_pci_device(PCI_DEV(0, 0x00, 0)); */
/* dump_bar14(PCI_DEV(0, 0x00, 0)); */
- ram_check(0, 1024 * 1024);
+ ram_check(0, 640 * 1024);
+ // ram_check(0, 1024 * 1024);
}
===================================================================
@@ -234,6 +234,8 @@
wrmsr(IA32_PERF_CTL, msr);
}
+ ram_check(0, 640 * 1024);
+
/* Initialize memory */
sdram_initialize(ARRAY_SIZE(mch), mch);
}
===================================================================
@@ -131,6 +131,8 @@
dump_bar14(PCI_DEV(0, 0x00, 0));
#endif
+ ram_check(0, 640 * 1024);
+
#if 0 // temporarily disabled
/* Check the first 1M */
// ram_check(0x00000000, 0x000100000);
===================================================================
@@ -63,5 +63,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -68,5 +68,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -57,6 +57,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
#include "northbridge/amd/amdk8/debug.c"
@@ -304,5 +305,6 @@
enable_smbus();
memreset_setup();
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
post_cache_as_ram();
}
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -71,5 +71,6 @@
sdram_set_registers();
sdram_set_spd_registers();
sdram_enable();
- /* ram_check(0, 640 * 1024); */
+
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -64,6 +64,5 @@
sdram_set_spd_registers();
sdram_enable();
- /* Check RAM. */
- /* ram_check(0, 640 * 1024); */
+ ram_check(0, 640 * 1024);
}
===================================================================
@@ -259,6 +259,8 @@
memreset_setup();
sdram_initialize(nodes, ctrl);
+ ram_check(0, 640 * 1024);
+
#if 0
print_pci_devices();
dump_pci_devices();
===================================================================
@@ -62,6 +62,7 @@
#include "northbridge/amd/amdk8/raminit.h"
#include "cpu/amd/model_fxx/apic_timer.c"
#include "lib/delay.c"
+#include "lib/ramtest.c"
#include "cpu/x86/lapic/boot_cpu.c"
#include "northbridge/amd/amdk8/reset_test.c"
#include "northbridge/amd/amdk8/debug.c"
@@ -254,5 +255,6 @@
enable_smbus();
memreset_setup();
sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
+ ram_check(0, 640 * 1024);
post_cache_as_ram();
}
===================================================================
@@ -1132,3 +1132,9 @@
comment "Leave a hole for PCIe config space in the device allocator"
end
+define CONFIG_RAM_CHECK
+ default 0
+ export always
+ comment "Check RAM after initialization"
+end
+
===================================================================
@@ -136,6 +136,7 @@
void ram_check(unsigned long start, unsigned long stop)
{
+#if RAM_CHECK
/*
* This is much more of a "Is my DRAM properly configured?"
* test than a "Is my DRAM faulty?" test. Not all bits
@@ -157,5 +158,7 @@
#else
print_debug("Done.\r\n");
#endif
+
+#endif
}