[U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite

Andrew F. Davis
2019-03-26T16:31:02Z

On 3/26/19 11:21 AM, Tom Rini wrote:
> On Tue, Mar 26, 2019 at 10:12:01AM -0500, Andrew F. Davis wrote:
>
>> The FIT image is loaded to 0x8700_0000 followed by extracting from that
>> several large images also into the 0x8x00_0000 range. Large images
>> can end up overwriting the FIT image as it is being extracted from.
>> Move the FIT load address clear out to 0x9000_0000, this will require
>> a board to have at least 256MB of DRAM, if less then more careful
>> planning will be required for that platform.
>>
>> Signed-off-by: Andrew F. Davis <afd@ti.com>
>> ---
>> include/configs/ti_armv7_common.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
>> index 1e2a62dd6f..828fb1b2a5 100644
>> --- a/include/configs/ti_armv7_common.h
>> +++ b/include/configs/ti_armv7_common.h
>> @@ -52,7 +52,7 @@
>>
>> #define DEFAULT_FIT_TI_ARGS \
>> "boot_fit=0\0" \
>> - "fit_loadaddr=0x87000000\0" \
>> + "fit_loadaddr=0x90000000\0" \
>> "fit_bootfile=fitImage\0" \
>> "update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}\0" \
>> "loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};\0" \
>
> What are the large images that are being extracted and can we just use
> them in-place instead?
>

Currently a large ramdisk in the FIT image is causing problems. The FIT
image itself determines if it is in place or not, most FIT images just
move things to spots in the 0x8x00_0000 area where they would have been
loaded in the non-FIT boot case.

The other option is making the FIT creators always step around the FIT
image itself, which they can't know where it will be loaded. In the end
the guidance I think we want to follow is anything in 0x8x00_0000 is
safe as that is where historically all the images have been loaded, FIT
being new will stay out of that area and be loaded up in the 0x9x00_0000
range out of the way.

Outside of that I agree that in-place is the way to go to save copy time
and such, but it is not what we have right now in a lot of FIT images.

Andrew