diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-07-29 16:58:53 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-30 16:54:42 -0400 |
commit | 8854700115ecf8aa6f087aa915b7b6cf18090d39 (patch) | |
tree | 3338d7aed80d715e0576783e0fecf30cc507a9a7 /include/asm-mips | |
parent | 8d60a903d986ffa26c41f0092320a3b9da20bfaf (diff) |
[MIPS] kgdb: add arch support for the kernel's kgdb core
The new kgdb architecture specific handler registers and unregisters
dynamically for exceptions depending on when you configure a kgdb I/O
driver.
Aside from initializing the exceptions earlier in the boot process,
kgdb should have no impact on a device when it is compiled in so long
as an I/O module is not configured for use.
There have been quite a number of contributors during the existence of
this patch (see arch/mips/kernel/kgdb.c). Most recently Jason
re-wrote the mips kgdb logic to use the die notification handlers.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/kdebug.h | 14 | ||||
-rw-r--r-- | include/asm-mips/kgdb.h | 44 |
2 files changed, 57 insertions, 1 deletions
diff --git a/include/asm-mips/kdebug.h b/include/asm-mips/kdebug.h index 6ece1b037665..5bf62aafc890 100644 --- a/include/asm-mips/kdebug.h +++ b/include/asm-mips/kdebug.h | |||
@@ -1 +1,13 @@ | |||
1 | #include <asm-generic/kdebug.h> | 1 | #ifndef _ASM_MIPS_KDEBUG_H |
2 | #define _ASM_MIPS_KDEBUG_H | ||
3 | |||
4 | #include <linux/notifier.h> | ||
5 | |||
6 | enum die_val { | ||
7 | DIE_OOPS = 1, | ||
8 | DIE_FP, | ||
9 | DIE_TRAP, | ||
10 | DIE_RI, | ||
11 | }; | ||
12 | |||
13 | #endif /* _ASM_MIPS_KDEBUG_H */ | ||
diff --git a/include/asm-mips/kgdb.h b/include/asm-mips/kgdb.h new file mode 100644 index 000000000000..48223b09396c --- /dev/null +++ b/include/asm-mips/kgdb.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef __ASM_KGDB_H_ | ||
2 | #define __ASM_KGDB_H_ | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <asm/sgidefs.h> | ||
7 | |||
8 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \ | ||
9 | (_MIPS_ISA == _MIPS_ISA_MIPS32) | ||
10 | |||
11 | #define KGDB_GDB_REG_SIZE 32 | ||
12 | |||
13 | #elif (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \ | ||
14 | (_MIPS_ISA == _MIPS_ISA_MIPS64) | ||
15 | |||
16 | #ifdef CONFIG_32BIT | ||
17 | #define KGDB_GDB_REG_SIZE 32 | ||
18 | #else /* CONFIG_CPU_32BIT */ | ||
19 | #define KGDB_GDB_REG_SIZE 64 | ||
20 | #endif | ||
21 | #else | ||
22 | #error "Need to set KGDB_GDB_REG_SIZE for MIPS ISA" | ||
23 | #endif /* _MIPS_ISA */ | ||
24 | |||
25 | #define BUFMAX 2048 | ||
26 | #if (KGDB_GDB_REG_SIZE == 32) | ||
27 | #define NUMREGBYTES (90*sizeof(u32)) | ||
28 | #define NUMCRITREGBYTES (12*sizeof(u32)) | ||
29 | #else | ||
30 | #define NUMREGBYTES (90*sizeof(u64)) | ||
31 | #define NUMCRITREGBYTES (12*sizeof(u64)) | ||
32 | #endif | ||
33 | #define BREAK_INSTR_SIZE 4 | ||
34 | #define CACHE_FLUSH_IS_SAFE 0 | ||
35 | |||
36 | extern void arch_kgdb_breakpoint(void); | ||
37 | extern int kgdb_early_setup; | ||
38 | extern void *saved_vectors[32]; | ||
39 | extern void handle_exception(struct pt_regs *regs); | ||
40 | extern void breakinst(void); | ||
41 | |||
42 | #endif /* __KERNEL__ */ | ||
43 | |||
44 | #endif /* __ASM_KGDB_H_ */ | ||