Author: quozl
Date: Sat Jan 7 08:37:00 2012
New Revision: 2803
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2803
Log:
OLPC XO-1.75 - increase the wait for EDI again, #11565
Modified:
cpu/arm/olpc/edi.fth
Modified: cpu/arm/olpc/edi.fth
==============================================================================
--- cpu/arm/olpc/edi.fth Sat Jan 7 08:32:03 2012 (r2802)
+++ cpu/arm/olpc/edi.fth Sat Jan 7 08:37:00 2012 (r2803)
@@ -26,7 +26,7 @@
;
[ifndef] edi-wait-b
: edi-wait-b ( -- b ) \ Wait for and receive EC response byte
- d# 100 0 do
+ d# 10000 0 do
spi-in h# 50 = if
spi-in ( b )
spi-cs-off ( b )
Author: quozl
Date: Sat Jan 7 08:32:03 2012
New Revision: 2802
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2802
Log:
OLPC XO-1.75 XO-3 - do not test suspend and resume at FINAL, requested by Chia-Hsiu.
Modified:
cpu/arm/mmp2/rtc.fth
Modified: cpu/arm/mmp2/rtc.fth
==============================================================================
--- cpu/arm/mmp2/rtc.fth Fri Jan 6 22:21:15 2012 (r2801)
+++ cpu/arm/mmp2/rtc.fth Sat Jan 7 08:32:03 2012 (r2802)
@@ -58,8 +58,10 @@
;
dev /switches
: selftest ( -- error? )
- s3-selftest if true exit then
- selftest
+ final-test? 0= if
+ s3-selftest if true exit then
+ then
+ selftest
;
device-end
Author: quozl
Date: Fri Jan 6 22:21:15 2012
New Revision: 2801
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2801
Log:
Q3B24
Note that this version was not svn head at this point.
Q3B24 is a reissue of Q3B22 requested by Reuben.
Shall consist of:
2478 (OpenFirmware Q3B19 and EC 2.2.8)
2589 (add some guards to load-from-list)
2597 (OpenFirmware Q3B20 and EC 2.2.9)
2647 (OpenFirmware Q3B21)
2651 (OpenFirmware Q3B22 and EC 2.2.10)
Modified:
cpu/x86/pc/olpc/via/fw-version.fth
Modified: cpu/x86/pc/olpc/via/fw-version.fth
==============================================================================
--- cpu/x86/pc/olpc/via/fw-version.fth Fri Jan 6 17:31:16 2012 (r2800)
+++ cpu/x86/pc/olpc/via/fw-version.fth Fri Jan 6 22:21:15 2012 (r2801)
@@ -1,3 +1,3 @@
\ The overall firmware revision
macro: FW_MAJOR B
-macro: FW_MINOR 23
+macro: FW_MINOR 24
Author: wmb
Date: Fri Jan 6 17:31:11 2012
New Revision: 2799
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2799
Log:
EXT2/3/4 file systemsystem - OLPC trac #11184 - added the ability to delete extent-mapped files from an EXT4 filesystem.
Modified:
ofw/fs/ext2fs/dir.fth
ofw/fs/ext2fs/extent.fth
ofw/fs/ext2fs/layout.fth
Modified: ofw/fs/ext2fs/dir.fth
==============================================================================
--- ofw/fs/ext2fs/dir.fth Wed Jan 4 09:51:42 2012 (r2798)
+++ ofw/fs/ext2fs/dir.fth Fri Jan 6 17:31:11 2012 (r2799)
@@ -195,7 +195,9 @@
: idelete ( -- )
\ Short symlinks hold no blocks, but have a string in the direct block list,
\ so we must not interpret that string as a block list.
- d.#blks-held d0<> if delete-blocks then
+ d.#blks-held d0<> if
+ extent? if delete-extents else delete-blocks then
+ then
\ clear d.#blks-held, link-count, etc.
0 +i /inode 6 /l* /string erase
Modified: ofw/fs/ext2fs/extent.fth
==============================================================================
--- ofw/fs/ext2fs/extent.fth Wed Jan 4 09:51:42 2012 (r2798)
+++ ofw/fs/ext2fs/extent.fth Fri Jan 6 17:31:11 2012 (r2799)
@@ -1,4 +1,6 @@
-\ EXT4 extents
+\ See license at end of file
+purpose: EXT4 extent handling
+
d# 12 constant /extent-header
d# 12 constant /extent-record
@@ -59,19 +61,22 @@
r> >extent ( block# 'extent )
;
+: get-extent-block ( 'extent-index -- 'eh )
+ d.block ( 'eh )
+
+ \ Error check
+ dup ext-magic? 0= if ( 'eh )
+ ." EXT4 bad index block" cr
+ debug-me
+ then ( 'eh )
+;
+
: extent->pblk# ( logical-block# -- d.physical-block# )
direct0 ( logical-block# 'eh )
dup >eh_depth short@ 0 ?do ( logical-block# 'eh )
ext-binsearch ( logical-block# 'extent-index )
index-block@ ( logical-block# d.block# )
- d.block ( logical-block# 'eh' )
-
- \ Error check
- dup ext-magic? 0= if ( logical-block# 'eh' )
- ." EXT4 bad index block" cr
- debug-me
- then ( logical-block# 'eh' )
-
+ get-extent-block ( logical-block# 'eh' )
loop ( logical-block# 'eh )
ext-binsearch >r ( logical-block# r: 'extent )
@@ -85,3 +90,67 @@
then ( block-offset r: 'extent )
u>d r> extent-block@ d+ ( d.block# )
;
+
+: free-extent-blocks ( 'extent -- )
+ dup extent-block@ ( 'extent d.block# )
+ rot >ee_len short@ 0 ?do ( d.block# )
+ 2dup d.free-block ( d.block# )
+ 1. d+ ( d.block#' )
+ loop ( d.block#' )
+ 2drop ( )
+;
+
+: (delete-extents) ( 'eh level -- ) recursive
+ ?dup if ( 'eh level )
+ \ Level nonzero means 'eh is an index, so recursively free its blocks.
+ 1- ( 'eh level' )
+ over >eh_entries short@ ( 'eh level #entries )
+ 0 ?do ( 'eh level )
+ i third >extent ( 'eh level 'extent-index )
+ index-block@ 2>r ( 'eh level r: d.block# )
+ 2r@ get-extent-block ( 'eh level 'subordinate-eh r: d.block# )
+ over (delete-extents) ( 'eh level r: d.block# )
+ 2r> d.free-block ( 'eh level )
+ loop ( 'eh level )
+ 2drop ( )
+ else ( 'eh )
+ \ Level 0 means 'eh is an extent list
+ \ For each extent in the list ...
+ dup >eh_entries short@ 0 ?do ( 'eh )
+ \ Free all the blocks in that extent
+ i over >extent free-extent-blocks ( 'eh )
+ loop ( 'eh )
+ drop ( )
+ then ( )
+;
+
+\ Delete blocks listed in the current set of extents
+: delete-extents ( -- )
+ direct0 ( 'eh )
+ dup >eh_depth short@ ( 'eh depth )
+ (delete-extents) ( )
+;
+
+\ LICENSE_BEGIN
+\ Copyright (c) 2012 FirmWorks
+\
+\ Permission is hereby granted, free of charge, to any person obtaining
+\ a copy of this software and associated documentation files (the
+\ "Software"), to deal in the Software without restriction, including
+\ without limitation the rights to use, copy, modify, merge, publish,
+\ distribute, sublicense, and/or sell copies of the Software, and to
+\ permit persons to whom the Software is furnished to do so, subject to
+\ the following conditions:
+\
+\ The above copyright notice and this permission notice shall be
+\ included in all copies or substantial portions of the Software.
+\
+\ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+\ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+\ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+\ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+\ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+\ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+\ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+\
+\ LICENSE_END
Modified: ofw/fs/ext2fs/layout.fth
==============================================================================
--- ofw/fs/ext2fs/layout.fth Wed Jan 4 09:51:42 2012 (r2798)
+++ ofw/fs/ext2fs/layout.fth Fri Jan 6 17:31:11 2012 (r2799)
@@ -195,6 +195,7 @@
loop
;
: delete-blocks ( -- )
+ extent? if delete-extents exit then
delete-directs
indirect1 del-blk1 if 0 indirect1 int! update then
indirect2 del-blk2 if 0 indirect2 int! update then
Author: wmb
Date: Sat Dec 31 23:25:58 2011
New Revision: 2795
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2795
Log:
OLPC trac #11349 - The generic "$delete1" file command was leaving a directory ihandle open in the case where the file could not be deleted, leading to a delayed action bug that could cause write data not to be flushed from the disk buffer.
Modified:
ofw/core/filecmds.fth
Modified: ofw/core/filecmds.fth
==============================================================================
--- ofw/core/filecmds.fth Sat Dec 31 21:53:45 2011 (r2794)
+++ ofw/core/filecmds.fth Sat Dec 31 23:25:58 2011 (r2795)
@@ -295,8 +295,9 @@
: $delete1 ( path$ -- )
open-directory ?dup 0= abort" Can't open directory" ( name$ dir-ih )
- >r " $delete!" r@ $call-method abort" Can't delete file" ( r: dir-ih )
- r> close-dev
+ >r " $delete!" r@ $call-method ( error? r: dir-ih )
+ r> close-dev ( error? )
+ abort" Can't delete file"
;
' $delete1 to _ofdelete