Skip to content
Commit e4bb688d authored by Scott Wood's avatar Scott Wood Committed by Paul Mackerras
Browse files

[POWERPC] bootwrapper: Fix array handling in dt_xlate_reg().



This fixes a few bugs in how dt_xlate_reg() handles address arrays:

1. copy_val() was copying into the wrong end of the array, resulting
in random stack garbage at the other end.
2. dt_xlate_reg() was getting the result from the wrong end of the array.
3. add_reg() and sub_reg() were treating the arrays as
little-endian rather than big-endian.
4. add_reg() only returned an error on a carry out of the entire
array, rather than out of the naddr portion.
5. The requested reg resource was checked to see if it exceeded
the size of the reg property, but not to see if it exceeded the
size of the buffer.

Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 3c5f6162
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment