[OpenBIOS] r581 - cpu/x86/pc/olpc dev/olpc/spiflash

svn at openbios.org svn at openbios.org
Tue Aug 28 01:08:11 CEST 2007


Author: wmb
Date: 2007-08-28 01:08:11 +0200 (Tue, 28 Aug 2007)
New Revision: 581

Modified:
   cpu/x86/pc/olpc/spiflash.bth
   dev/olpc/spiflash/flashec.fth
Log:
Added flash-ec to spiflash.dic



Modified: cpu/x86/pc/olpc/spiflash.bth
===================================================================
--- cpu/x86/pc/olpc/spiflash.bth	2007-08-27 23:07:37 UTC (rev 580)
+++ cpu/x86/pc/olpc/spiflash.bth	2007-08-27 23:08:11 UTC (rev 581)
@@ -3,17 +3,22 @@
 command: &builder &this
 build-now
 
-: null$  " "  ;
+\needs cdump : cdump  ( adr len -- )  push-hex   bounds  ?do  i c@  3 u.r  loop  pop-base  ;
 
+\needs null$  : null$  " "  ;
+
+h# fff0.0000 constant rom-pa
+
 fload ${BP}/cpu/x86/pc/olpc/linuxserial.fth
 fload ${BP}/cpu/x86/ioports.fth    \ I/O port access under Linux
 
+alias root-map-in mmap     ( phys len -- virt )
+alias root-map-out munmap  ( virt len -- )
+
 fload ${BP}/cpu/x86/crc32.fth		\ Assembly language Zip CRC calculation
 fload ${BP}/forth/lib/crc32.fth		\ High-level portion of CRC calculation
+fload ${BP}/forth/lib/wrtime.fth	\ Time delays via the wrapper
 
-: us  ( microseconds -- )  drop  ;
-: ms  ( milliseconds -- )  drop  ;
-
 : power-off  ( -- )  " sync" $sh  " kbc-on" eval  ;
 
 hex
@@ -30,6 +35,7 @@
 fload ${BP}/dev/olpc/kb3700/ecserial.fth
 fload ${BP}/cpu/x86/pc/olpc/mfgdata.fth
 fload ${BP}/dev/olpc/spiflash/spiui.fth
+fload ${BP}/dev/olpc/spiflash/flashec.fth
 
 : os-fw-filename$  ( -- adr len )  " olpc.rom"  ;
 
@@ -63,7 +69,11 @@
    ." Verification over the serial line is slow (17 minutes)" cr
    ." so you might want to skip it and let the" cr
    ." loaded image verify itself upon booting." cr
+   ."
    cr
+   ." flash-ec filename  \ Programs the EC FLASH from the named file
+
+   cr
 ;
 
 ' usage to title

Modified: dev/olpc/spiflash/flashec.fth
===================================================================
--- dev/olpc/spiflash/flashec.fth	2007-08-27 23:07:37 UTC (rev 580)
+++ dev/olpc/spiflash/flashec.fth	2007-08-27 23:08:11 UTC (rev 581)
@@ -2,11 +2,13 @@
 \ This will cause the overall CRC near the end of the FLASH to be wrong,
 \ but that won't prevent the system from working.
 
-.( EC FLASH Program.  Example:   ok flash-ec disk:\PQ2B31.bin) cr
+\ .( EC FLASH Program.  Example:   ok flash-ec disk:\PQ2B31.bin) cr
 
+h# 1.0000 constant /ec
+
 : flash-ec  ( "filename" -- )
    reading
-   ec-buf  /ec  ifd @ fgets   ( len )
+   flash-buf  /ec  ifd @ fgets   ( len )
    ifd @ fclose
 
    /ec <> abort" EC image file is the wrong length"
@@ -14,7 +16,7 @@
    spi-start
    spi-identify .spi-id cr
 
-   merge-mfg-data
+   \ merge-mfg-data
 
    flash-buf  /ec  0  write-flash-range   \ Write everything
 ;




More information about the OpenBIOS mailing list