
Dear John Rigby,
In message 1285775292-15060-2-git-send-email-john.rigby@linaro.org you wrote:
Fix two problems in fdt_relocate.
First, for the non relocation case current code calculates fdt blob size by subtracting the fdt address from the end
Please consider the non relocation case obsoleted. This is nothing that needs to or should have FDT support added.
of bootmap. This wrong because it assumes that the fdt_blob is located at the top (high) of the bootmap. Use the current size plus padding instead. For example if the blob is at the beginning of bootmap then the calculated size will be the size of the entire bootmapped area.
Second, fdt_relocate returns bad size info on little endian platforms because it calls be32_to_cpu on the value returned by fdt_totalsize. This is wrong because the value returned by fdt_totalsize is already cpu endian.
Signed-off-by: John Rigby john.rigby@linaro.org
common/image.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Sorry, but the commit message and the code changes don't match at all.
You say you were fixing fdt_relocate(), but you change only common/image.c which is unrelated,
Please fix the commit message.
diff --git a/common/image.c b/common/image.c index 3a2f25e..4aec9d6 100644 --- a/common/image.c +++ b/common/image.c @@ -1252,7 +1252,7 @@ int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, *of_size = of_len; } else { *of_flat_tree = fdt_blob;
of_len = (CONFIG_SYS_BOOTMAPSZ + bootmap_base) - (ulong)fdt_blob;
of_len = *of_size + (unsigned)CONFIG_SYS_FDT_PAD;
Um... what are the implications of this on other architectures?
For example, on which PowerPC systems has this been tested?
Best regards,
Wolfgang Denk