Changeset 3364
- Timestamp:
- Oct 12, 2012 8:28:22 AM (7 months ago)
- Files:
-
- 5 edited
-
cpu/arm/olpc/build-fw.fth (modified) (1 diff)
-
cpu/arm/olpc/edi.fth (modified) (3 diffs)
-
cpu/x86/pc/olpc/gui.fth (modified) (3 diffs)
-
cpu/x86/pc/olpc/security.fth (modified) (2 diffs)
-
dev/olpc/spiflash/spiui.fth (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/build-fw.fth
r3354 r3364 854 854 d# 1000 ms 855 855 else 856 show-reflash 857 ['] show-reflash-dot to edi-progress 856 jots ['] jot to edi-progress 858 857 update-ec-flash 859 858 then -
cpu/arm/olpc/edi.fth
r3359 r3364 51 51 52 52 d# 128 constant /flash-page 53 defer edi-progress ' drop to edi-progress ( n-- )53 defer edi-progress ' 2drop to edi-progress ( offset size -- ) 54 54 55 55 : edi-cmd,adr ( offset cmd -- ) \ Send command plus 3 address bytes … … 196 196 ; 197 197 198 : .edi-progress ( n -- )199 /ec-flash h# 8000 > if 1 else 0 then rshift ( dot# )200 edi-progress ( )201 ;202 203 198 : edi-program-flash ( adr len offset -- ) 204 199 cr ( adr len offset ) … … 209 204 over i + over i + edi-program-page ( adr offset ) 210 205 then ( adr offset ) 211 i .edi-progress( adr offset )206 i /ec-flash edi-progress ( adr offset ) 212 207 /flash-page +loop ( adr offset ) 213 208 2drop ( ) -
cpu/x86/pc/olpc/gui.fth
r3194 r3364 391 391 ; 392 392 393 d# 834 value bar-y 393 d# 32 value #dots 394 d# 820 value bar-y 394 395 d# 150 value bar-x 396 d# 1200 d# 26 - value bar-x-last 395 397 0 value dot-adr 398 0 value dot-spacing 399 0 value last-dot# 396 400 397 401 : read-dot ( -- ) \ rom: is unavailable during reflash … … 401 405 ; 402 406 403 : show-reflash( -- ) \ bottom left corner, chip and progress dots407 : jots ( -- ) \ bottom left corner, chip and progress dots 404 408 d# 25 d# 772 set-icon-xy " spi" show-icon 405 d# 992 bar-x +bar-y set-icon-xy " yellowdot" show-icon409 bar-x-last bar-y set-icon-xy " yellowdot" show-icon 406 410 read-dot 407 ; 408 409 : show-reflash-dot ( n -- ) \ n to vary h# 0 to h# 8000 410 dup h# 400 mod 0= if ( n ) 411 dot-adr 0= if drop exit then ( n ) 412 dot-adr swap h# 20 / bar-x + bar-y ( adr x y ) 413 image-width image-height ( adr x y w h ) 414 " draw-transparent-rectangle" $call-screen 411 -1 to last-dot# 412 bar-x-last bar-x - #dots / to dot-spacing 413 ; 414 415 : jot ( offset size -- ) 416 dot-adr 0= if 2drop exit then ( offset size ) 417 #dots swap */ ( dot# ) 418 dup last-dot# <> if ( dot# ) 419 dup to last-dot# ( dot# ) 420 dot-adr swap ( adr dot# ) 421 dot-spacing * bar-x + bar-y ( adr x y ) 422 image-width image-height ( adr x y w h ) 423 " draw-transparent-rectangle" $call-screen ( ) 415 424 else 416 425 drop … … 419 428 420 429 0 [if] 421 : test-reflash-dot 422 page show-reflash t( h# 8000 0 do i show-reflash-dot h# 80 +loop )t 430 : test-jots-flash \ XO-4 B1 13ms 431 page jots t( /flash 0 do i /flash jot /flash-page +loop )t 432 ; 433 : test-jots-ec \ XO-4 B1 3ms 434 page jots t( /ec-flash 0 do i /ec-flash jot /flash-page +loop )t 423 435 ; 424 436 [then] -
cpu/x86/pc/olpc/security.fth
r3349 r3364 1007 1007 ec-indexed-io-off? if 1008 1008 visible 1009 show-reflash1009 jots 1010 1010 ." Restarting to enable SPI FLASH writing." cr 1011 1011 d# 3000 ms … … 1017 1017 alternate? if [char] A h# 82 cmos! then 1018 1018 1019 show-reflash 1020 ['] show-reflash-dot to spi-progress 1019 jots ['] jot to spi-progress 1021 1020 reflash \ Should power-off and reboot 1022 1021 show-x -
dev/olpc/spiflash/spiui.fth
r3359 r3364 9 9 h# 4000 constant /chunk \ Convenient sized piece for progress reports 10 10 11 defer spi-progress ' drop to spi-progress ( n -- ) 12 13 : .progress ( offset -- ) 14 /flash h# 10.0000 > if 6 else 5 then rshift ( dot# ) 15 dup spi-progress h# 400 + spi-progress ( ) 16 ; 11 defer spi-progress ' 2drop to spi-progress ( offset size -- ) 17 12 18 13 : write-flash-range ( adr end-offset start-offset -- ) … … 32 27 dup /flash-block i flash-write ( adr ) 33 28 then 34 i .progress( adr )29 i /flash spi-progress ( adr ) 35 30 /flash-block + ( adr' ) 36 31 /flash-block +loop ( adr ) … … 197 192 198 193 \ Don't write the block containing the manufacturing data 199 mfg-data-offset .progress194 mfg-data-offset /flash spi-progress 200 195 201 196 flash-buf mfg-data-end-offset + /flash mfg-data-end-offset write-flash-range \ Write last part … … 222 217 verify-firmware 223 218 then 224 /flash .progress219 /flash dup spi-progress 225 220 flash-write-disable 226 221 else
Note: See TracChangeset
for help on using the changeset viewer.
