Author: wmb Date: 2009-08-28 22:07:46 +0200 (Fri, 28 Aug 2009) New Revision: 1333
Modified: cpu/x86/pc/biosints.fth cpu/x86/pc/olpc/acpi.fth cpu/x86/pc/olpc/copynand.fth cpu/x86/pc/olpc/disptest.fth cpu/x86/pc/olpc/fsupdate.fth cpu/x86/pc/olpc/nandstat.fth cpu/x86/pc/olpc/suspend.fth cpu/x86/pc/olpc/via/copynand.fth dev/olpc/keyboard/selftest.fth Log: Eliminated "isn't unique" messages during compilation by fixing some name collisions and adding "warning off" for intentional redefinitions.
Modified: cpu/x86/pc/biosints.fth =================================================================== --- cpu/x86/pc/biosints.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/biosints.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -1084,6 +1084,7 @@ mbr-boot? 0= if 2drop false exit then + 2 - le-w@ h# aa55 = ; +warning @ warning off : init-program ( -- ) loaded is-mbr? if prep-rm @@ -1095,7 +1096,6 @@ then init-program ; - \ " rm-go" ' boot-command set-config-string-default : execute-buffer ( adr len -- ) rm-prepped? if ( adr len ) @@ -1106,6 +1106,7 @@ then execute-buffer ; +warning !
0 value boot-sector# 1 value boot-#sectors
Modified: cpu/x86/pc/olpc/acpi.fth =================================================================== --- cpu/x86/pc/olpc/acpi.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/acpi.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -147,7 +147,7 @@ negate h# ff and r> r> + c! ;
-: memory-limit ( -- limit ) +: acpi-memory-limit ( -- limit ) " /memory" find-package 0= abort" No /memory node" ( phandle ) " available" rot get-package-property abort" No available property" ( $ ) -1 >r ( $ ) ( r: limit ) @@ -164,7 +164,7 @@ : setup-acpi ( -- ) \ This has to agree with the _SB's _INI method, which gets the memory size \ from offset h# 180 in the EBDA - memory-limit d# 10 rshift 'ebda h# 180 + l! + acpi-memory-limit d# 10 rshift 'ebda h# 180 + l!
\ Copy rsdt and fadt to low memory rsdp rsdp-adr /rsdp move rsdp-adr h# 14 8 fix-checksum rsdp-adr /rsdp h# 20 fix-checksum
Modified: cpu/x86/pc/olpc/copynand.fth =================================================================== --- cpu/x86/pc/olpc/copynand.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/copynand.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -311,7 +311,7 @@ \ 6 - erased : show-erased \ 7 - primary bad-block-table : show-bbt-block \ 8 - secondary bad-block-table : show-bbt-block -: show-status ( status eblock# -- ) +: show-block-type ( status eblock# -- ) swap case 0 of show-bad endof 1 of show-bad endof @@ -391,11 +391,6 @@ ," Secondary Bad Block Table" \ 8 end-string-array
-: show-block-status ( block# -- ) - dup show-eblock# - nand-map + c@ status-descriptions count type kill-line -; - : cell-border ( block# color -- ) swap >loc ( color x y ) -1 -1 xy+ @@ -404,19 +399,20 @@ 3dup 0 1 xy+ 1 grid-h do-fill ( color x y ) 1 grid-h xy+ grid-w 1 do-fill ; -: lowlight ( block# -- ) background-rgb rgb>565 cell-border ; -: highlight ( block# -- ) 0 cell-border ; +: lowlight-block ( block# -- ) background-rgb rgb>565 cell-border ; +: highlight-block ( block# -- ) 0 cell-border ; : point-block ( block# -- ) - current-block lowlight + current-block lowlight-block to current-block - current-block highlight + current-block highlight-block ;
0 value nand-block-limit : +block ( offset -- ) - current-block + nand-block-limit mod ( new-block ) - point-block - current-block show-block-status + current-block + nand-block-limit mod ( new-block# ) + dup point-block ( new-block# ) + dup show-eblock# ( new-block# ) + nand-map + c@ status-descriptions count type kill-line ;
: process-key ( char -- ) @@ -438,10 +434,10 @@ 0 status-line 1- at-xy red-letters ." Arrows, fn Arrows to move, Esc to exit" black-letters cr #nand-pages nand-pages/block / to nand-block-limit 0 to current-block - current-block highlight + current-block highlight-block false to examine-done? begin key process-key examine-done? until - current-block lowlight + current-block lowlight-block ;
: (scan-nand) ( -- ) @@ -459,7 +455,7 @@ i classify-block ( status ) i nand-pages/block / ( status eblock# ) 2dup nand-map + c! ( status eblock# ) - show-status + show-block-type nand-pages/block +loop ( )
show-done
Modified: cpu/x86/pc/olpc/disptest.fth =================================================================== --- cpu/x86/pc/olpc/disptest.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/disptest.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -68,6 +68,7 @@ drop ;
+warning @ warning off : selftest ( -- error? ) depth d# 16 <> if false exit then .horizontal-bars16 @@ -79,6 +80,7 @@ random-selftest false ; +warning !
device-end
Modified: cpu/x86/pc/olpc/fsupdate.fth =================================================================== --- cpu/x86/pc/olpc/fsupdate.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/fsupdate.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -11,13 +11,13 @@ 0 value partition-map-offset 0 value next-partition-start
-0 value partition# +0 value fs-partition# d# 256 constant /partition-entry -: partition-adr ( -- adr ) partition# /partition-entry * load-base + ; +: partition-adr ( -- adr ) fs-partition# /partition-entry * load-base + ; : max-nand-offset ( -- n ) " usable-page-limit" $call-nand /nand-page * ;
: add-partition ( name$ #eblocks -- ) - partition# " max#partitions" $call-nand >= abort" Partition map overflow" + fs-partition# " max#partitions" $call-nand >= abort" Partition map overflow"
-rot ( #eblocks name$ ) partition-adr /partition-entry erase ( #eblocks name$ ) @@ -36,11 +36,11 @@ next-partition-start + to next-partition-start ( ) next-partition-start max-nand-offset > abort" NAND size overflow"
- partition# 1+ to partition# + fs-partition# 1+ to fs-partition# ; : start-partition-map ( -- ) load-base /nand-block h# ff fill - 0 to partition# + 0 to fs-partition# \ 0 to next-partition-start " partition-map-page#" $call-nand /nand-page * to partition-map-offset
Modified: cpu/x86/pc/olpc/nandstat.fth =================================================================== --- cpu/x86/pc/olpc/nandstat.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/nandstat.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -3,8 +3,6 @@
d# 24 d# 24 2value ulhc
-d# 22 constant status-line - 8 constant glyph-w 8 constant glyph-h
@@ -15,8 +13,6 @@ : xy+ ( x1 y1 x2 y2 -- x3 y3 ) rot + -rot + swap ; : xy* ( x y w h -- x*w y*h ) rot * >r * r> ;
-0 value nand-block-limit - : do-fill ( color x y w h -- ) " fill-rectangle" $call-screen ;
\ States: 0:erased 1:bad 2:waiting for write 3:written @@ -36,6 +32,9 @@ 0 h# ff h# ff rgb>565 constant strange-color \ cyan h# ff h# ff h# ff rgb>565 constant starting-color \ white
+0 value nand-block-limit +d# 22 constant status-line + : gshow-init ( #eblocks -- ) #nand-pages nand-pages/block / to nand-block-limit
@@ -108,7 +107,7 @@ \ 6 - erased : show-erased \ 7 - primary bad-block-table : show-bbt-block \ 8 - secondary bad-block-table : show-bbt-block -: show-status ( status eblock# -- ) +: show-block-status ( status eblock# -- ) swap case 0 of show-bad endof 1 of show-bad endof @@ -197,16 +196,16 @@ 3dup 0 1 xy+ 1 grid-h do-fill ( color x y ) 1 grid-h xy+ grid-w 1 do-fill ; -: lowlight ( block# -- ) background-rgb rgb>565 cell-border ; -: highlight ( block# -- ) 0 cell-border ; -: highlight-block ( block# -- ) - current-block lowlight +: lowlight-block ( block# -- ) background-rgb rgb>565 cell-border ; +: highlight-block ( block# -- ) 0 cell-border ; +: point-block ( block# -- ) + current-block lowlight-block to current-block - current-block highlight + current-block highlight-block ; : +block ( offset -- ) current-block + nand-block-limit mod ( new-block ) - highlight-block + point-block current-block show-block-status ;
@@ -228,10 +227,10 @@ : examine-nand ( -- ) 0 status-line 1- at-xy red-letters ." Arrows, fn Arrows to move, Esc to exit" black-letters cr 0 to current-block - current-block highlight + current-block highlight-block false to examine-done? begin key process-key examine-done? until - current-block lowlight + current-block lowlight-block ;
: (scan-nand) ( -- ) @@ -253,7 +252,7 @@ i classify-block ( status ) i nand-pages/block / ( status eblock# ) 2dup nand-map + c! ( status eblock# ) - show-status + show-block-status nand-pages/block +loop ( )
show-done
Modified: cpu/x86/pc/olpc/suspend.fth =================================================================== --- cpu/x86/pc/olpc/suspend.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/suspend.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -74,13 +74,13 @@ s3 again ; -: suspend +: s3-suspend " video-save" screen-ih $call-method \ Freeze display s3 " video-restore" screen-ih $call-method \ Unfreeze display " /usb@f,5" open-dev ?dup if " do-resume" 2 pick $call-method close-dev then ; -alias s suspend +alias s s3-suspend
\ LICENSE_BEGIN \ Copyright (c) 2007 FirmWorks
Modified: cpu/x86/pc/olpc/via/copynand.fth =================================================================== --- cpu/x86/pc/olpc/via/copynand.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ cpu/x86/pc/olpc/via/copynand.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -249,11 +249,6 @@ ," Secondary Bad Block Table" \ 8 end-string-array
-: show-block-status ( block# -- ) - dup show-eblock# - nand-map + c@ status-descriptions count type kill-line -; - : cell-border ( block# color -- ) swap >loc ( color x y ) -1 -1 xy+ @@ -272,9 +267,10 @@
0 value nand-block-limit : +block ( offset -- ) - current-block + nand-block-limit mod ( new-block ) - point-block - current-block show-block-status + current-block + nand-block-limit mod ( new-block# ) + dup point-block ( new-block# ) + dup show-eblock# ( new-block# ) + nand-map + c@ status-descriptions count type kill-line ;
: process-key ( char -- )
Modified: dev/olpc/keyboard/selftest.fth =================================================================== --- dev/olpc/keyboard/selftest.fth 2009-08-28 20:03:29 UTC (rev 1332) +++ dev/olpc/keyboard/selftest.fth 2009-08-28 20:07:46 UTC (rev 1333) @@ -417,6 +417,7 @@
: toss-keys ( -- ) begin key? while key drop repeat ;
+warning @ warning off : selftest ( -- error? ) open 0= if true exit then make-keys @@ -430,6 +431,7 @@ close false ; +warning !
device-end
openfirmware@openfirmware.info