1 static void write_phys(unsigned long addr, unsigned long value)
8 static unsigned long read_phys(unsigned long addr)
15 void ram_fill(unsigned long start, unsigned long stop)
21 print_debug("DRAM fill: ");
22 print_debug_hex32(start);
24 print_debug_hex32(stop);
26 for(addr = start; addr < stop ; addr += 4) {
27 /* Display address being filled */
28 if ((addr & 0xffff) == 0) {
29 print_debug_hex32(addr);
32 write_phys(addr, addr);
34 /* Display final address */
35 print_debug_hex32(addr);
36 print_debug("\r\nDRAM filled\r\n");
39 void ram_verify(unsigned long start, unsigned long stop)
45 print_debug("DRAM verify: ");
46 print_debug_hex32(start);
47 print_debug_char('-');
48 print_debug_hex32(stop);
50 for(addr = start; addr < stop ; addr += 4) {
52 /* Display address being tested */
53 if ((addr & 0xffff) == 0) {
54 print_debug_hex32(addr);
57 value = read_phys(addr);
59 /* Display address with error */
60 print_err_hex32(addr);
62 print_err_hex32(value);
66 /* Display final address */
67 print_debug_hex32(addr);
68 print_debug("\r\nDRAM verified\r\n");
72 void ramcheck(unsigned long start, unsigned long stop)
76 * This is much more of a "Is my DRAM properly configured?"
77 * test than a "Is my DRAM faulty?" test. Not all bits
80 print_debug("Testing DRAM : ");
81 print_debug_hex32(start);
83 print_debug_hex32(stop);
85 ram_fill(start, stop);
86 ram_verify(start, stop);
87 print_debug("Done.\n");