Patchwork Start unifying ram_check() usage in coreboot

login
register
about
Submitter Uwe Hermann
Date 2009-10-30 22:40:09
Message ID <20091030224009.GG22827@greenwood>
Download mbox | patch
Permalink /patch/522/
State Rejected
Headers show

Comments

Uwe Hermann - 2009-10-30 22:40:09
See patch.

More patches to further improve this stuff are planned, e.g. to check up
to Top-of-memory, and to make it runtime (CMOS) configurable.


Uwe.
Stefan Reinauer - 2009-10-31 08:51:50
Uwe Hermann wrote:
> See patch.
>
> More patches to further improve this stuff are planned, e.g. to check up
> to Top-of-memory, and to make it runtime (CMOS) configurable.
>
>   
NACK

I don't think this should be user visible. In fact I think it should be
dropped from all boards once they are working.

The test is bogus and only capable of finding crude coding errors. So
either you're a developer and know how to put the code there,
or you shouldn't know about it.
Peter Stuge - 2009-10-31 22:55:46
Stefan Reinauer wrote:
> NACK

NAK +1.


> I don't think this should be user visible. In fact I think it
> should be dropped from all boards once they are working.

I agree with this.


> The test is bogus and only capable of finding crude coding errors.
> So either you're a developer and know how to put the code there, or
> you shouldn't know about it.

It's also not very nice to have a library function be conditionally
empty depending on configuration. I think it would be better to move
towards fewer lines of code in cache_as_ram_auto.c, not more.


//Peter

Patch

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>

Index: src/Kconfig
===================================================================
--- src/Kconfig	(Revision 4892)
+++ src/Kconfig	(Arbeitskopie)
@@ -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
Index: src/mainboard/iwill/dk8_htx/cache_as_ram_auto.c
===================================================================
--- src/mainboard/iwill/dk8_htx/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/iwill/dk8_htx/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
Index: src/mainboard/iwill/dk8s2/cache_as_ram_auto.c
===================================================================
--- src/mainboard/iwill/dk8s2/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/iwill/dk8s2/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
Index: src/mainboard/iwill/dk8x/cache_as_ram_auto.c
===================================================================
--- src/mainboard/iwill/dk8x/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/iwill/dk8x/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
Index: src/mainboard/axus/tc320/auto.c
===================================================================
--- src/mainboard/axus/tc320/auto.c	(Revision 4892)
+++ src/mainboard/axus/tc320/auto.c	(Arbeitskopie)
@@ -44,5 +44,6 @@ 
 	report_bist_failure(bist);
 	cs5530_enable_rom();
 	sdram_init();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/bcom/winnetp680/auto.c
===================================================================
--- src/mainboard/bcom/winnetp680/auto.c	(Revision 4892)
+++ src/mainboard/bcom/winnetp680/auto.c	(Arbeitskopie)
@@ -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");
 }
Index: src/mainboard/bcom/winnet100/auto.c
===================================================================
--- src/mainboard/bcom/winnet100/auto.c	(Revision 4892)
+++ src/mainboard/bcom/winnet100/auto.c	(Arbeitskopie)
@@ -51,6 +51,5 @@ 
 	/* Initialize RAM. */
 	sdram_init();
 
-	/* Check whether RAM works. */
-	/* ram_check(0, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/televideo/tc7020/auto.c
===================================================================
--- src/mainboard/televideo/tc7020/auto.c	(Revision 4892)
+++ src/mainboard/televideo/tc7020/auto.c	(Arbeitskopie)
@@ -51,6 +51,5 @@ 
 	/* Initialize RAM. */
 	sdram_init();
 
