ptrace.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
  2. /*
  3. * Copyright (C) 2012 Regents of the University of California
  4. */
  5. #ifndef _UAPI_ASM_RISCV_PTRACE_H
  6. #define _UAPI_ASM_RISCV_PTRACE_H
  7. #ifndef __ASSEMBLY__
  8. #include <linux/types.h>
  9. /*
  10. * User-mode register state for core dumps, ptrace, sigcontext
  11. *
  12. * This decouples struct pt_regs from the userspace ABI.
  13. * struct user_regs_struct must form a prefix of struct pt_regs.
  14. */
  15. struct user_regs_struct {
  16. unsigned long pc;
  17. unsigned long ra;
  18. unsigned long sp;
  19. unsigned long gp;
  20. unsigned long tp;
  21. unsigned long t0;
  22. unsigned long t1;
  23. unsigned long t2;
  24. unsigned long s0;
  25. unsigned long s1;
  26. unsigned long a0;
  27. unsigned long a1;
  28. unsigned long a2;
  29. unsigned long a3;
  30. unsigned long a4;
  31. unsigned long a5;
  32. unsigned long a6;
  33. unsigned long a7;
  34. unsigned long s2;
  35. unsigned long s3;
  36. unsigned long s4;
  37. unsigned long s5;
  38. unsigned long s6;
  39. unsigned long s7;
  40. unsigned long s8;
  41. unsigned long s9;
  42. unsigned long s10;
  43. unsigned long s11;
  44. unsigned long t3;
  45. unsigned long t4;
  46. unsigned long t5;
  47. unsigned long t6;
  48. };
  49. struct __riscv_f_ext_state {
  50. __u32 f[32];
  51. __u32 fcsr;
  52. };
  53. struct __riscv_d_ext_state {
  54. __u64 f[32];
  55. __u32 fcsr;
  56. };
  57. struct __riscv_q_ext_state {
  58. __u64 f[64] __attribute__((aligned(16)));
  59. __u32 fcsr;
  60. /*
  61. * Reserved for expansion of sigcontext structure. Currently zeroed
  62. * upon signal, and must be zero upon sigreturn.
  63. */
  64. __u32 reserved[3];
  65. };
  66. union __riscv_fp_state {
  67. struct __riscv_f_ext_state f;
  68. struct __riscv_d_ext_state d;
  69. struct __riscv_q_ext_state q;
  70. };
  71. #ifdef CONFIG_VLEN_256
  72. struct __riscv_vblen {
  73. __uint128_t v[2];
  74. };
  75. #endif
  76. struct __riscv_v_state {
  77. #ifdef CONFIG_VLEN_256
  78. struct __riscv_vblen v[32];
  79. #else
  80. __uint128_t v[32];
  81. #endif
  82. unsigned long vstart;
  83. unsigned long vxsat;
  84. unsigned long vxrm;
  85. unsigned long vl;
  86. unsigned long vtype;
  87. };
  88. #endif /* __ASSEMBLY__ */
  89. #endif /* _UAPI_ASM_RISCV_PTRACE_H */