Author: wmb
Date: Sat Oct 13 03:44:30 2012
New Revision: 3370
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3370
Log:
OLPC XO-4 - reverted bundle suffix from 5 to 4, as we are not going to distinguish between A and B revs of XO-4 in the bundle files.
Modified:
cpu/arm/olpc/4.0/config.fth
Modified: cpu/arm/olpc/4.0/config.fth
==============================================================================
--- cpu/arm/olpc/4.0/config.fth Sat Oct 13 03:42:23 2012 (r3369)
+++ cpu/arm/olpc/4.0/config.fth Sat Oct 13 03:44:30 2012 (r3370)
@@ -23,7 +23,7 @@
: model$ " olpc,XO-4.0" ;
: compatible$ " olpc,xo-cl4" ;
: ec-platform$ ( -- adr len ) " 7" ;
-: bundle-suffix$ ( -- adr len ) " 5" ;
+: bundle-suffix$ ( -- adr len ) " 4" ;
d# 10001 constant machine-type \ Backwards compatibility with non-device-tree kernel
Author: wmb
Date: Sat Oct 13 03:42:23 2012
New Revision: 3369
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3369
Log:
OLPC - fixed a possible unitialized buffer address in fs-update.
Modified:
cpu/x86/pc/olpc/via/fsupdate.fth
Modified: cpu/x86/pc/olpc/via/fsupdate.fth
==============================================================================
--- cpu/x86/pc/olpc/via/fsupdate.fth Sat Oct 13 03:41:13 2012 (r3368)
+++ cpu/x86/pc/olpc/via/fsupdate.fth Sat Oct 13 03:42:23 2012 (r3369)
@@ -72,6 +72,7 @@
also nand-commands definitions
: zblocks: ( "eblock-size" "#eblocks" ... -- )
+ load-base to data-buffer
?compare-spec-line
get-hex# to /nand-block
get-hex# to #image-eblocks
@@ -84,8 +85,7 @@
\ Separate the two buffers by enough space for both the compressed
\ and uncompressed copies of the data. 4x is overkill, but there
\ is plenty of space at load-base
- load-base to dma-buffer
- load-base /nand-block 4 * + to data-buffer
+ load-base /nand-block 4 * + to dma-buffer
/nand-block /nand-page / to nand-pages/block
t-update \ Handle possible timer rollover
;
Author: wmb
Date: Sat Oct 13 03:40:00 2012
New Revision: 3367
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3367
Log:
x86 kernel - added bscan code word used by new substring variant.
Modified:
cpu/x86/kerncode.fth
Modified: cpu/x86/kerncode.fth
==============================================================================
--- cpu/x86/kerncode.fth Sat Oct 13 03:30:13 2012 (r3366)
+++ cpu/x86/kerncode.fth Sat Oct 13 03:40:00 2012 (r3367)
@@ -657,6 +657,30 @@
2 # cx shl cx push
c;
+\ Find the first occurence of bvalue, returning the residual string
+code bscan ( adr1 len1 char -- adr' len' )
+ si dx mov
+ cld
+ bx pop \ bx: char
+ cx pop \ cx: count
+ si pop \ si: adr
+ cx cx or 0<> if
+ begin
+ al lods
+ bl al cmp
+ loopne
+ = if
+ si dec si push ( adr' )
+ cx inc cx push ( adr' len' )
+ dx si mov
+ next
+ then
+ then
+ si push ( adr' )
+ cx push ( adr' len' )
+ dx si mov
+c;
+
code noop (s -- ) c;
code n->l (s n.unsigned -- l ) c;
Author: wmb
Date: Sat Oct 13 03:30:13 2012
New Revision: 3366
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3366
Log:
OLPC trac #12106 and #12181 - inflate initrd images from inside a .zip bundle.
Modified:
cpu/x86/pc/olpc/security.fth
ofw/core/infltdi.fth
Modified: cpu/x86/pc/olpc/security.fth
==============================================================================
--- cpu/x86/pc/olpc/security.fth Sat Oct 13 01:08:50 2012 (r3365)
+++ cpu/x86/pc/olpc/security.fth Sat Oct 13 03:30:13 2012 (r3366)
@@ -796,7 +796,7 @@
" RD found - " ?lease-debug
img$ sig$ sha-valid? if
show-unlock
- img$ place-ramdisk
+ img$ $inflated? drop place-ramdisk
exit
else
show-unlock
Modified: ofw/core/infltdi.fth
==============================================================================
--- ofw/core/infltdi.fth Sat Oct 13 01:08:50 2012 (r3365)
+++ ofw/core/infltdi.fth Sat Oct 13 03:30:13 2012 (r3366)
@@ -51,12 +51,27 @@
;
' try-inflate to ?inflate
+\ Inflates the image at adr len if it is compressed.
+\ The uncompressed image is placed after the compressed image in memory,
+\ so sufficient space must be available there. In practice, this
+\ usually means that adr should be in the region beginning at load-base .
+
+: $inflated? ( adr len -- adr' len' true | adr len false )
+ over " "(1f8b08)" comp 0= if ( adr len )
+ over + 4 round-up tuck ( adr+len adr adr+len )
+ inflate true ( adr' len' true )
+ else ( adr len )
+ false ( adr len false )
+ then
+;
: (?inflate-loaded) ( -- )
- load-base " "(1f8b08)" comp 0= if
- load-base loaded + tuck inflate !load-size ( infl-adr )
- loaded move ( )
+ loaded $inflated? if ( adr len )
+ !load-size loaded move ( )
+ else ( adr len )
+ 2drop ( )
then
;
+
' (?inflate-loaded) to ?inflate-loaded
headers
\ LICENSE_BEGIN
Author: wmb
Date: Sat Oct 13 01:08:50 2012
New Revision: 3365
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3365
Log:
Libertas WLAN driver - changed "0 [if]" to "[ifdef] notdef" because the former doesn't
work the way you think when tokenizing FCode. The problem is that the tokenizer
emits an FCode for the "0", so the compile-time "[if]" doesn't see a number on the stack.
Modified:
dev/libertas.fth
Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth Fri Oct 12 08:28:22 2012 (r3364)
+++ dev/libertas.fth Sat Oct 13 01:08:50 2012 (r3365)
@@ -793,7 +793,7 @@
respbuf >fw-data 4 + le-l@
;
-0 [if]
+[ifdef] notdef
: reg-access! ( n reg cmd -- )
8 swap prepare-cmd
ACTION_SET +xw
@@ -812,7 +812,7 @@
: mac-reg@ ( reg -- n )
19 ( CMD_MAC_REG_ACCESS ) reg-access@
;
-0 [if]
+[ifdef] notdef
: bbp-reg! ( n reg -- )
1a ( CMD_BBP_REG_ACCESS ) reg-access!
;
Author: quozl
Date: Thu Oct 11 09:50:31 2012
New Revision: 3361
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3361
Log:
OLPC WLAN driver - report 802.11n firmware capability when present, tested on XO-4 B1 with 8686 and 8787
Modified:
dev/libertas.fth
Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth Thu Oct 11 08:03:46 2012 (r3360)
+++ dev/libertas.fth Thu Oct 11 09:50:31 2012 (r3361)
@@ -646,7 +646,8 @@
." 802.11"
dup h# 400 and if ." a" then
dup h# 100 and if ." b" then
- dup h# 200 and if ." g" then ." ;"
+ dup h# 200 and if ." g" then
+ dup h# 800 and if ." n" then ." ;"
dup h# 1 and if ." WPA;" then
dup h# 2 and if ." PS;" then
dup h# 8 and if ." EEPROM does not exit;" then