-	/* Check whether RAM works. */
-	/* ram_check(0, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/broadcom/blast/cache_as_ram_auto.c
===================================================================
--- src/mainboard/broadcom/blast/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/broadcom/blast/cache_as_ram_auto.c	(Arbeitskopie)
@@ -254,6 +254,8 @@ 
 
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 #if 0
         print_pci_devices();
 #endif
Index: src/mainboard/thomson/ip1000/auto.c
===================================================================
--- src/mainboard/thomson/ip1000/auto.c	(Revision 4892)
+++ src/mainboard/thomson/ip1000/auto.c	(Arbeitskopie)
@@ -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();
Index: src/mainboard/supermicro/x6dai_g/auto.c
===================================================================
--- src/mainboard/supermicro/x6dai_g/auto.c	(Revision 4892)
+++ src/mainboard/supermicro/x6dai_g/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/supermicro/h8dmr/cache_as_ram_auto.c
===================================================================
--- src/mainboard/supermicro/h8dmr/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/supermicro/h8dmr/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
 
 }
Index: src/mainboard/supermicro/x6dhe_g/auto.c
===================================================================
--- src/mainboard/supermicro/x6dhe_g/auto.c	(Revision 4892)
+++ src/mainboard/supermicro/x6dhe_g/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/supermicro/h8dme/cache_as_ram_auto.c
===================================================================
--- src/mainboard/supermicro/h8dme/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/supermicro/h8dme/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
 
 }
Index: src/mainboard/supermicro/h8dmr_fam10/cache_as_ram_auto.c
===================================================================
--- src/mainboard/supermicro/h8dmr_fam10/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/supermicro/h8dmr_fam10/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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.
Index: src/mainboard/supermicro/x6dhe_g2/auto.c
===================================================================
--- src/mainboard/supermicro/x6dhe_g2/auto.c	(Revision 4892)
+++ src/mainboard/supermicro/x6dhe_g2/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/supermicro/x6dhr_ig/auto.c
===================================================================
--- src/mainboard/supermicro/x6dhr_ig/auto.c	(Revision 4892)
+++ src/mainboard/supermicro/x6dhr_ig/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/supermicro/x6dhr_ig2/auto.c
===================================================================
--- src/mainboard/supermicro/x6dhr_ig2/auto.c	(Revision 4892)
+++ src/mainboard/supermicro/x6dhr_ig2/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/soyo/sy-6ba-plus-iii/auto.c
===================================================================
--- src/mainboard/soyo/sy-6ba-plus-iii/auto.c	(Revision 4892)
+++ src/mainboard/soyo/sy-6ba-plus-iii/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/kontron/986lcd-m/auto.c
===================================================================
--- src/mainboard/kontron/986lcd-m/auto.c	(Revision 4892)
+++ src/mainboard/kontron/986lcd-m/auto.c	(Arbeitskopie)
@@ -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
Index: src/mainboard/kontron/kt690/cache_as_ram_auto.c
===================================================================
--- src/mainboard/kontron/kt690/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/kontron/kt690/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 
Index: src/mainboard/a-trend/atc-6240/auto.c
===================================================================
--- src/mainboard/a-trend/atc-6240/auto.c	(Revision 4892)
+++ src/mainboard/a-trend/atc-6240/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/a-trend/atc-6220/auto.c
===================================================================
--- src/mainboard/a-trend/atc-6220/auto.c	(Revision 4892)
+++ src/mainboard/a-trend/atc-6220/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/gigabyte/m57sli/cache_as_ram_auto.c
===================================================================
--- src/mainboard/gigabyte/m57sli/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/gigabyte/m57sli/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
 
 }
Index: src/mainboard/gigabyte/ga_2761gxdk/cache_as_ram_auto.c
===================================================================
--- src/mainboard/gigabyte/ga_2761gxdk/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/gigabyte/ga_2761gxdk/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
 
Index: src/mainboard/gigabyte/ga-6bxc/auto.c
===================================================================
--- src/mainboard/gigabyte/ga-6bxc/auto.c	(Revision 4892)
+++ src/mainboard/gigabyte/ga-6bxc/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/digitallogic/msm800sev/auto.c
===================================================================
--- src/mainboard/digitallogic/msm800sev/auto.c	(Revision 4892)
+++ src/mainboard/digitallogic/msm800sev/auto.c	(Arbeitskopie)
@@ -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);
 }
Index: src/mainboard/digitallogic/msm800sev/cache_as_ram_auto.c
===================================================================
--- src/mainboard/digitallogic/msm800sev/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/digitallogic/msm800sev/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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.
Index: src/mainboard/digitallogic/adl855pc/auto.c
===================================================================
--- src/mainboard/digitallogic/adl855pc/auto.c	(Revision 4892)
+++ src/mainboard/digitallogic/adl855pc/auto.c	(Arbeitskopie)
@@ -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));
Index: src/mainboard/digitallogic/msm586seg/auto.c
===================================================================
--- src/mainboard/digitallogic/msm586seg/auto.c	(Revision 4892)
+++ src/mainboard/digitallogic/msm586seg/auto.c	(Arbeitskopie)
@@ -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
Index: src/mainboard/mitac/6513wu/auto.c
===================================================================
--- src/mainboard/mitac/6513wu/auto.c	(Revision 4892)
+++ src/mainboard/mitac/6513wu/auto.c	(Arbeitskopie)
@@ -64,5 +64,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/emulation/qemu-x86/auto.c
===================================================================
--- src/mainboard/emulation/qemu-x86/auto.c	(Revision 4892)
+++ src/mainboard/emulation/qemu-x86/auto.c	(Arbeitskopie)
@@ -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);
 }
Index: src/mainboard/olpc/btest/auto.c
===================================================================
--- src/mainboard/olpc/btest/auto.c	(Revision 4892)
+++ src/mainboard/olpc/btest/auto.c	(Arbeitskopie)
@@ -188,6 +188,5 @@ 
 	
 	sdram_initialize(1, memctrl);
 	
-	/* Check all of memory */
-	//ram_check(0x00000000, 640*1024);
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/olpc/rev_a/auto.c
===================================================================
--- src/mainboard/olpc/rev_a/auto.c	(Revision 4892)
+++ src/mainboard/olpc/rev_a/auto.c	(Arbeitskopie)
@@ -188,6 +188,5 @@ 
 	
 	sdram_initialize(1, memctrl);
 	
