kgdb.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __ASM_KGDB_H_
  2. #define __ASM_KGDB_H_
  3. #ifdef __KERNEL__
  4. #include <asm/sgidefs.h>
  5. #if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
  6. (_MIPS_ISA == _MIPS_ISA_MIPS32)
  7. #define KGDB_GDB_REG_SIZE 32
  8. #elif (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
  9. (_MIPS_ISA == _MIPS_ISA_MIPS64)
  10. #ifdef CONFIG_32BIT
  11. #define KGDB_GDB_REG_SIZE 32
  12. #else /* CONFIG_CPU_32BIT */
  13. #define KGDB_GDB_REG_SIZE 64
  14. #endif
  15. #else
  16. #error "Need to set KGDB_GDB_REG_SIZE for MIPS ISA"
  17. #endif /* _MIPS_ISA */
  18. #define BUFMAX 2048
  19. #if (KGDB_GDB_REG_SIZE == 32)
  20. #define NUMREGBYTES (90*sizeof(u32))
  21. #define NUMCRITREGBYTES (12*sizeof(u32))
  22. #else
  23. #define NUMREGBYTES (90*sizeof(u64))
  24. #define NUMCRITREGBYTES (12*sizeof(u64))
  25. #endif
  26. #define BREAK_INSTR_SIZE 4
  27. #define CACHE_FLUSH_IS_SAFE 0
  28. extern void arch_kgdb_breakpoint(void);
  29. extern int kgdb_early_setup;
  30. extern void *saved_vectors[32];
  31. extern void handle_exception(struct pt_regs *regs);
  32. extern void breakinst(void);
  33. #endif /* __KERNEL__ */
  34. #endif /* __ASM_KGDB_H_ */