All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite
@ 2019-03-26 15:12 Andrew F. Davis
  2019-03-26 16:21 ` Tom Rini
  2019-03-29 20:24 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew F. Davis @ 2019-03-26 15:12 UTC (permalink / raw)
  To: u-boot

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" \
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite
  2019-03-26 15:12 [U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite Andrew F. Davis
@ 2019-03-26 16:21 ` Tom Rini
  2019-03-26 16:31   ` Andrew F. Davis
  2019-03-29 20:24 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2019-03-26 16:21 UTC (permalink / raw)
  To: u-boot

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?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190326/789b07b8/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite
  2019-03-26 16:21 ` Tom Rini
@ 2019-03-26 16:31   ` Andrew F. Davis
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew F. Davis @ 2019-03-26 16:31 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] configs: ti: Move FIT image load address to avoid overwrite
  2019-03-26 15:12 [U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite Andrew F. Davis
  2019-03-26 16:21 ` Tom Rini
@ 2019-03-29 20:24 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2019-03-29 20:24 UTC (permalink / raw)
  To: u-boot

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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190329/b06eeeb3/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-29 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 15:12 [U-Boot] [PATCH] configs: ti: Move FIT image load address to avoid overwrite Andrew F. Davis
2019-03-26 16:21 ` Tom Rini
2019-03-26 16:31   ` Andrew F. Davis
2019-03-29 20:24 ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.