-	/* Check all of memory */
-	//ram_check(0x00000000, 640*1024);
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/technologic/ts5300/auto.c
===================================================================
--- src/mainboard/technologic/ts5300/auto.c	(Revision 4892)
+++ src/mainboard/technologic/ts5300/auto.c	(Arbeitskopie)
@@ -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;
 }
Index: src/mainboard/amd/pistachio/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/pistachio/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/amd/pistachio/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 
Index: src/mainboard/amd/dbm690t/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/dbm690t/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/amd/dbm690t/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 
Index: src/mainboard/amd/rumba/auto.c
===================================================================
--- src/mainboard/amd/rumba/auto.c	(Revision 4892)
+++ src/mainboard/amd/rumba/auto.c	(Arbeitskopie)
@@ -142,6 +142,5 @@ 
 
 	msr_init();
 
-	/* Check all of memory */
-	//ram_check(0x00000000, 640*1024);
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/amd/serengeti_cheetah/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/serengeti_cheetah/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/amd/serengeti_cheetah/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
Index: src/mainboard/amd/norwich/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/norwich/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/amd/norwich/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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;
Index: src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/amd/serengeti_cheetah_fam10/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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));
 
Index: src/mainboard/amd/db800/cache_as_ram_auto.c
===================================================================
--- src/mainboard/amd/db800/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/amd/db800/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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;
Index: src/mainboard/biostar/m6tba/auto.c
===================================================================
--- src/mainboard/biostar/m6tba/auto.c	(Revision 4892)
+++ src/mainboard/biostar/m6tba/auto.c	(Arbeitskopie)
@@ -68,5 +68,5 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/nec/powermate2000/auto.c
===================================================================
--- src/mainboard/nec/powermate2000/auto.c	(Revision 4892)
+++ src/mainboard/nec/powermate2000/auto.c	(Arbeitskopie)
@@ -57,5 +57,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/azza/pt-6ibd/auto.c
===================================================================
--- src/mainboard/azza/pt-6ibd/auto.c	(Revision 4892)
+++ src/mainboard/azza/pt-6ibd/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/rca/rm4100/auto.c
===================================================================
--- src/mainboard/rca/rm4100/auto.c	(Revision 4892)
+++ src/mainboard/rca/rm4100/auto.c	(Arbeitskopie)
@@ -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();
Index: src/mainboard/iei/nova4899r/auto.c
===================================================================
--- src/mainboard/iei/nova4899r/auto.c	(Revision 4892)
+++ src/mainboard/iei/nova4899r/auto.c	(Arbeitskopie)
@@ -52,6 +52,5 @@ 
 	/* Initialize RAM. */
 	sdram_init();
 
-	/* Check RAM. */
-	/* ram_check(0x00000000, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/iei/pcisa-lx-800-r10/cache_as_ram_auto.c
===================================================================
--- src/mainboard/iei/pcisa-lx-800-r10/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/iei/pcisa-lx-800-r10/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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;
Index: src/mainboard/iei/juki-511p/auto.c
===================================================================
--- src/mainboard/iei/juki-511p/auto.c	(Revision 4892)
+++ src/mainboard/iei/juki-511p/auto.c	(Arbeitskopie)
@@ -57,6 +57,5 @@ 
 	/* Initialize RAM. */
 	sdram_init();
 
