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

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 20 09:47:09 UTC 2018


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, 
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.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list