Elliott Hughes | 5e7f8f1 | 2022-10-01 15:10:58 +0000 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_ASM_RISCV_PTRACE_H |
| 20 | #define _UAPI_ASM_RISCV_PTRACE_H |
| 21 | #ifndef __ASSEMBLY__ |
| 22 | #include <linux/types.h> |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 23 | #define PTRACE_GETFDPIC 33 |
| 24 | #define PTRACE_GETFDPIC_EXEC 0 |
| 25 | #define PTRACE_GETFDPIC_INTERP 1 |
Elliott Hughes | 5e7f8f1 | 2022-10-01 15:10:58 +0000 | [diff] [blame] | 26 | struct user_regs_struct { |
| 27 | unsigned long pc; |
| 28 | unsigned long ra; |
| 29 | unsigned long sp; |
| 30 | unsigned long gp; |
| 31 | unsigned long tp; |
| 32 | unsigned long t0; |
| 33 | unsigned long t1; |
| 34 | unsigned long t2; |
| 35 | unsigned long s0; |
| 36 | unsigned long s1; |
| 37 | unsigned long a0; |
| 38 | unsigned long a1; |
| 39 | unsigned long a2; |
| 40 | unsigned long a3; |
| 41 | unsigned long a4; |
| 42 | unsigned long a5; |
| 43 | unsigned long a6; |
| 44 | unsigned long a7; |
| 45 | unsigned long s2; |
| 46 | unsigned long s3; |
| 47 | unsigned long s4; |
| 48 | unsigned long s5; |
| 49 | unsigned long s6; |
| 50 | unsigned long s7; |
| 51 | unsigned long s8; |
| 52 | unsigned long s9; |
| 53 | unsigned long s10; |
| 54 | unsigned long s11; |
| 55 | unsigned long t3; |
| 56 | unsigned long t4; |
| 57 | unsigned long t5; |
| 58 | unsigned long t6; |
| 59 | }; |
| 60 | struct __riscv_f_ext_state { |
| 61 | __u32 f[32]; |
| 62 | __u32 fcsr; |
| 63 | }; |
| 64 | struct __riscv_d_ext_state { |
| 65 | __u64 f[32]; |
| 66 | __u32 fcsr; |
| 67 | }; |
| 68 | struct __riscv_q_ext_state { |
| 69 | __u64 f[64] __attribute__((aligned(16))); |
| 70 | __u32 fcsr; |
| 71 | __u32 reserved[3]; |
| 72 | }; |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 73 | struct __riscv_ctx_hdr { |
| 74 | __u32 magic; |
| 75 | __u32 size; |
| 76 | }; |
| 77 | struct __riscv_extra_ext_header { |
| 78 | __u32 __padding[129] __attribute__((aligned(16))); |
| 79 | __u32 reserved; |
| 80 | struct __riscv_ctx_hdr hdr; |
| 81 | }; |
Elliott Hughes | 5e7f8f1 | 2022-10-01 15:10:58 +0000 | [diff] [blame] | 82 | union __riscv_fp_state { |
| 83 | struct __riscv_f_ext_state f; |
| 84 | struct __riscv_d_ext_state d; |
| 85 | struct __riscv_q_ext_state q; |
| 86 | }; |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 87 | struct __riscv_v_ext_state { |
| 88 | unsigned long vstart; |
| 89 | unsigned long vl; |
| 90 | unsigned long vtype; |
| 91 | unsigned long vcsr; |
| 92 | unsigned long vlenb; |
| 93 | void * datap; |
| 94 | }; |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 95 | struct __riscv_v_regset_state { |
| 96 | unsigned long vstart; |
| 97 | unsigned long vl; |
| 98 | unsigned long vtype; |
| 99 | unsigned long vcsr; |
| 100 | unsigned long vlenb; |
| 101 | char vreg[]; |
| 102 | }; |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 103 | #define RISCV_MAX_VLENB (8192) |
Elliott Hughes | 5e7f8f1 | 2022-10-01 15:10:58 +0000 | [diff] [blame] | 104 | #endif |
| 105 | #endif |