-	/* Check RAM. */
-	/* ram_check(0x00000000, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/hp/dl145_g3/cache_as_ram_auto.c
===================================================================
--- src/mainboard/hp/dl145_g3/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/hp/dl145_g3/cache_as_ram_auto.c	(Arbeitskopie)
@@ -368,6 +368,8 @@ 
 
 	sdram_initialize(sysinfo->nodes, sysinfo->ctrl, sysinfo);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 
 }
Index: src/mainboard/hp/e_vectra_p2706t/auto.c
===================================================================
--- src/mainboard/hp/e_vectra_p2706t/auto.c	(Revision 4892)
+++ src/mainboard/hp/e_vectra_p2706t/auto.c	(Arbeitskopie)
@@ -63,5 +63,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/artecgroup/dbe61/cache_as_ram_auto.c
===================================================================
--- src/mainboard/artecgroup/dbe61/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/artecgroup/dbe61/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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;
Index: src/mainboard/pcengines/alix1c/cache_as_ram_auto.c
===================================================================
--- src/mainboard/pcengines/alix1c/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/pcengines/alix1c/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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.
 	 *
Index: src/mainboard/tyan/s2912/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2912/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2912/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
-
 }
 
 
Index: src/mainboard/tyan/s2850/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2850/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2850/cache_as_ram_auto.c	(Arbeitskopie)
@@ -206,5 +206,7 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/tyan/s2735/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2735/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2735/cache_as_ram_auto.c	(Arbeitskopie)
@@ -173,6 +173,8 @@ 
 	memreset_setup();
 	sdram_initialize(1, memctrl);
 
+	ram_check(0, 640 * 1024);
+
 #if 0
 	dump_pci_devices();
 #endif
Index: src/mainboard/tyan/s2880/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2880/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2880/cache_as_ram_auto.c	(Arbeitskopie)
@@ -205,5 +205,7 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/tyan/s2881/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2881/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2881/cache_as_ram_auto.c	(Arbeitskopie)
@@ -235,5 +235,7 @@ 
 	dump_pci_devices();
 #endif
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/tyan/s1846/auto.c
===================================================================
--- src/mainboard/tyan/s1846/auto.c	(Revision 4892)
+++ src/mainboard/tyan/s1846/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/tyan/s4880/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s4880/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s4880/cache_as_ram_auto.c	(Arbeitskopie)
@@ -254,5 +254,7 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/tyan/s2891/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2891/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2891/cache_as_ram_auto.c	(Arbeitskopie)
@@ -251,5 +251,7 @@ 
 	dump_pci_devices();
 #endif
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/tyan/s2882/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2882/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2882/cache_as_ram_auto.c	(Arbeitskopie)
@@ -208,6 +208,8 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 
 }
Index: src/mainboard/tyan/s2892/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2892/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2892/cache_as_ram_auto.c	(Arbeitskopie)
@@ -219,5 +219,7 @@ 
 
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/tyan/s2875/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2875/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2875/cache_as_ram_auto.c	(Arbeitskopie)
@@ -203,6 +203,7 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
-
 }
Index: src/mainboard/tyan/s4882/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s4882/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s4882/cache_as_ram_auto.c	(Arbeitskopie)
@@ -243,6 +243,7 @@ 
 	memreset_setup();
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
-
 }
Index: src/mainboard/tyan/s2885/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2885/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2885/cache_as_ram_auto.c	(Arbeitskopie)
@@ -228,6 +228,8 @@ 
         memreset_setup();
         sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 #if 0
 	dump_pci_devices();
 #endif
Index: src/mainboard/tyan/s2895/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2895/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2895/cache_as_ram_auto.c	(Arbeitskopie)
@@ -286,6 +286,8 @@ 
 	memreset_setup();
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
 #endif
Index: src/mainboard/tyan/s2912_fam10/cache_as_ram_auto.c
===================================================================
--- src/mainboard/tyan/s2912_fam10/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/tyan/s2912_fam10/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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.
Index: src/mainboard/asi/mb_5blgp/auto.c
===================================================================
--- src/mainboard/asi/mb_5blgp/auto.c	(Revision 4892)
+++ src/mainboard/asi/mb_5blgp/auto.c	(Arbeitskopie)
@@ -43,5 +43,6 @@ 
 	report_bist_failure(bist);
 	cs5530_enable_rom();
 	sdram_init();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asi/mb_5blmp/auto.c
===================================================================
--- src/mainboard/asi/mb_5blmp/auto.c	(Revision 4892)
+++ src/mainboard/asi/mb_5blmp/auto.c	(Arbeitskopie)
@@ -51,6 +51,5 @@ 
 	/* Initialize RAM. */
 	sdram_init();
 
