j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-08-28 01:07:37 +0200 (Tue, 28 Aug 2007) New Revision: 580
Modified: cpu/x86/pc/olpc/sdtools/dumpgamma.fth cpu/x86/pc/olpc/sdtools/maketar cpu/x86/pc/olpc/sdtools/sd.fth Log: Cleaned up the initialization of base addresses.
Modified: cpu/x86/pc/olpc/sdtools/dumpgamma.fth =================================================================== --- cpu/x86/pc/olpc/sdtools/dumpgamma.fth 2007-08-27 22:44:27 UTC (rev 579) +++ cpu/x86/pc/olpc/sdtools/dumpgamma.fth 2007-08-27 23:07:37 UTC (rev 580) @@ -5,7 +5,7 @@ \needs mmap fload ioports.fth
hex -fe00.8000 4000 mmap constant vp-base +-1 value vp-base
: vp@ ( reg -- l ) vp-base + l@ ; : vp! ( l reg -- ) vp-base + l! ; @@ -24,20 +24,16 @@ h# 8 +loop ;
-fe00.4000 4000 mmap constant dc-base +-1 value dc-base
: dc@ ( reg -- l ) dc-base + l@ ; : dc! ( l reg -- ) dc-base + l! ;
-fe00.0000 4000 mmap constant gp-base +-1 value gp-base
: gp@ ( reg -- l ) gp-base + l@ ; : gp! ( l reg -- ) gp-base + l! ;
- - - - \ LICENSE_BEGIN \ Copyright (c) 2006 FirmWorks \
Modified: cpu/x86/pc/olpc/sdtools/maketar =================================================================== --- cpu/x86/pc/olpc/sdtools/maketar 2007-08-27 22:44:27 UTC (rev 579) +++ cpu/x86/pc/olpc/sdtools/maketar 2007-08-27 23:07:37 UTC (rev 580) @@ -4,8 +4,10 @@ cp ../../../../../cpu/x86/build/builder.dic sdkit cp ../../../../../cpu/x86/ioports.fth sdkit cp ../../../../../cpu/x86/pc/olpc/mfgdata.fth sdkit +cp ../../../../../forth/lib/wrtime.fth sdkit cp ../../../../../dev/olpc/dcon/dconsmb.fth sdkit cp ../../../../../dev/olpc/kb3700/ecio.fth sdkit cp sd sd.fth ecdump.fth dumpgamma.fth sdkit +chmod 755 sdkit/sd tar cfz sdkit.tgz sdkit # rm sdkit/*
Modified: cpu/x86/pc/olpc/sdtools/sd.fth =================================================================== --- cpu/x86/pc/olpc/sdtools/sd.fth 2007-08-27 22:44:27 UTC (rev 579) +++ cpu/x86/pc/olpc/sdtools/sd.fth 2007-08-27 23:07:37 UTC (rev 580) @@ -21,30 +21,24 @@ usage
hex -fe01.0000 4000 mmap constant sd +0 value sd-base
-: sdl@ ( offset -- l ) sd + l@ ; -: sdw@ ( offset -- w ) sd + w@ ; -: sdb@ ( offset -- b ) sd + c@ ; +: sdl@ ( offset -- l ) sd-base + l@ ; +: sdw@ ( offset -- w ) sd-base + w@ ; +: sdb@ ( offset -- b ) sd-base + c@ ;
-: sdl! ( l offset -- ) sd + l! ; -: sdw! ( w offset -- ) sd + w! ; -: sdb! ( b offset -- ) sd + c! ; +: sdl! ( l offset -- ) sd-base + l! ; +: sdw! ( w offset -- ) sd-base + w! ; +: sdb! ( b offset -- ) sd-base + c! ;
: r ( offset -- ) sdl@ u. ; : w ( l offset -- ) sdl! ;
-1 value flash-base -fff0.0000 10.0000 mmap to flash-base \needs cdump : cdump ( adr len -- ) bounds ?do i c@ .x loop ; \needs .mfg-data fload mfgdata.fth
-: 1ms ( -- ) - h# 10 msr@ drop d# 500,000 + ( limit ) - begin dup h# 10 msr@ drop - 0< until - drop -; -: ms ( #ms -- ) 0 ?do 1ms loop ; +\needs ms fload wrtime.fth
\needs dcon@ fload dconsmb.fth
@@ -68,6 +62,15 @@ \needs ec@ fload ecio.fth \needs ec-range fload ecdump.fth
+: map-io ( -- ) + h# fe01.0000 h# 4000 mmap to sd-base + h# fff0.0000 h# 10.0000 mmap to flash-base + h# fe00.8000 h# 4000 mmap to vp-base + h# fe00.4000 h# 4000 mmap to dc-base + h# fe00.0000 h# 4000 mmap to gp-base +; +map-io + \ LICENSE_BEGIN \ Copyright (c) 2006 FirmWorks \