Author: quozl
Date: Fri Apr 12 05:43:39 2013
New Revision: 3641
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3641
Log:
disklabel - fix no access to primary partition if extended partition is empty, workaround is to set the primary partition bootable, cause in the partition finder which when recursing reused the same buffer for the extended partition, destroying the in-memory copy of the primary parition; fix is to use a separate buffer in the recursion. Reported by Vladimir Serbinenko.
Modified:
ofw/disklabel/common.fth
ofw/disklabel/methods.fth
ofw/fs/fatfs/partition.fth
Modified: ofw/disklabel/common.fth
==============================================================================
--- ofw/disklabel/common.fth Fri Apr 12 04:38:21 2013 (r3640)
+++ ofw/disklabel/common.fth Fri Apr 12 05:43:39 2013 (r3641)
@@ -19,6 +19,9 @@
0 instance value sector-offset
+: sector-alloc ( -- ) /sector alloc-mem to sector-buf ;
+: sector-free ( -- ) sector-buf /sector free-mem ;
+
\ For ISO-9660 CD-ROMs, ISO-9660 flash or hard drives, and GPT
: read-hw-sector ( sector# -- )
sector-offset + /sector um* " seek" $call-parent abort" Seek failed"
Modified: ofw/disklabel/methods.fth
==============================================================================
--- ofw/disklabel/methods.fth Fri Apr 12 04:38:21 2013 (r3640)
+++ ofw/disklabel/methods.fth Fri Apr 12 05:43:39 2013 (r3641)
@@ -233,7 +233,7 @@
: try-open ( -- )
" block-size" $call-parent to /sector
- /sector alloc-mem to sector-buf
+ sector-alloc
parse-partition ( )
select-partition ( )
@@ -248,7 +248,7 @@
\ flags around, we just abort when a fatal error occurs. The "catch"
\ intercepts the abort and returns the appropriate flag value.
: open ( -- okay? ) ['] try-open catch 0= ;
-: close ( -- ) sector-buf if sector-buf /sector free-mem then ;
+: close ( -- ) sector-buf if sector-free then ;
: size ( -- d ) size-low size-high ;
: load ( adr -- len )
\ This load method is used only for type 41 (IBM "PREP") partitions
Modified: ofw/fs/fatfs/partition.fth
==============================================================================
--- ofw/fs/fatfs/partition.fth Fri Apr 12 04:38:21 2013 (r3640)
+++ ofw/fs/fatfs/partition.fth Fri Apr 12 05:43:39 2013 (r3641)
@@ -90,7 +90,10 @@
dup 5 = over h# f = or if \ extended partition ( ... n,s,b,t )
2drop nip ( ... s )
extended-offset dup 0= if over to extended-offset then
- + dup read-sector recurse drop ( ... )
+ + dup ( ... es )
+ sector-buf >r sector-alloc ( ... es )
+ read-sector recurse drop ( ... )
+ sector-free r> to sector-buf ( ... )
else \ Ordinary partition ( ... n,s,b,t )
suitable? if ( ... n,s,b,t )
to partition-type drop ( ... n,s )
Author: quozl
Date: Tue Apr 9 05:48:45 2013
New Revision: 3638
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3638
Log:
fatfs, skip volume label directory entries, some filesystem instances have them and they remain after repair.
Modified:
ofw/fs/fatfs/lookup.fth
Modified: ofw/fs/fatfs/lookup.fth
==============================================================================
--- ofw/fs/fatfs/lookup.fth Tue Apr 9 05:44:57 2013 (r3637)
+++ ofw/fs/fatfs/lookup.fth Tue Apr 9 05:48:45 2013 (r3638)
@@ -238,7 +238,9 @@
\ Set the directory entry address; exit if set-dirent fails
search-offset @ search-cl @ search-dev @ set-dirent if 2 exit then
- de_attributes c@ h# f = if 0 exit then
+ de_attributes c@ h# f = if 0 exit then \ ignore a VFAT long file name
+
+ de_attributes c@ at_vollab and if 0 exit then \ ignore a volume label
de_name c@ case
0 of 1 endof \ No more valid entries
Author: quozl
Date: Tue Apr 2 04:46:16 2013
New Revision: 3633
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3633
Log:
OLPC - libertas, reduce the scan time to 30ms per channel for an active scan, and raise it to 110ms per channel for a passive scan, based on a kernel patch provided by Marvell.
Modified:
dev/libertas.fth
Modified: dev/libertas.fth
==============================================================================
--- dev/libertas.fth Thu Mar 28 12:34:12 2013 (r3632)
+++ dev/libertas.fth Tue Apr 2 04:46:16 2013 (r3633)
@@ -1166,9 +1166,10 @@
dup channel-is-5ghz? if 1 else 0 then ( channel# band# )
+xb \ Band #
+xb \ Channel #
- scan-type +xb \ Scan type - 0:active or 1:passive
- d# 100 +xw \ Min scan time
- d# 100 +xw \ Max scan time ( r: payload' )
+ scan-type dup +xb \ Scan type - 0:active or 1:passive
+ if d# 30 else d# 110 then
+ dup +xw \ Min scan time
+ +xw \ Max scan time ( r: payload' )
'x r@ - r> 2- le-w! ( )
;