-	/* Check whether RAM works. */
-	/* ram_check(0x00000000, 0x4000); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/lippert/roadrunner-lx/cache_as_ram_auto.c
===================================================================
--- src/mainboard/lippert/roadrunner-lx/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/lippert/roadrunner-lx/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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;
Index: src/mainboard/lippert/frontrunner/auto.c
===================================================================
--- src/mainboard/lippert/frontrunner/auto.c	(Revision 4892)
+++ src/mainboard/lippert/frontrunner/auto.c	(Arbeitskopie)
@@ -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);
 
 }
Index: src/mainboard/lippert/spacerunner-lx/cache_as_ram_auto.c
===================================================================
--- src/mainboard/lippert/spacerunner-lx/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/lippert/spacerunner-lx/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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;
Index: src/mainboard/abit/be6-ii_v2_0/auto.c
===================================================================
--- src/mainboard/abit/be6-ii_v2_0/auto.c	(Revision 4892)
+++ src/mainboard/abit/be6-ii_v2_0/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/via/vt8454c/auto.c
===================================================================
--- src/mainboard/via/vt8454c/auto.c	(Revision 4892)
+++ src/mainboard/via/vt8454c/auto.c	(Arbeitskopie)
@@ -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
Index: src/mainboard/via/epia-m/auto.c
===================================================================
--- src/mainboard/via/epia-m/auto.c	(Revision 4892)
+++ src/mainboard/via/epia-m/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/via/epia-n/auto.c
===================================================================
--- src/mainboard/via/epia-n/auto.c	(Revision 4892)
+++ src/mainboard/via/epia-n/auto.c	(Arbeitskopie)
@@ -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");
 }
Index: src/mainboard/via/epia-cn/auto.c
===================================================================
--- src/mainboard/via/epia-cn/auto.c	(Revision 4892)
+++ src/mainboard/via/epia-cn/auto.c	(Arbeitskopie)
@@ -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");
 }
Index: src/mainboard/via/epia/auto.c
===================================================================
--- src/mainboard/via/epia/auto.c	(Revision 4892)
+++ src/mainboard/via/epia/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/via/pc2500e/auto.c
===================================================================
--- src/mainboard/via/pc2500e/auto.c	(Revision 4892)
+++ src/mainboard/via/pc2500e/auto.c	(Arbeitskopie)
@@ -80,5 +80,5 @@ 
 
 	ddr_ram_setup(&ctrl);
 
-	/* ram_check(0, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/dell/s1850/auto.c
===================================================================
--- src/mainboard/dell/s1850/auto.c	(Revision 4892)
+++ src/mainboard/dell/s1850/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/compaq/deskpro_en_sff_p600/auto.c
===================================================================
--- src/mainboard/compaq/deskpro_en_sff_p600/auto.c	(Revision 4892)
+++ src/mainboard/compaq/deskpro_en_sff_p600/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/msi/ms7135/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms7135/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/msi/ms7135/cache_as_ram_auto.c	(Arbeitskopie)
@@ -263,6 +263,8 @@ 
 	memreset_setup();
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 #if 0
 	print_pci_devices();
 	dump_pci_devices();
Index: src/mainboard/msi/ms6119/auto.c
===================================================================
--- src/mainboard/msi/ms6119/auto.c	(Revision 4892)
+++ src/mainboard/msi/ms6119/auto.c	(Arbeitskopie)
@@ -68,5 +68,5 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/msi/ms6147/auto.c
===================================================================
--- src/mainboard/msi/ms6147/auto.c	(Revision 4892)
+++ src/mainboard/msi/ms6147/auto.c	(Arbeitskopie)
@@ -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 */
Index: src/mainboard/msi/ms6156/auto.c
===================================================================
--- src/mainboard/msi/ms6156/auto.c	(Revision 4892)
+++ src/mainboard/msi/ms6156/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/msi/ms9282/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms9282/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/msi/ms9282/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 
 }
