diff mbox

[U-Boot] ARM: provide a valid exception stack address for startup code

Message ID 1496909796-25932-1-git-send-email-LW@KARO-electronics.de
State Accepted
Commit 69c5d76f2fd8bf645cde9f0a8225daba25d65e01
Delegated to: Tom Rini
Headers show

Commit Message

Lothar Waßmann June 8, 2017, 8:16 a.m. UTC
Create exception stack in IRAM if available to facilitate debugging of
pre-relocation code by catching exceptions rather than stopping dead.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 arch/arm/lib/vectors.S | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Tom Rini June 12, 2017, 10:44 p.m. UTC | #1
On Thu, Jun 08, 2017 at 10:16:36AM +0200, Lothar Waßmann wrote:

> Create exception stack in IRAM if available to facilitate debugging of
> pre-relocation code by catching exceptions rather than stopping dead.
> 
> Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass June 12, 2017, 11:50 p.m. UTC | #2
On 8 June 2017 at 02:16, Lothar Waßmann <LW@karo-electronics.de> wrote:
> Create exception stack in IRAM if available to facilitate debugging of
> pre-relocation code by catching exceptions rather than stopping dead.
>
> Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
> ---
>  arch/arm/lib/vectors.S | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

But please see below.

>
> diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
> index f53b1e9..1019091 100644
> --- a/arch/arm/lib/vectors.S
> +++ b/arch/arm/lib/vectors.S
> @@ -117,7 +117,6 @@ data_abort:
>  not_used:
>  irq:
>  fiq:
> -

What is this?

>  1:
>         bl      1b                      /* hang and never return */
>
> @@ -126,7 +125,11 @@ fiq:
>  /* IRQ stack memory (calculated at run-time) + 8 bytes */
>  .globl IRQ_STACK_START_IN
>  IRQ_STACK_START_IN:
> +#ifdef IRAM_BASE_ADDR
> +       .word   IRAM_BASE_ADDR + 0x20
> +#else
>         .word   0x0badc0de
> +#endif
>
>  @
>  @ IRQ stack frame.
> --
> 2.1.4
>
Lothar Waßmann June 13, 2017, 7:06 a.m. UTC | #3
Hi,

On Mon, 12 Jun 2017 17:50:45 -0600 Simon Glass wrote:
> On 8 June 2017 at 02:16, Lothar Waßmann <LW@karo-electronics.de> wrote:
> > Create exception stack in IRAM if available to facilitate debugging of
> > pre-relocation code by catching exceptions rather than stopping dead.
> >
> > Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
> > ---
> >  arch/arm/lib/vectors.S | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> But please see below.
> 
> >
> > diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
> > index f53b1e9..1019091 100644
> > --- a/arch/arm/lib/vectors.S
> > +++ b/arch/arm/lib/vectors.S
> > @@ -117,7 +117,6 @@ data_abort:
> >  not_used:
> >  irq:
> >  fiq:
> > -
> 
> What is this?
> 
Ooops. An unintentionally deleted empty line.
Should I resend the patch, or can you fix it up when applying?


Lothar Waßmann
Simon Glass June 17, 2017, 3:41 a.m. UTC | #4
+Tom

On 13 June 2017 at 01:06, Lothar Waßmann <LW@karo-electronics.de> wrote:
> Hi,
>
> On Mon, 12 Jun 2017 17:50:45 -0600 Simon Glass wrote:
>> On 8 June 2017 at 02:16, Lothar Waßmann <LW@karo-electronics.de> wrote:
>> > Create exception stack in IRAM if available to facilitate debugging of
>> > pre-relocation code by catching exceptions rather than stopping dead.
>> >
>> > Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
>> > ---
>> >  arch/arm/lib/vectors.S | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>> But please see below.
>>
>> >
>> > diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
>> > index f53b1e9..1019091 100644
>> > --- a/arch/arm/lib/vectors.S
>> > +++ b/arch/arm/lib/vectors.S
>> > @@ -117,7 +117,6 @@ data_abort:
>> >  not_used:
>> >  irq:
>> >  fiq:
>> > -
>>
>> What is this?
>>
> Ooops. An unintentionally deleted empty line.
> Should I resend the patch, or can you fix it up when applying?

Probably the latter, but it's up to the custodian.
diff mbox

Patch

diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index f53b1e9..1019091 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -117,7 +117,6 @@  data_abort:
 not_used:
 irq:
 fiq:
-
 1:
 	bl	1b			/* hang and never return */
 
@@ -126,7 +125,11 @@  fiq:
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
+#ifdef IRAM_BASE_ADDR
+	.word   IRAM_BASE_ADDR + 0x20
+#else
 	.word	0x0badc0de
+#endif
 
 @
 @ IRQ stack frame.