ptrace.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Based on arch/arm/include/asm/ptrace.h
  3. *
  4. * Copyright (C) 1996-2003 Russell King
  5. * Copyright (C) 2012 ARM Ltd.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _UAPI__ASM_PTRACE_H
  20. #define _UAPI__ASM_PTRACE_H
  21. #include <linux/types.h>
  22. #include <asm/hwcap.h>
  23. /*
  24. * PSR bits
  25. */
  26. #define PSR_MODE_EL0t 0x00000000
  27. #define PSR_MODE_EL1t 0x00000004
  28. #define PSR_MODE_EL1h 0x00000005
  29. #define PSR_MODE_EL2t 0x00000008
  30. #define PSR_MODE_EL2h 0x00000009
  31. #define PSR_MODE_EL3t 0x0000000c
  32. #define PSR_MODE_EL3h 0x0000000d
  33. #define PSR_MODE_MASK 0x0000000f
  34. /* AArch32 CPSR bits */
  35. #define PSR_MODE32_BIT 0x00000010
  36. /* AArch64 SPSR bits */
  37. #define PSR_F_BIT 0x00000040
  38. #define PSR_I_BIT 0x00000080
  39. #define PSR_A_BIT 0x00000100
  40. #define PSR_D_BIT 0x00000200
  41. #define PSR_PAN_BIT 0x00400000
  42. #define PSR_UAO_BIT 0x00800000
  43. #define PSR_Q_BIT 0x08000000
  44. #define PSR_V_BIT 0x10000000
  45. #define PSR_C_BIT 0x20000000
  46. #define PSR_Z_BIT 0x40000000
  47. #define PSR_N_BIT 0x80000000
  48. /*
  49. * Groups of PSR bits
  50. */
  51. #define PSR_f 0xff000000 /* Flags */
  52. #define PSR_s 0x00ff0000 /* Status */
  53. #define PSR_x 0x0000ff00 /* Extension */
  54. #define PSR_c 0x000000ff /* Control */
  55. #ifndef __ASSEMBLY__
  56. /*
  57. * User structures for general purpose, floating point and debug registers.
  58. */
  59. struct user_pt_regs {
  60. __u64 regs[31];
  61. __u64 sp;
  62. __u64 pc;
  63. __u64 pstate;
  64. };
  65. struct user_fpsimd_state {
  66. __uint128_t vregs[32];
  67. __u32 fpsr;
  68. __u32 fpcr;
  69. __u32 __reserved[2];
  70. };
  71. struct user_hwdebug_state {
  72. __u32 dbg_info;
  73. __u32 pad;
  74. struct {
  75. __u64 addr;
  76. __u32 ctrl;
  77. __u32 pad;
  78. } dbg_regs[16];
  79. };
  80. #endif /* __ASSEMBLY__ */
  81. #endif /* _UAPI__ASM_PTRACE_H */