[U-Boot] [PATCH 1/2] arm: fix displaying IRQ stack info

Masahiro Yamada yamada.m at jp.panasonic.com
Mon May 27 07:29:21 CEST 2013


With CONFIG_USE_IRQ and DEBUG macro defined,
display_banner function printed stack address
for IRQ and FIQ.

Global variables IRQ_STACK_START and FIQ_STACK_START
are set in interrupt_init function.

The function display_banner is called from board_init_f,
while interrupt_init is called from board_init_r.

So, display_banner always resulted in just printing initial
values of IRQ_STACK_START and FIQ_STACK_START as follows:

IRQ Stack: 0badc0de
FIQ Stack: 0badc0de

It is almost meaningless information because 0x0badc0de
is a hard-coded value in arch/arm/cpu/$(CPU)/start.S.

This commit moves the stack info display code
after interrupt_init call.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---
 arch/arm/lib/board.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 09ab4ad..34a394e 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -126,10 +126,6 @@ static int display_banner(void)
 #ifdef CONFIG_MODEM_SUPPORT
 	debug("Modem Support enabled\n");
 #endif
-#ifdef CONFIG_USE_IRQ
-	debug("IRQ Stack: %08lx\n", IRQ_STACK_START);
-	debug("FIQ Stack: %08lx\n", FIQ_STACK_START);
-#endif
 
 	return (0);
 }
@@ -650,6 +646,12 @@ void board_init_r(gd_t *id, ulong dest_addr)
 
 	 /* set up exceptions */
 	interrupt_init();
+
+#ifdef CONFIG_USE_IRQ
+	debug("IRQ Stack: %08lx\n", IRQ_STACK_START);
+	debug("FIQ Stack: %08lx\n", FIQ_STACK_START);
+#endif
+
 	/* enable exceptions */
 	enable_interrupts();
 
-- 
1.7.9.5



More information about the U-Boot mailing list