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 8 #ifndef LINUX_USER_RISCV_TARGET_SYSCALL_H 9 #define LINUX_USER_RISCV_TARGET_SYSCALL_H 10 11 struct target_pt_regs { 12 abi_long sepc; 13 abi_long ra; 14 abi_long sp; 15 abi_long gp; 16 abi_long tp; 17 abi_long t0; 18 abi_long t1; 19 abi_long t2; 20 abi_long s0; 21 abi_long s1; 22 abi_long a0; 23 abi_long a1; 24 abi_long a2; 25 abi_long a3; 26 abi_long a4; 27 abi_long a5; 28 abi_long a6; 29 abi_long a7; 30 abi_long s2; 31 abi_long s3; 32 abi_long s4; 33 abi_long s5; 34 abi_long s6; 35 abi_long s7; 36 abi_long s8; 37 abi_long s9; 38 abi_long s10; 39 abi_long s11; 40 abi_long t3; 41 abi_long t4; 42 abi_long t5; 43 abi_long t6; 44 }; 45 46 #ifdef TARGET_RISCV32 47 #define UNAME_MACHINE "riscv32" 48 #else 49 #define UNAME_MACHINE "riscv64" 50 #endif 51 #define UNAME_MINIMUM_RELEASE "4.15.0" 52 53 #define TARGET_MINSIGSTKSZ 2048 54 #define TARGET_MCL_CURRENT 1 55 #define TARGET_MCL_FUTURE 2 56 #define TARGET_MCL_ONFAULT 4 57 58 /* clone(flags, newsp, ptidptr, tls, ctidptr) for RISC-V */ 59 /* This comes from linux/kernel/fork.c, CONFIG_CLONE_BACKWARDS */ 60 #define TARGET_CLONE_BACKWARDS 61 62 #endif 63