Lines Matching +full:local +full:- +full:bd +full:- +full:address
1 // SPDX-License-Identifier: GPL-2.0+
13 * broken, nothing else will work properly. Then test the address
15 * program knows that the address and data lines work properly.
18 * o For the address line test, it is a good idea to use the base
19 * address of the lowest memory location, which causes a '1' bit to
20 * walk through a field of zeros on the address lines and the highest
22 * '1's on the address line.
35 * o Always read the target location EXACTLY ONCE and save it in a local
44 * ---------------
70 * written to a different address in case the data lines are floating.
76 * Address line test:
77 * ------------------
78 * This function performs a test to verify that all the address lines
79 * hooked up to the RAM work properly. If there is an address line
80 * fault, it usually shows up as two different locations in the address
81 * map (related by the faulty address line) mapping to one physical
85 * To test all address lines, we start with the given base address and
86 * xor the address with a '1' bit to flip one address line. For each
87 * test, we shift the '1' bit left to test the next address line.
89 * In the actual code, we start with address sizeof(ulong) since our
91 * order address bits, it wouldn't work because our pattern would
94 * Example for a 4 bit address space with the base at 0000:
95 * 0000 <- base
96 * 0001 <- test 1
97 * 0010 <- test 2
98 * 0100 <- test 3
99 * 1000 <- test 4
100 * Example for a 4 bit address space with the base at 0010:
101 * 0010 <- base
102 * 0011 <- test 1
103 * 0000 <- (below the base address, skipped)
104 * 0110 <- test 2
105 * 1010 <- test 3
108 * not "mirrored" onto the base address due to a faulty address line.
109 * Note that the base and each test location are related by one address
110 * line flipped. Note that the base address need not be all zeros.
112 * Memory tests 1-4:
113 * -----------------
124 * 2) bit-flip pattern ((1 << (offset % 32))
125 * 3) address pattern (offset)
126 * 4) address pattern (~offset)
130 * RAM the following areas are verified: 0x00000000-0x00000800,
131 * 0x000ff800-0x00100800, 0x001ff800-0x00200800, ..., 0x03fff800-
132 * 0x04000000. If the test is run in slow-test mode, it verifies
155 #warning "Injecting address line errors for testing purposes"
215 move64(&otherpattern, pmem--); in memory_post_dataline()
232 ret = -1; in memory_post_dataline()
260 post_log("Memory (address line) error at %08x<->%08x, " in memory_post_addrline()
263 ret = -1; in memory_post_addrline()
292 ret = -1; in memory_post_test1()
322 ret = -1; in memory_post_test2()
352 ret = -1; in memory_post_test3()
382 ret = -1; in memory_post_test4()
403 ret = memory_post_addrline((ulong *)(start+size-8), in memory_post_test_lines()
472 bd_t *bd = gd->bd; in arch_memory_test_prepare() local
475 *size = (gd->ram_size >= 256 << 20 ? in arch_memory_test_prepare()
476 256 << 20 : gd->ram_size) - (1 << 20); in arch_memory_test_prepare()
479 if ((*vstart) + (*size) > (ulong)bd) in arch_memory_test_prepare()
480 *size = (ulong)bd - *vstart; in arch_memory_test_prepare()