target_syscall.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * This struct defines the way the registers are stored on the
  3. * stack during a system call.
  4. *
  5. * Reference: linux/arch/riscv/include/uapi/asm/ptrace.h
  6. */
  7. #ifndef LINUX_USER_RISCV_TARGET_SYSCALL_H
  8. #define LINUX_USER_RISCV_TARGET_SYSCALL_H
  9. struct target_pt_regs {
  10. abi_long sepc;
  11. abi_long ra;
  12. abi_long sp;
  13. abi_long gp;
  14. abi_long tp;
  15. abi_long t0;
  16. abi_long t1;
  17. abi_long t2;
  18. abi_long s0;
  19. abi_long s1;
  20. abi_long a0;
  21. abi_long a1;
  22. abi_long a2;
  23. abi_long a3;
  24. abi_long a4;
  25. abi_long a5;
  26. abi_long a6;
  27. abi_long a7;
  28. abi_long s2;
  29. abi_long s3;
  30. abi_long s4;
  31. abi_long s5;
  32. abi_long s6;
  33. abi_long s7;
  34. abi_long s8;
  35. abi_long s9;
  36. abi_long s10;
  37. abi_long s11;
  38. abi_long t3;
  39. abi_long t4;
  40. abi_long t5;
  41. abi_long t6;
  42. };
  43. #ifdef TARGET_RISCV32
  44. #define UNAME_MACHINE "riscv32"
  45. #else
  46. #define UNAME_MACHINE "riscv64"
  47. #endif
  48. #define UNAME_MINIMUM_RELEASE "4.15.0"
  49. #define TARGET_MINSIGSTKSZ 2048
  50. #define TARGET_MLOCKALL_MCL_CURRENT 1
  51. #define TARGET_MLOCKALL_MCL_FUTURE 2
  52. /* clone(flags, newsp, ptidptr, tls, ctidptr) for RISC-V */
  53. /* This comes from linux/kernel/fork.c, CONFIG_CLONE_BACKWARDS */
  54. #define TARGET_CLONE_BACKWARDS
  55. #endif