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> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@674 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
parent
305168fb73
commit
91857d3a8c
|
@ -125,7 +125,7 @@ constant sinfo.size
|
|||
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 @@ constant sinfo.size
|
|||
( ... 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!
|
||||
|
|
Loading…
Reference in New Issue