kgdb.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * PA-RISC KGDB support
  4. *
  5. * Copyright (c) 2019 Sven Schnelle <[email protected]>
  6. *
  7. */
  8. #ifndef __PARISC_KGDB_H__
  9. #define __PARISC_KGDB_H__
  10. #define BREAK_INSTR_SIZE 4
  11. #define PARISC_KGDB_COMPILED_BREAK_INSN 0x3ffc01f
  12. #define PARISC_KGDB_BREAK_INSN 0x3ffa01f
  13. #define NUMREGBYTES sizeof(struct parisc_gdb_regs)
  14. #define BUFMAX 4096
  15. #define CACHE_FLUSH_IS_SAFE 1
  16. #ifndef __ASSEMBLY__
  17. static inline void arch_kgdb_breakpoint(void)
  18. {
  19. asm(".word %0" : : "i"(PARISC_KGDB_COMPILED_BREAK_INSN) : "memory");
  20. }
  21. struct parisc_gdb_regs {
  22. unsigned long gpr[32];
  23. unsigned long sar;
  24. unsigned long iaoq_f;
  25. unsigned long iasq_f;
  26. unsigned long iaoq_b;
  27. unsigned long iasq_b;
  28. unsigned long eiem;
  29. unsigned long iir;
  30. unsigned long isr;
  31. unsigned long ior;
  32. unsigned long ipsw;
  33. unsigned long __unused0;
  34. unsigned long sr4;
  35. unsigned long sr0;
  36. unsigned long sr1;
  37. unsigned long sr2;
  38. unsigned long sr3;
  39. unsigned long sr5;
  40. unsigned long sr6;
  41. unsigned long sr7;
  42. unsigned long cr0;
  43. unsigned long pid1;
  44. unsigned long pid2;
  45. unsigned long scrccr;
  46. unsigned long pid3;
  47. unsigned long pid4;
  48. unsigned long cr24;
  49. unsigned long cr25;
  50. unsigned long cr26;
  51. unsigned long cr27;
  52. unsigned long cr28;
  53. unsigned long cr29;
  54. unsigned long cr30;
  55. u64 fr[32];
  56. };
  57. #endif
  58. #endif