public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] BUGFIX: arm: armv7: data abort in get_bad_stack_swi
@ 2013-04-04  4:52 Tetsuyuki Kobayashi
  2013-04-04  6:21 ` Albert ARIBAUD
  2013-04-05  1:45 ` [U-Boot] [PATCH v2] BUGFIX: arm: " Tetsuyuki Kobayashi
  0 siblings, 2 replies; 10+ messages in thread
From: Tetsuyuki Kobayashi @ 2013-04-04  4:52 UTC (permalink / raw)
  To: u-boot

When swi instruction is executed, it is expected to get message
"software interrupt" in console and dump registers and reboot, as
do_software_interrupt() in arch/arm/lib/interrupts.c.
Actually it causes data abort in get_bad_stack_swi macro in
arch/arm/cpu/v7/start.S.
This patch fixes this problem.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
Hello, I found this bug on KZM-A9-GT board (aka. kzm9g) on
v2013.04-rc2. And tested this patch on the board.
I found the same typo in arch/arm/cpu/{arm1136,arm1176,pxa}/start.S.

 arch/arm/cpu/armv7/start.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 36a4c3c..9bf950b 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -465,7 +465,7 @@ ENDPROC(cpu_init_crit)
 						@ spots for abort stack
 	str	lr, [r0]			@ save caller lr in position 0
 						@ of saved stack
-	mrs	r0, spsr			@ get the spsr
+	mrs	lr, spsr			@ get the spsr
 	str	lr, [r0, #4]			@ save spsr in position 1 of
 						@ saved stack
 	ldr	r0, [r13]			@ restore r0
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-13 11:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04  4:52 [U-Boot] [PATCH] BUGFIX: arm: armv7: data abort in get_bad_stack_swi Tetsuyuki Kobayashi
2013-04-04  6:21 ` Albert ARIBAUD
2013-04-04  6:24   ` Albert ARIBAUD
2013-04-04 10:29     ` Tetsuyuki Kobayashi
2013-04-05  1:45 ` [U-Boot] [PATCH v2] BUGFIX: arm: " Tetsuyuki Kobayashi
2013-04-05  7:04   ` Albert ARIBAUD
2013-04-05 10:04     ` Tetsuyuki Kobayashi
2013-04-05 10:12   ` [U-Boot] [PATCH v3] " Tetsuyuki Kobayashi
2013-04-11  9:47     ` Tetsuyuki Kobayashi
2013-04-13 11:37     ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox