BL3x loading address

Is there a way to change BL31 destination address?
As I know BL3x images are loaded by BL2 code.
So, Generally cannot move this destination.

Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: **0x05100000**, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00067000
NOTICE:  BL3-1: v1.0(release):a625749
NOTICE:  BL3-1: Built : 11:25:15, Aug 25 2017
[BL31]: GXL CPU setup!
NOTICE:  BL31: BL33 decompress pass
mpu_config_enable:ok

why u need change this one ! plz share your problem!

I’m doing build up u-boot based application.
I want to put all boot loader code into front of memory.
Because the application need continuously memory area.
And need access the memory by physical address.

its boot loaders hard-coded blobs! i think difficult to change something!

I checked some more with the BL31 binary file.
BL31 bin file has loading target address at it’s header area.
I modified it by HEX editor and built the boot loader image.
It shows like below. (Changed!!! But…)

Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x03100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00067000

But nothing is going after image load. Boot loader got hang up.
Maybe BL2 image has call routine for BL31 and it has relative addressing(RIP). (Not absolute)
I couldn’t found any 0x05100000 address in BL2 image. (or has code encrypted already?)
Anyway, It looks not easy before supporting from AMLogic.

Thanks hyphop. :slight_smile: