aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-12-11 06:29:28 -0500
committerPaul Mundt <lethal@linux-sh.org>2006-12-11 18:42:09 -0500
commit1dc417d0390b4897dc1d9bbf335e325baecae2c3 (patch)
treeff0a863d54b1955e19c00ec046a8afc5e5383f49 /arch/sh
parent41504c39726a7099e5a42508dd57fe561c8b4129 (diff)
sh: Fixup sh_bios() trap handling.
This was inadvertently broken when the entry.S code split up, restore the missing branch and get subsequent traps working under debug again. This manifested itself as a lockup when attempting to reload the VBR base. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/entry-common.S15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index 29136a35d7c7..fc279aeb73ab 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -79,18 +79,29 @@ debug_kernel_sw:
79 .align 2 79 .align 2
803: .long kgdb_handle_exception 803: .long kgdb_handle_exception
81#endif /* CONFIG_SH_KGDB */ 81#endif /* CONFIG_SH_KGDB */
82 82#ifdef CONFIG_SH_STANDARD_BIOS
83 bra debug_kernel_fw
84 nop
85#endif
83#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ 86#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */
84 87
85
86 .align 2 88 .align 2
87debug_trap: 89debug_trap:
88#if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) 90#if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB)
91 mov r8, r0
92 shlr2 r0
93 cmp/eq #0x3f, r0 ! sh_bios() trap
94 bf 1f
95#ifdef CONFIG_SH_KGDB
96 cmp/eq #0xff, r0 ! XXX: KGDB trap, fix for SH-2.
97 bf 1f
98#endif
89 mov #OFF_SR, r0 99 mov #OFF_SR, r0
90 mov.l @(r0,r15), r0 ! get status register 100 mov.l @(r0,r15), r0 ! get status register
91 shll r0 101 shll r0
92 shll r0 ! kernel space? 102 shll r0 ! kernel space?
93 bt/s debug_kernel 103 bt/s debug_kernel
1041:
94#endif 105#endif
95 mov.l @r15, r0 ! Restore R0 value 106 mov.l @r15, r0 ! Restore R0 value
96 mov.l 1f, r8 107 mov.l 1f, r8