h8300: KGDB support
PATCH RESEND 1/1 h8300: KGDB support
Add KGDB helper for h8300.
Signed-off-by Yoshinori Sato <[email protected]>
--- arch/h8300/Kconfig | 1 + arch/h8300/include/asm/kgdb.h | 45 ++++++++++++++ arch/h8300/kernel/Makefile | 2 + arch/h8300/kernel/entry.S | 18 ++++++ arch/h8300/kernel/kgdb.c | 135 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 201 insertions(+) create mode 100644 arch/h8300/include/asm/kgdb.h create mode 100644 arch/h8300/kernel/kgdb.c
arch/h8300/Kconfig +1 -0
@@ -17,6 +17,7 @@ config H8300 select HAVE_MEMBLOCK select HAVE_DMA_ATTRS select CLKSRC_OF + select HAVE_ARCH_KGDB config RWSEM_GENERIC_SPINLOCK def_bool y
arch/h8300/include/asm/kgdb.h new file +45 -0
45 lines not on this page · raw message
arch/h8300/kernel/Makefile +2 -0
@@ -17,3 +17,5 @@ obj-$(CONFIG_H8S_SIM) += sim-console.o obj-$(CONFIG_CPU_H8300H) += ptrace_h.o obj-$(CONFIG_CPU_H8S) += ptrace_s.o + +obj-$(CONFIG_KGDB) += kgdb.o
arch/h8300/kernel/entry.S +18 -0
@@ -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
arch/h8300/kernel/kgdb.c new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.6.1