Author: rsmith
Date: Sat Oct 20 03:42:59 2012
New Revision: 3375
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3375
Log:
OLPC ARM: convert s3-selftest to use sus power measurement
ec-sus-pwr reads a power measurement from the EC that only happens
after the EC senses the SoC is in suspend. This reading gives much
more consistent results as long as the SoC is suspended for long
enough for the EC to update. (1s or more)
Modified:
cpu/arm/mmp2/rtc.fth
Modified: cpu/arm/mmp2/rtc.fth
==============================================================================
--- cpu/arm/mmp2/rtc.fth Sat Oct 20 02:20:13 2012 (r3374)
+++ cpu/arm/mmp2/rtc.fth Sat Oct 20 03:42:59 2012 (r3375)
@@ -67,7 +67,7 @@
\ on the operator.
." Testing suspend/resume" cr
." Sleeping for 3 seconds .. " d# 1000 ms
- ec-rst-pwr ['] cancel-alarm 3 rtc-wake str ec-max-pwr ( power )
+ ec-rst-pwr ['] cancel-alarm 3 rtc-wake str ec-sus-pwr ( power )
\ Negative power is consumed from battery, positive is supplied to battery
dup suspend-power-limit < if ( power )
." System used too much power during suspend - " negate .d ." mW" cr ( )
Author: quozl
Date: Sat Oct 20 01:47:51 2012
New Revision: 3373
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3373
Log:
OLPC - accelerometer stack effect comment fix
Modified:
cpu/arm/olpc/accelerometer.fth
Modified: cpu/arm/olpc/accelerometer.fth
==============================================================================
--- cpu/arm/olpc/accelerometer.fth Wed Oct 17 09:05:36 2012 (r3372)
+++ cpu/arm/olpc/accelerometer.fth Sat Oct 20 01:47:51 2012 (r3373)
@@ -109,7 +109,7 @@
error? if accelerometer-off true exit then
false
;
-: lis3dhtr-selftest ( -- )
+: lis3dhtr-selftest ( -- error? )
\ Use the device's selftest function to force a change in one direction
delay ( )
average-acceleration@ ( x y z )
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