[PATCH] arm: Use bl for the boot_start_hook_0 calls to avoid JUMP11 calls.

Chris Johns chrisj at rtems.org
Tue Nov 20 10:40:38 UTC 2018


On 20/11/18 8:47 pm, Sebastian Huber wrote:
> On 20/11/2018 10:32, chrisj at rtems.org wrote:
>> From: Chris Johns <chrisj at rtems.org>
>>
>> ---
>>   bsps/arm/shared/start/start.S | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/bsps/arm/shared/start/start.S b/bsps/arm/shared/start/start.S
>> index e4df46f656..f9f2baec32 100644
>> --- a/bsps/arm/shared/start/start.S
>> +++ b/bsps/arm/shared/start/start.S
>> @@ -302,7 +302,7 @@ bsp_start_skip_hyp_svc_switch:
>>       mov    r1, r5        /* machine type number or ~0 for DT boot */
>>       mov    r2, r6        /* physical address of ATAGs or DTB */
>>   -    b    bsp_start_hook_0
>> +    bl    bsp_start_hook_0
>>     bsp_start_hook_0_done:
>>   @@ -406,7 +406,7 @@ _start:
>>         ldr    sp, =_ISR_Stack_area_end
>>       ldr    lr, =bsp_start_hook_0_done + 1
>> -    b    bsp_start_hook_0
>> +    bl    bsp_start_hook_0
>>     bsp_start_hook_0_done:
>>   
> 
> No, this breaks the start of some BSPs which start executing in a flash,

Without this change the Zynq breaks. I get a linker truncation error in dl06.exe
with some RTL patches I am working on. The 3 patches are:

 https://ftp.rtems.org/pub/rtems/people/chrisj/rtl/5/

> initialize the SDRAM in bsp_start_hook_0() and then execute from SDRAM after the
> return from bsp_start_hook_0(). The link register is loaded with an absolute
> address:
> 
> ldr    lr, =bsp_start_hook_0_done + 1
> 
> The bl uses the current program counter.

Any other ideas?

Chris



More information about the devel mailing list