From: Tonny Tzeng Date: Sun, 18 Apr 2010 02:18:15 +0800 Subject: [U-Boot] [PATCH v2 4/4] [ARM] Add KGDB support for ARM platforms In-Reply-To: <1271528127.17655.86.camel@localhost.localdomain> References: <1271524811.17655.32.camel@localhost.localdomain> <1271527807.17655.82.camel@localhost.localdomain> <1271527979.17655.85.camel@localhost.localdomain> <1271528127.17655.86.camel@localhost.localdomain> Message-ID: <1271528295.17655.90.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Tonny Tzeng --- 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