Index: src/mainboard/msi/ms6178/auto.c
===================================================================
--- src/mainboard/msi/ms6178/auto.c	(Revision 4892)
+++ src/mainboard/msi/ms6178/auto.c	(Arbeitskopie)
@@ -64,5 +64,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/msi/ms9185/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms9185/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/msi/ms9185/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
Index: src/mainboard/msi/ms7260/cache_as_ram_auto.c
===================================================================
--- src/mainboard/msi/ms7260/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/msi/ms7260/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 }
Index: src/mainboard/arima/hdama/cache_as_ram_auto.c
===================================================================
--- src/mainboard/arima/hdama/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/arima/hdama/cache_as_ram_auto.c	(Arbeitskopie)
@@ -213,5 +213,7 @@ 
 
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/sunw/ultra40/cache_as_ram_auto.c
===================================================================
--- src/mainboard/sunw/ultra40/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/sunw/ultra40/cache_as_ram_auto.c	(Arbeitskopie)
@@ -262,5 +262,7 @@ 
 	memreset_setup();
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 }
Index: src/mainboard/advantech/pcm-5820/auto.c
===================================================================
--- src/mainboard/advantech/pcm-5820/auto.c	(Revision 4892)
+++ src/mainboard/advantech/pcm-5820/auto.c	(Arbeitskopie)
@@ -43,5 +43,6 @@ 
 	report_bist_failure(bist);
 	cs5530_enable_rom();
 	sdram_init();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/eaglelion/5bcm/auto.c
===================================================================
--- src/mainboard/eaglelion/5bcm/auto.c	(Revision 4892)
+++ src/mainboard/eaglelion/5bcm/auto.c	(Arbeitskopie)
@@ -35,6 +35,8 @@ 
 
 	sdram_init();
 	
+	ram_check(0, 640 * 1024);
+
 	/* Check all of memory */
 #if 0
 	ram_check(0x00000000, msr.lo);
Index: src/mainboard/newisys/khepri/cache_as_ram_auto.c
===================================================================
--- src/mainboard/newisys/khepri/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/newisys/khepri/cache_as_ram_auto.c	(Arbeitskopie)
@@ -237,6 +237,8 @@ 
         memreset_setup();
         sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 #if 0
 	dump_pci_devices();
 #endif
Index: src/mainboard/jetway/j7f24/auto.c
===================================================================
--- src/mainboard/jetway/j7f24/auto.c	(Revision 4892)
+++ src/mainboard/jetway/j7f24/auto.c	(Arbeitskopie)
@@ -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");
 }
Index: src/mainboard/technexion/tim8690/cache_as_ram_auto.c
===================================================================
--- src/mainboard/technexion/tim8690/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/technexion/tim8690/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 
Index: src/mainboard/technexion/tim5690/cache_as_ram_auto.c
===================================================================
--- src/mainboard/technexion/tim5690/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/technexion/tim5690/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 
Index: src/mainboard/ibm/e326/cache_as_ram_auto.c
===================================================================
--- src/mainboard/ibm/e326/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/ibm/e326/cache_as_ram_auto.c	(Arbeitskopie)
@@ -211,6 +211,8 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 
 }
Index: src/mainboard/ibm/e325/cache_as_ram_auto.c
===================================================================
--- src/mainboard/ibm/e325/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/ibm/e325/cache_as_ram_auto.c	(Arbeitskopie)
@@ -211,6 +211,8 @@ 
 	memreset_setup();
 	sdram_initialize(ARRAY_SIZE(cpu), cpu);
 
+	ram_check(0, 640 * 1024);
+
 	post_cache_as_ram();
 
 }
Index: src/mainboard/nvidia/l1_2pvv/cache_as_ram_auto.c
===================================================================
--- src/mainboard/nvidia/l1_2pvv/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/nvidia/l1_2pvv/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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
 
 }
Index: src/mainboard/intel/d945gclf/auto.c
===================================================================
--- src/mainboard/intel/d945gclf/auto.c	(Revision 4892)
+++ src/mainboard/intel/d945gclf/auto.c	(Arbeitskopie)
@@ -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
Index: src/mainboard/intel/mtarvon/auto.c
===================================================================
--- src/mainboard/intel/mtarvon/auto.c	(Revision 4892)
+++ src/mainboard/intel/mtarvon/auto.c	(Arbeitskopie)
@@ -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);
 }
