[U-Boot] [PATCH v2 4/4] [ARM] Add KGDB support for ARM platforms

Tonny Tzeng tonny.tzeng at gmail.com
Sat Apr 17 20:18:15 CEST 2010


Signed-off-by: Tonny Tzeng <tonny.tzeng at gmail.com>
---
 arch/arm/cpu/arm720t/start.S |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S
index 90b7240..fd06298 100644
--- a/arch/arm/cpu/arm720t/start.S
+++ b/arch/arm/cpu/arm720t/start.S
@@ -459,6 +459,12 @@ lock_loop:
 	mov	r0, sp
 	.endm
 
+	.macro	bad_restore_user_regs
+	ldr	lr, [sp, #S_PSR]		@ Get SVC cpsr
+	msr	spsr_cxsf, lr
+	ldmia	sp, {r0 - pc}^			@ Restore SVC registers
+	.endm
+
 	.macro	irq_save_user_regs
 	sub	sp, sp, #S_FRAME_SIZE
 	stmia	sp, {r0 - r12}			@ Calling r0-r12
@@ -510,6 +516,7 @@ undefined_instruction:
 	get_bad_stack
 	bad_save_user_regs
 	bl	do_undefined_instruction
+	bad_restore_user_regs
 
 	.align	5
 software_interrupt:
-- 
1.6.0.6




More information about the U-Boot mailing list