configs: ti: Move FIT image load address to avoid overwrite
PATCH 1/1 configs: ti: Move FIT image load address to avoid overwrite
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.
--- include/configs/ti_armv7_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/ti_armv7_common.h +1 -1
@@ -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" \
Signature · 1 line
2.21.0
PATCH 1/1 configs: ti: Move FIT image load address to avoid overwrite
Quoted 17 lines · Andrew F. Davis
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 <[email protected]>--- include/configs/ti_armv7_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/configs/ti_armv7_common.h +0
-0
include/configs/ti_armv7_common.h line 58
Quoted 8 lines
include/configs/ti_armv7_common.h +1
-1@@ -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?
Signature · 8 lines
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>
PATCH 1/1 configs: ti: Move FIT image load address to avoid overwrite
Quoted 20 lines · Tom Rini
Quoted 18 lines · Andrew F. Davis
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 <[email protected]>--- include/configs/ti_armv7_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/configs/ti_armv7_common.h +0
-0@@ -52,7 +52,7 @@
Quoted 11 lines
include/configs/ti_armv7_common.h line 58
Quoted 7 lines
include/configs/ti_armv7_common.h +1
-1#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
Quoted 8 lines · Andrew F. Davis
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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>