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_PTRACE_H 20 #define _UAPI__ASM_PTRACE_H 21 #include <linux/types.h> 22 #include <asm/hwcap.h> 23 #include <asm/sve_context.h> 24 #define PSR_MODE_EL0t 0x00000000 25 #define PSR_MODE_EL1t 0x00000004 26 #define PSR_MODE_EL1h 0x00000005 27 #define PSR_MODE_EL2t 0x00000008 28 #define PSR_MODE_EL2h 0x00000009 29 #define PSR_MODE_EL3t 0x0000000c 30 #define PSR_MODE_EL3h 0x0000000d 31 #define PSR_MODE_MASK 0x0000000f 32 #define PSR_MODE32_BIT 0x00000010 33 #define PSR_F_BIT 0x00000040 34 #define PSR_I_BIT 0x00000080 35 #define PSR_A_BIT 0x00000100 36 #define PSR_D_BIT 0x00000200 37 #define PSR_SSBS_BIT 0x00001000 38 #define PSR_PAN_BIT 0x00400000 39 #define PSR_UAO_BIT 0x00800000 40 #define PSR_DIT_BIT 0x01000000 41 #define PSR_V_BIT 0x10000000 42 #define PSR_C_BIT 0x20000000 43 #define PSR_Z_BIT 0x40000000 44 #define PSR_N_BIT 0x80000000 45 #define PSR_f 0xff000000 46 #define PSR_s 0x00ff0000 47 #define PSR_x 0x0000ff00 48 #define PSR_c 0x000000ff 49 #define PTRACE_SYSEMU 31 50 #define PTRACE_SYSEMU_SINGLESTEP 32 51 #ifndef __ASSEMBLY__ 52 struct user_pt_regs { 53 __u64 regs[31]; 54 __u64 sp; 55 __u64 pc; 56 __u64 pstate; 57 }; 58 struct user_fpsimd_state { 59 __uint128_t vregs[32]; 60 __u32 fpsr; 61 __u32 fpcr; 62 __u32 __reserved[2]; 63 }; 64 struct user_hwdebug_state { 65 __u32 dbg_info; 66 __u32 pad; 67 struct { 68 __u64 addr; 69 __u32 ctrl; 70 __u32 pad; 71 } dbg_regs[16]; 72 }; 73 struct user_sve_header { 74 __u32 size; 75 __u32 max_size; 76 __u16 vl; 77 __u16 max_vl; 78 __u16 flags; 79 __u16 __reserved; 80 }; 81 #define SVE_PT_REGS_MASK (1 << 0) 82 #define SVE_PT_REGS_FPSIMD 0 83 #define SVE_PT_REGS_SVE SVE_PT_REGS_MASK 84 #define SVE_PT_VL_INHERIT ((1 << 17) >> 16) 85 #define SVE_PT_VL_ONEXEC ((1 << 18) >> 16) 86 #define SVE_PT_REGS_OFFSET ((sizeof(struct user_sve_header) + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) 87 #define SVE_PT_FPSIMD_OFFSET SVE_PT_REGS_OFFSET 88 #define SVE_PT_FPSIMD_SIZE(vq,flags) (sizeof(struct user_fpsimd_state)) 89 #define SVE_PT_SVE_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) 90 #define SVE_PT_SVE_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) 91 #define SVE_PT_SVE_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) 92 #define SVE_PT_SVE_FPSR_SIZE sizeof(__u32) 93 #define SVE_PT_SVE_FPCR_SIZE sizeof(__u32) 94 #define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET 95 #define SVE_PT_SVE_ZREGS_OFFSET (SVE_PT_REGS_OFFSET + __SVE_ZREGS_OFFSET) 96 #define SVE_PT_SVE_ZREG_OFFSET(vq,n) (SVE_PT_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) 97 #define SVE_PT_SVE_ZREGS_SIZE(vq) (SVE_PT_SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET) 98 #define SVE_PT_SVE_PREGS_OFFSET(vq) (SVE_PT_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) 99 #define SVE_PT_SVE_PREG_OFFSET(vq,n) (SVE_PT_REGS_OFFSET + __SVE_PREG_OFFSET(vq, n)) 100 #define SVE_PT_SVE_PREGS_SIZE(vq) (SVE_PT_SVE_PREG_OFFSET(vq, __SVE_NUM_PREGS) - SVE_PT_SVE_PREGS_OFFSET(vq)) 101 #define SVE_PT_SVE_FFR_OFFSET(vq) (SVE_PT_REGS_OFFSET + __SVE_FFR_OFFSET(vq)) 102 #define SVE_PT_SVE_FPSR_OFFSET(vq) ((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) 103 #define SVE_PT_SVE_FPCR_OFFSET(vq) (SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE) 104 #define SVE_PT_SVE_SIZE(vq,flags) ((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE - SVE_PT_SVE_OFFSET + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) 105 #define SVE_PT_SIZE(vq,flags) (((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) : SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags)) 106 struct user_pac_mask { 107 __u64 data_mask; 108 __u64 insn_mask; 109 }; 110 struct user_pac_address_keys { 111 __uint128_t apiakey; 112 __uint128_t apibkey; 113 __uint128_t apdakey; 114 __uint128_t apdbkey; 115 }; 116 struct user_pac_generic_keys { 117 __uint128_t apgakey; 118 }; 119 #endif 120 #endif 121