Skip to content

Commit 1dc417d

Browse files
committed
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>
1 parent 41504c3 commit 1dc417d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎arch/sh/kernel/entry-common.S‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,29 @@ debug_kernel_sw:
7979
.align 2
8080
3: .long kgdb_handle_exception
8181
#endif /* CONFIG_SH_KGDB */
82-
82+
#ifdef CONFIG_SH_STANDARD_BIOS
83+
bra debug_kernel_fw
84+
nop
85+
#endif
8386
#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */
8487

85-
8688
.align 2
8789
debug_trap:
8890
#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
8999
mov #OFF_SR, r0
90100
mov.l @(r0,r15), r0 ! get status register
91101
shll r0
92102
shll r0 ! kernel space?
93103
bt/s debug_kernel
104+
1:
94105
#endif
95106
mov.l @r15, r0 ! Restore R0 value
96107
mov.l 1f, r8

0 commit comments

Comments
 (0)