|
|
|
@ -673,14 +673,13 @@ static ulong mem_test_alt(vu_long *start, vu_long *end) |
|
|
|
|
* pattern and ~pattern). |
|
|
|
|
*/ |
|
|
|
|
addr = start; |
|
|
|
|
for (j = 0; j < sizeof(bitpattern) / sizeof(bitpattern[0]); |
|
|
|
|
j++) { |
|
|
|
|
for (j = 0; j < sizeof(bitpattern) / sizeof(bitpattern[0]); j++) { |
|
|
|
|
val = bitpattern[j]; |
|
|
|
|
for (; val != 0; val <<= 1) { |
|
|
|
|
*addr = val; |
|
|
|
|
*dummy = ~val; /* clear the test data off the bus */ |
|
|
|
|
readback = *addr; |
|
|
|
|
if(readback != val) { |
|
|
|
|
if (readback != val) { |
|
|
|
|
printf("FAILURE (data line): " |
|
|
|
|
"expected %08lx, actual %08lx\n", |
|
|
|
|
val, readback); |
|
|
|
@ -718,7 +717,7 @@ static ulong mem_test_alt(vu_long *start, vu_long *end) |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Address line test |
|
|
|
|
* |
|
|
|
|
|
|
|
|
|
* Description: Test the address bus wiring in a |
|
|
|
|
* memory region by performing a walking |
|
|
|
|
* 1's test on the relevant bits of the |
|
|
|
@ -728,7 +727,7 @@ static ulong mem_test_alt(vu_long *start, vu_long *end) |
|
|
|
|
* stuck-low, and shorted pins. The base |
|
|
|
|
* address and size of the region are |
|
|
|
|
* selected by the caller. |
|
|
|
|
* |
|
|
|
|
|
|
|
|
|
* Notes: For best results, the selected base |
|
|
|
|
* address should have enough LSB 0's to |
|
|
|
|
* guarantee single address bit changes. |
|
|
|
@ -784,8 +783,9 @@ static ulong mem_test_alt(vu_long *start, vu_long *end) |
|
|
|
|
for (offset = 1; offset < len; offset <<= 1) { |
|
|
|
|
temp = start[offset]; |
|
|
|
|
if ((temp != pattern) && (offset != test_offset)) { |
|
|
|
|
printf("\nFAILURE: Address bit stuck low or shorted @" |
|
|
|
|
" 0x%.8lx: expected 0x%.8lx, actual 0x%.8lx\n", |
|
|
|
|
printf("\nFAILURE: Address bit stuck low or" |
|
|
|
|
" shorted @ 0x%.8lx: expected 0x%.8lx," |
|
|
|
|
" actual 0x%.8lx\n", |
|
|
|
|
(ulong)&start[offset], pattern, temp); |
|
|
|
|
errs++; |
|
|
|
|
if (ctrlc()) { |
|
|
|
|