summaryrefslogtreecommitdiff
path: root/arch/h8300/kernel/entry.S
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2016-01-20 23:27:30 +0900
committerYoshinori Sato <ysato@users.sourceforge.jp>2016-01-20 23:27:30 +0900
commit96ff2d7081cfc50e5493e9a5ac7c58bfa2ea41d3 (patch)
treebbe1d1d66bbc7f52d26d25afa78c98a4c42f1f8f /arch/h8300/kernel/entry.S
parentbe13326058e79c0b3d8caea5e7d1b34286c09487 (diff)
h8300: Add KGDB support.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'arch/h8300/kernel/entry.S')
-rw-r--r--arch/h8300/kernel/entry.S18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/h8300/kernel/entry.S b/arch/h8300/kernel/entry.S
index 797dfa8ddeb2..2f045b674877 100644
--- a/arch/h8300/kernel/entry.S
+++ b/arch/h8300/kernel/entry.S
@@ -188,7 +188,11 @@ _interrupt_redirect_table:
jsr @_interrupt_entry /* NMI */
jmp @_system_call /* TRAPA #0 (System call) */
.long 0
+#if defined(CONFIG_KGDB)
+ jmp @_kgdb_trap
+#else
.long 0
+#endif
jmp @_trace_break /* TRAPA #3 (breakpoint) */
.rept INTERRUPTS-12
jsr @_interrupt_entry
@@ -405,6 +409,20 @@ _nmi:
mov.l @sp+, er0
jmp @_interrupt_entry
+#if defined(CONFIG_KGDB)
+_kgdb_trap:
+ subs #4,sp
+ SAVE_ALL
+ mov.l sp,er0
+ add.l #LRET,er0
+ mov.l er0,@(LSP,sp)
+ jsr @set_esp0
+ mov.l sp,er0
+ subs #4,er0
+ jsr @h8300_kgdb_trap
+ jmp @ret_from_exception
+#endif
+
.section .bss
_sw_ksp:
.space 4