j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: Wed Feb 3 18:54:14 2010 New Revision: 674 URL: http://tracker.coreboot.org/trac/openbios/changeset/674
Log: pathres: consistently encode unit address on 64bit target
This change fixes node unit address matching on arch where cell is not 4 byte integer (tested with sparc64.)
Since we encode "reg" property chunks with encode-int we need to use the same encoding while preparing unit phys addr for comparison at path resolution time.
- (exact-match): calculate phys addr length using 4 byte member encoding with /l* not cells
- find-child: encode phys addr components similar to encode-int with 4 byte stores
Signed-off-by: Igor V. Kovalenko igor.v.kovalenko@gmail.com Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/forth/device/pathres.fs
Modified: trunk/openbios-devel/forth/device/pathres.fs ============================================================================== --- trunk/openbios-devel/forth/device/pathres.fs Sun Jan 31 13:16:46 2010 (r673) +++ trunk/openbios-devel/forth/device/pathres.fs Wed Feb 3 18:54:14 2010 (r674) @@ -125,7 +125,7 @@ r@ common-match
\ b) UNIT_PHYS nonempty? - r@ >si.unit_phys_len @ cells ?dup if + r@ >si.unit_phys_len @ /l* ?dup if \ check if unit_phys matches " reg" r@ >si.child @ get-package-property if -3 throw then ( unitbytes propaddr proplen ) @@ -191,7 +191,7 @@ ( ... a_lo ... a_hi olddepth n ) r@ >si.unit_phys >r begin 1- dup 0>= while - rot r> dup na1+ >r ! + rot r> dup la1+ >r l!-be repeat r> 2drop depth!