Index: src/mainboard/intel/eagleheights/auto.c
===================================================================
--- src/mainboard/intel/eagleheights/auto.c	(Revision 4892)
+++ src/mainboard/intel/eagleheights/auto.c	(Arbeitskopie)
@@ -234,6 +234,8 @@ 
 		wrmsr(IA32_PERF_CTL, msr);
 	}
 
+	ram_check(0, 640 * 1024);
+
 	/* Initialize memory */
 	sdram_initialize(ARRAY_SIZE(mch), mch);
 }
Index: src/mainboard/intel/jarrell/auto.c
===================================================================
--- src/mainboard/intel/jarrell/auto.c	(Revision 4892)
+++ src/mainboard/intel/jarrell/auto.c	(Arbeitskopie)
@@ -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);
Index: src/mainboard/asus/mew-am/auto.c
===================================================================
--- src/mainboard/asus/mew-am/auto.c	(Revision 4892)
+++ src/mainboard/asus/mew-am/auto.c	(Arbeitskopie)
@@ -63,5 +63,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/p2b/auto.c
===================================================================
--- src/mainboard/asus/p2b/auto.c	(Revision 4892)
+++ src/mainboard/asus/p2b/auto.c	(Arbeitskopie)
@@ -68,5 +68,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/p2b-d/auto.c
===================================================================
--- src/mainboard/asus/p2b-d/auto.c	(Revision 4892)
+++ src/mainboard/asus/p2b-d/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/p2b-f/auto.c
===================================================================
--- src/mainboard/asus/p2b-f/auto.c	(Revision 4892)
+++ src/mainboard/asus/p2b-f/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/a8v-e_se/cache_as_ram_auto.c
===================================================================
--- src/mainboard/asus/a8v-e_se/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/asus/a8v-e_se/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 }
Index: src/mainboard/asus/p2b-ds/auto.c
===================================================================
--- src/mainboard/asus/p2b-ds/auto.c	(Revision 4892)
+++ src/mainboard/asus/p2b-ds/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/p3b-f/auto.c
===================================================================
--- src/mainboard/asus/p3b-f/auto.c	(Revision 4892)
+++ src/mainboard/asus/p3b-f/auto.c	(Arbeitskopie)
@@ -71,5 +71,6 @@ 
 	sdram_set_registers();
 	sdram_set_spd_registers();
 	sdram_enable();
-	/* ram_check(0, 640 * 1024); */
+
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/mew-vm/auto.c
===================================================================
--- src/mainboard/asus/mew-vm/auto.c	(Revision 4892)
+++ src/mainboard/asus/mew-vm/auto.c	(Arbeitskopie)
@@ -64,6 +64,5 @@ 
 	sdram_set_spd_registers();
 	sdram_enable();
 
-	/* Check RAM. */
-	/* ram_check(0, 640 * 1024); */
+	ram_check(0, 640 * 1024);
 }
Index: src/mainboard/asus/a8n_e/cache_as_ram_auto.c
===================================================================
--- src/mainboard/asus/a8n_e/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/asus/a8n_e/cache_as_ram_auto.c	(Arbeitskopie)
@@ -259,6 +259,8 @@ 
 	memreset_setup();
 	sdram_initialize(nodes, ctrl);
 
+	ram_check(0, 640 * 1024);
+
 #if 0
 	print_pci_devices();
 	dump_pci_devices();
Index: src/mainboard/asus/m2v-mx_se/cache_as_ram_auto.c
===================================================================
--- src/mainboard/asus/m2v-mx_se/cache_as_ram_auto.c	(Revision 4892)
+++ src/mainboard/asus/m2v-mx_se/cache_as_ram_auto.c	(Arbeitskopie)
@@ -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();
 }
Index: src/config/Options.lb
===================================================================
--- src/config/Options.lb	(Revision 4892)
+++ src/config/Options.lb	(Arbeitskopie)
@@ -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
+
Index: src/lib/ramtest.c
===================================================================
--- src/lib/ramtest.c	(Revision 4892)
+++ src/lib/ramtest.c	(Arbeitskopie)
@@ -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
 }