[U-Boot] [PATCH 01/10] ARM: move interrupt_init to before relocation

Albert ARIBAUD albert.u.boot at aribaud.net
Wed May 15 22:26:08 CEST 2013


Hi Rob,

On Wed, 15 May 2013 14:56:07 -0500, Rob Herring <robherring2 at gmail.com>
wrote:

> From: Rob Herring <rob.herring at calxeda.com>
> 
> interrupt_init also sets up the abort stack, but is not setup before
> relocation. So any aborts during relocation will hang and not print out
> any useful information. Fix this by moving the interrupt_init to after
> the stack setup in board_init_f.
> 
> Signed-off-by: Rob Herring <rob.herring at calxeda.com>
> ---
>  arch/arm/lib/board.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 09ab4ad..6dbe7e2 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -447,6 +447,7 @@ void board_init_f(ulong bootflag)
>  	addr_sp += 128;	/* leave 32 words for abort-stack   */
>  	gd->irq_sp = addr_sp;
>  #endif
> +	interrupt_init();
>  
>  	debug("New Stack Pointer is: %08lx\n", addr_sp);
>  

I fail to understand how this is even supposed to work through
relocation: exception vectors are not relocated, so if they work before
relocation, then they won't work any more afterward unless some code is
added to relocate them.

Also: if this patch is moving interrupt_init(), then where is the line
where a call to interrupt_init() is removed?

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list