Author: wmb Date: Thu Aug 18 22:38:29 2011 New Revision: 2466 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2466
Log: OLPC XO-1.5 - Changed the formatting of "test /memory" output to conform to the more-compact format used for XO-1.75. Also turned off the newly-added random-test so the test takes the same amount of time as before.
Modified: cpu/x86/memtest.fth cpu/x86/pc/olpc/via/probemem.fth ofw/fcode/memtest.fth
Modified: cpu/x86/memtest.fth ============================================================================== --- cpu/x86/memtest.fth Thu Aug 18 03:20:23 2011 (r2465) +++ cpu/x86/memtest.fth Thu Aug 18 22:38:29 2011 (r2466) @@ -13,7 +13,7 @@ ' type to show-status
: bits-run ( adr len pattern -- fail? ) - dup .x ." pattern ... " + " " show-status dup .x ." pattern " 3dup lfill ( adr len pattern ) 3dup lskip ( adr len pattern residue ) dup if ( adr len pattern residue ) @@ -22,12 +22,11 @@ dup l@ .x ." at " .x cr ( ) true else ( adr len pattern residue ) - ." passed" cr ( adr len pattern residue ) + ." passed" ( adr len pattern residue ) 4drop false then ; : mem-bits-test ( membase memsize -- fail-status ) - " Data bits test" show-status 2dup h# aaaaaaaa bits-run if true exit then h# 55555555 bits-run ; @@ -63,7 +62,7 @@ ." FAILED - got " .x ." at " .x cr true else - ." passed" cr + ." passed" false then ; @@ -283,4 +282,4 @@ \ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION \ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ -\ LICENSE_END \ No newline at end of file +\ LICENSE_END
Modified: cpu/x86/pc/olpc/via/probemem.fth ============================================================================== --- cpu/x86/pc/olpc/via/probemem.fth Thu Aug 18 03:20:23 2011 (r2465) +++ cpu/x86/pc/olpc/via/probemem.fth Thu Aug 18 22:38:29 2011 (r2466) @@ -78,19 +78,34 @@ [ifndef] 8u.h : 8u.h ( n -- ) push-hex (.8) type pop-base ; [then] -: .chunk ( adr len -- ) ." Testing memory at: " swap 8u.h ." size " 8u.h cr ; +: .chunk ( adr len -- ) ." Testing address 0x" swap 8u.h ." length 0x" 8u.h cr ; + defer test-s3 ( -- error? ) ' false is test-s3 +false to do-random-test? \ The random test takes a long time + +: show-line ( adr len -- ) (cr type 3 spaces kill-line ; +' show-line to show-status + : selftest ( -- error? ) - " available" get-my-property if ." No available property" cr true exit then + " available" get-my-property if ( ) + ." No available property in memory node" cr ( ) + true exit ( -- true ) + then ( adr len ) ( adr len ) - begin ?dup while + begin dup while ( rem$ ) 2 decode-ints swap ( rem$ chunk$ ) 2dup .chunk ( rem$ chunk$ ) \ We maintain a 1-1 convenience mapping so explicit mapping is unnecessary - memory-test-suite if 2drop true exit then ( rem$ ) - repeat drop + memory-test-suite if ( rem$ ) + 2drop ( ) + " !!Failed!!" show-status cr ( ) + true exit ( -- true ) + else ( rem$ ) + " Succeeded" show-status cr ( rem$ ) + then ( rem$ ) + repeat 2drop ( )
- test-s3 + test-s3 ( ) ;
device-end
Modified: ofw/fcode/memtest.fth ============================================================================== --- ofw/fcode/memtest.fth Thu Aug 18 03:20:23 2011 (r2465) +++ ofw/fcode/memtest.fth Thu Aug 18 22:38:29 2011 (r2466) @@ -398,6 +398,7 @@ then ; headers +true value do-random-test? : memory-test-suite ( membase memsize -- status ) suite-failed off
@@ -410,7 +411,9 @@ \ Don't do the mats test, because I'm not convinced that it is useful \ 2dup h# a5a5a5a5 mats-test ?suite-failed ( membase memsize ) [ifdef] random-test - 2dup random-test ?suite-failed ( membase memsize ) + do-random-test? if + 2dup random-test ?suite-failed ( membase memsize ) + then [then] then ( membase memsize ) 2drop
openfirmware@openfirmware.info