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_SIGCONTEXT_H 20 #define _UAPI__ASM_SIGCONTEXT_H 21 #ifndef __ASSEMBLY__ 22 #include <linux/types.h> 23 struct sigcontext { 24 __u64 fault_address; 25 __u64 regs[31]; 26 __u64 sp; 27 __u64 pc; 28 __u64 pstate; 29 __u8 __reserved[4096] __attribute__((__aligned__(16))); 30 }; 31 struct _aarch64_ctx { 32 __u32 magic; 33 __u32 size; 34 }; 35 #define FPSIMD_MAGIC 0x46508001 36 struct fpsimd_context { 37 struct _aarch64_ctx head; 38 __u32 fpsr; 39 __u32 fpcr; 40 __uint128_t vregs[32]; 41 }; 42 #define ESR_MAGIC 0x45535201 43 struct esr_context { 44 struct _aarch64_ctx head; 45 __u64 esr; 46 }; 47 #define EXTRA_MAGIC 0x45585401 48 struct extra_context { 49 struct _aarch64_ctx head; 50 __u64 datap; 51 __u32 size; 52 __u32 __reserved[3]; 53 }; 54 #define SVE_MAGIC 0x53564501 55 struct sve_context { 56 struct _aarch64_ctx head; 57 __u16 vl; 58 __u16 __reserved[3]; 59 }; 60 #endif 61 #include <asm/sve_context.h> 62 #define SVE_VQ_BYTES __SVE_VQ_BYTES 63 #define SVE_VQ_MIN __SVE_VQ_MIN 64 #define SVE_VQ_MAX __SVE_VQ_MAX 65 #define SVE_VL_MIN __SVE_VL_MIN 66 #define SVE_VL_MAX __SVE_VL_MAX 67 #define SVE_NUM_ZREGS __SVE_NUM_ZREGS 68 #define SVE_NUM_PREGS __SVE_NUM_PREGS 69 #define sve_vl_valid(vl) __sve_vl_valid(vl) 70 #define sve_vq_from_vl(vl) __sve_vq_from_vl(vl) 71 #define sve_vl_from_vq(vq) __sve_vl_from_vq(vq) 72 #define SVE_SIG_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) 73 #define SVE_SIG_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) 74 #define SVE_SIG_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) 75 #define SVE_SIG_REGS_OFFSET ((sizeof(struct sve_context) + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) 76 #define SVE_SIG_ZREGS_OFFSET (SVE_SIG_REGS_OFFSET + __SVE_ZREGS_OFFSET) 77 #define SVE_SIG_ZREG_OFFSET(vq,n) (SVE_SIG_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) 78 #define SVE_SIG_ZREGS_SIZE(vq) __SVE_ZREGS_SIZE(vq) 79 #define SVE_SIG_PREGS_OFFSET(vq) (SVE_SIG_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) 80 #define SVE_SIG_PREG_OFFSET(vq,n) (SVE_SIG_REGS_OFFSET + __SVE_PREG_OFFSET(vq, n)) 81 #define SVE_SIG_PREGS_SIZE(vq) __SVE_PREGS_SIZE(vq) 82 #define SVE_SIG_FFR_OFFSET(vq) (SVE_SIG_REGS_OFFSET + __SVE_FFR_OFFSET(vq)) 83 #define SVE_SIG_REGS_SIZE(vq) (__SVE_FFR_OFFSET(vq) + __SVE_FFR_SIZE(vq)) 84 #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) 85 #endif 86