diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/entry-common.S | 15 |
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 |
80 | 3: .long kgdb_handle_exception | 80 | 3: .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 |
87 | debug_trap: | 89 | debug_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 |
104 | 1: | ||
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 |