kgdb.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* Kernel debugger for MN10300
  2. *
  3. * Copyright (C) 2010 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #ifndef _ASM_KGDB_H
  12. #define _ASM_KGDB_H
  13. /*
  14. * BUFMAX defines the maximum number of characters in inbound/outbound
  15. * buffers at least NUMREGBYTES*2 are needed for register packets
  16. * Longer buffer is needed to list all threads
  17. */
  18. #define BUFMAX 1024
  19. /*
  20. * Note that this register image is in a different order than the register
  21. * image that Linux produces at interrupt time.
  22. */
  23. enum regnames {
  24. GDB_FR_D0 = 0,
  25. GDB_FR_D1 = 1,
  26. GDB_FR_D2 = 2,
  27. GDB_FR_D3 = 3,
  28. GDB_FR_A0 = 4,
  29. GDB_FR_A1 = 5,
  30. GDB_FR_A2 = 6,
  31. GDB_FR_A3 = 7,
  32. GDB_FR_SP = 8,
  33. GDB_FR_PC = 9,
  34. GDB_FR_MDR = 10,
  35. GDB_FR_EPSW = 11,
  36. GDB_FR_LIR = 12,
  37. GDB_FR_LAR = 13,
  38. GDB_FR_MDRQ = 14,
  39. GDB_FR_E0 = 15,
  40. GDB_FR_E1 = 16,
  41. GDB_FR_E2 = 17,
  42. GDB_FR_E3 = 18,
  43. GDB_FR_E4 = 19,
  44. GDB_FR_E5 = 20,
  45. GDB_FR_E6 = 21,
  46. GDB_FR_E7 = 22,
  47. GDB_FR_SSP = 23,
  48. GDB_FR_MSP = 24,
  49. GDB_FR_USP = 25,
  50. GDB_FR_MCRH = 26,
  51. GDB_FR_MCRL = 27,
  52. GDB_FR_MCVF = 28,
  53. GDB_FR_FPCR = 29,
  54. GDB_FR_DUMMY0 = 30,
  55. GDB_FR_DUMMY1 = 31,
  56. GDB_FR_FS0 = 32,
  57. GDB_FR_SIZE = 64,
  58. };
  59. #define GDB_ORIG_D0 41
  60. #define NUMREGBYTES (GDB_FR_SIZE*4)
  61. static inline void arch_kgdb_breakpoint(void)
  62. {
  63. asm(".globl __arch_kgdb_breakpoint; __arch_kgdb_breakpoint: break");
  64. }
  65. extern u8 __arch_kgdb_breakpoint;
  66. #define BREAK_INSTR_SIZE 1
  67. #define CACHE_FLUSH_IS_SAFE 1
  68. #endif /* _ASM_KGDB_H */