Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [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_X86_SIGCONTEXT_H |
| 20 | #define _UAPI_ASM_X86_SIGCONTEXT_H |
| 21 | #include <linux/compiler.h> |
| 22 | #include <linux/types.h> |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 23 | #define FP_XSTATE_MAGIC1 0x46505853U |
| 24 | #define FP_XSTATE_MAGIC2 0x46505845U |
| 25 | #define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) |
| 26 | struct _fpx_sw_bytes { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __u32 magic1; |
| 28 | __u32 extended_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 29 | __u64 xfeatures; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 30 | __u32 xstate_size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u32 padding[7]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 32 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 33 | struct _fpreg { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 34 | __u16 significand[4]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 35 | __u16 exponent; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 36 | }; |
| 37 | struct _fpxreg { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 38 | __u16 significand[4]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 39 | __u16 exponent; |
| 40 | __u16 padding[3]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 41 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 42 | struct _xmmreg { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 | __u32 element[4]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 44 | }; |
| 45 | #define X86_FXSR_MAGIC 0x0000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 46 | struct _fpstate_32 { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 47 | __u32 cw; |
| 48 | __u32 sw; |
| 49 | __u32 tag; |
| 50 | __u32 ipoff; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 51 | __u32 cssel; |
| 52 | __u32 dataoff; |
| 53 | __u32 datasel; |
| 54 | struct _fpreg _st[8]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 55 | __u16 status; |
| 56 | __u16 magic; |
| 57 | __u32 _fxsr_env[6]; |
| 58 | __u32 mxcsr; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 59 | __u32 reserved; |
| 60 | struct _fpxreg _fxsr_st[8]; |
| 61 | struct _xmmreg _xmm[8]; |
| 62 | union { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 63 | __u32 padding1[44]; |
| 64 | __u32 padding[44]; |
| 65 | }; |
| 66 | union { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 67 | __u32 padding2[12]; |
| 68 | struct _fpx_sw_bytes sw_reserved; |
| 69 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 70 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 71 | struct _fpstate_64 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 72 | __u16 cwd; |
| 73 | __u16 swd; |
| 74 | __u16 twd; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 75 | __u16 fop; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | __u64 rip; |
| 77 | __u64 rdp; |
| 78 | __u32 mxcsr; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 79 | __u32 mxcsr_mask; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 | __u32 st_space[32]; |
| 81 | __u32 xmm_space[64]; |
| 82 | __u32 reserved2[12]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 83 | union { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | __u32 reserved3[12]; |
| 85 | struct _fpx_sw_bytes sw_reserved; |
| 86 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 87 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 88 | #ifdef __i386__ |
| 89 | #define _fpstate _fpstate_32 |
| 90 | #else |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 91 | #define _fpstate _fpstate_64 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 92 | #endif |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 93 | struct _header { |
| 94 | __u64 xfeatures; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | __u64 reserved1[2]; |
| 96 | __u64 reserved2[5]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 97 | }; |
| 98 | struct _ymmh_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | __u32 ymmh_space[64]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 100 | }; |
| 101 | struct _xstate { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 102 | struct _fpstate fpstate; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 103 | struct _header xstate_hdr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 104 | struct _ymmh_state ymmh; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 105 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 106 | struct sigcontext_32 { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 107 | __u16 gs, __gsh; |
| 108 | __u16 fs, __fsh; |
| 109 | __u16 es, __esh; |
| 110 | __u16 ds, __dsh; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 111 | __u32 di; |
| 112 | __u32 si; |
| 113 | __u32 bp; |
| 114 | __u32 sp; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 115 | __u32 bx; |
| 116 | __u32 dx; |
| 117 | __u32 cx; |
| 118 | __u32 ax; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 119 | __u32 trapno; |
| 120 | __u32 err; |
| 121 | __u32 ip; |
| 122 | __u16 cs, __csh; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 123 | __u32 flags; |
| 124 | __u32 sp_at_signal; |
| 125 | __u16 ss, __ssh; |
| 126 | __u32 fpstate; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 127 | __u32 oldmask; |
| 128 | __u32 cr2; |
| 129 | }; |
| 130 | struct sigcontext_64 { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 131 | __u64 r8; |
| 132 | __u64 r9; |
| 133 | __u64 r10; |
| 134 | __u64 r11; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 135 | __u64 r12; |
| 136 | __u64 r13; |
| 137 | __u64 r14; |
| 138 | __u64 r15; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 139 | __u64 di; |
| 140 | __u64 si; |
| 141 | __u64 bp; |
| 142 | __u64 bx; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 143 | __u64 dx; |
| 144 | __u64 ax; |
| 145 | __u64 cx; |
| 146 | __u64 sp; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 147 | __u64 ip; |
| 148 | __u64 flags; |
| 149 | __u16 cs; |
| 150 | __u16 gs; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 151 | __u16 fs; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 152 | __u16 ss; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 153 | __u64 err; |
| 154 | __u64 trapno; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 155 | __u64 oldmask; |
| 156 | __u64 cr2; |
| 157 | __u64 fpstate; |
| 158 | __u64 reserved1[8]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 159 | }; |
| 160 | #define _fpstate_ia32 _fpstate_32 |
| 161 | #define sigcontext_ia32 sigcontext_32 |
| 162 | #ifdef __i386__ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 163 | struct sigcontext { |
| 164 | __u16 gs, __gsh; |
| 165 | __u16 fs, __fsh; |
| 166 | __u16 es, __esh; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 167 | __u16 ds, __dsh; |
| 168 | __u32 edi; |
| 169 | __u32 esi; |
| 170 | __u32 ebp; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 171 | __u32 esp; |
| 172 | __u32 ebx; |
| 173 | __u32 edx; |
| 174 | __u32 ecx; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 175 | __u32 eax; |
| 176 | __u32 trapno; |
| 177 | __u32 err; |
| 178 | __u32 eip; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 179 | __u16 cs, __csh; |
| 180 | __u32 eflags; |
| 181 | __u32 esp_at_signal; |
| 182 | __u16 ss, __ssh; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 183 | struct _fpstate __user * fpstate; |
| 184 | __u32 oldmask; |
| 185 | __u32 cr2; |
| 186 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 187 | #else |
| 188 | struct sigcontext { |
| 189 | __u64 r8; |
| 190 | __u64 r9; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 191 | __u64 r10; |
| 192 | __u64 r11; |
| 193 | __u64 r12; |
| 194 | __u64 r13; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 195 | __u64 r14; |
| 196 | __u64 r15; |
| 197 | __u64 rdi; |
| 198 | __u64 rsi; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 199 | __u64 rbp; |
| 200 | __u64 rbx; |
| 201 | __u64 rdx; |
| 202 | __u64 rax; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 203 | __u64 rcx; |
| 204 | __u64 rsp; |
| 205 | __u64 rip; |
| 206 | __u64 eflags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 207 | __u16 cs; |
| 208 | __u16 gs; |
| 209 | __u16 fs; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 210 | union { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 211 | __u16 ss; |
| 212 | __u16 __pad0; |
| 213 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 214 | __u64 err; |
| 215 | __u64 trapno; |
| 216 | __u64 oldmask; |
| 217 | __u64 cr2; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 218 | struct _fpstate __user * fpstate; |
| 219 | #ifdef __ILP32__ |
| 220 | __u32 __fpstate_pad; |
| 221 | #endif |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 222 | __u64 reserved1[8]; |
| 223 | }; |
| 224 | #endif |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 225 | #endif |