blob: 7d5b4d4de8afcfa426a62bf37c8db21890745c4e [file] [log] [blame]
Elliott Hughesabd62612013-11-08 11:45:48 -08001/****************************************************************************
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 Hughesabd62612013-11-08 11:45:48 -080023#define FP_XSTATE_MAGIC1 0x46505853U
24#define FP_XSTATE_MAGIC2 0x46505845U
25#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
26struct _fpx_sw_bytes {
Tao Baod7db5942015-01-28 10:07:51 -080027 __u32 magic1;
28 __u32 extended_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -080029 __u64 xfeatures;
Tao Baod7db5942015-01-28 10:07:51 -080030 __u32 xstate_size;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u32 padding[7];
Elliott Hughesabd62612013-11-08 11:45:48 -080032};
Elliott Hughesabd62612013-11-08 11:45:48 -080033struct _fpreg {
Christopher Ferris05d08e92016-02-04 13:16:38 -080034 __u16 significand[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 __u16 exponent;
Elliott Hughesabd62612013-11-08 11:45:48 -080036};
37struct _fpxreg {
Christopher Ferris05d08e92016-02-04 13:16:38 -080038 __u16 significand[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 __u16 exponent;
40 __u16 padding[3];
Elliott Hughesabd62612013-11-08 11:45:48 -080041};
Elliott Hughesabd62612013-11-08 11:45:48 -080042struct _xmmreg {
Christopher Ferris05d08e92016-02-04 13:16:38 -080043 __u32 element[4];
Elliott Hughesabd62612013-11-08 11:45:48 -080044};
45#define X86_FXSR_MAGIC 0x0000
Christopher Ferris05d08e92016-02-04 13:16:38 -080046struct _fpstate_32 {
Christopher Ferris05d08e92016-02-04 13:16:38 -080047 __u32 cw;
48 __u32 sw;
49 __u32 tag;
50 __u32 ipoff;
Christopher Ferris05d08e92016-02-04 13:16:38 -080051 __u32 cssel;
52 __u32 dataoff;
53 __u32 datasel;
54 struct _fpreg _st[8];
Christopher Ferris05d08e92016-02-04 13:16:38 -080055 __u16 status;
56 __u16 magic;
57 __u32 _fxsr_env[6];
58 __u32 mxcsr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 __u32 reserved;
60 struct _fpxreg _fxsr_st[8];
61 struct _xmmreg _xmm[8];
62 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -080063 __u32 padding1[44];
64 __u32 padding[44];
65 };
66 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -080067 __u32 padding2[12];
68 struct _fpx_sw_bytes sw_reserved;
69 };
Elliott Hughesabd62612013-11-08 11:45:48 -080070};
Christopher Ferris05d08e92016-02-04 13:16:38 -080071struct _fpstate_64 {
Tao Baod7db5942015-01-28 10:07:51 -080072 __u16 cwd;
73 __u16 swd;
74 __u16 twd;
Christopher Ferris05d08e92016-02-04 13:16:38 -080075 __u16 fop;
Tao Baod7db5942015-01-28 10:07:51 -080076 __u64 rip;
77 __u64 rdp;
78 __u32 mxcsr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080079 __u32 mxcsr_mask;
Tao Baod7db5942015-01-28 10:07:51 -080080 __u32 st_space[32];
81 __u32 xmm_space[64];
82 __u32 reserved2[12];
Christopher Ferris05d08e92016-02-04 13:16:38 -080083 union {
Tao Baod7db5942015-01-28 10:07:51 -080084 __u32 reserved3[12];
85 struct _fpx_sw_bytes sw_reserved;
86 };
Elliott Hughesabd62612013-11-08 11:45:48 -080087};
Christopher Ferris05d08e92016-02-04 13:16:38 -080088#ifdef __i386__
89#define _fpstate _fpstate_32
90#else
Christopher Ferris05d08e92016-02-04 13:16:38 -080091#define _fpstate _fpstate_64
Elliott Hughesabd62612013-11-08 11:45:48 -080092#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -080093struct _header {
94 __u64 xfeatures;
Tao Baod7db5942015-01-28 10:07:51 -080095 __u64 reserved1[2];
96 __u64 reserved2[5];
Elliott Hughesabd62612013-11-08 11:45:48 -080097};
98struct _ymmh_state {
Tao Baod7db5942015-01-28 10:07:51 -080099 __u32 ymmh_space[64];
Elliott Hughesabd62612013-11-08 11:45:48 -0800100};
101struct _xstate {
Tao Baod7db5942015-01-28 10:07:51 -0800102 struct _fpstate fpstate;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103 struct _header xstate_hdr;
Tao Baod7db5942015-01-28 10:07:51 -0800104 struct _ymmh_state ymmh;
Elliott Hughesabd62612013-11-08 11:45:48 -0800105};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800106struct sigcontext_32 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800107 __u16 gs, __gsh;
108 __u16 fs, __fsh;
109 __u16 es, __esh;
110 __u16 ds, __dsh;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800111 __u32 di;
112 __u32 si;
113 __u32 bp;
114 __u32 sp;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115 __u32 bx;
116 __u32 dx;
117 __u32 cx;
118 __u32 ax;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119 __u32 trapno;
120 __u32 err;
121 __u32 ip;
122 __u16 cs, __csh;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123 __u32 flags;
124 __u32 sp_at_signal;
125 __u16 ss, __ssh;
126 __u32 fpstate;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800127 __u32 oldmask;
128 __u32 cr2;
129};
130struct sigcontext_64 {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800131 __u64 r8;
132 __u64 r9;
133 __u64 r10;
134 __u64 r11;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800135 __u64 r12;
136 __u64 r13;
137 __u64 r14;
138 __u64 r15;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139 __u64 di;
140 __u64 si;
141 __u64 bp;
142 __u64 bx;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800143 __u64 dx;
144 __u64 ax;
145 __u64 cx;
146 __u64 sp;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800147 __u64 ip;
148 __u64 flags;
149 __u16 cs;
150 __u16 gs;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800151 __u16 fs;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700152 __u16 ss;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800153 __u64 err;
154 __u64 trapno;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800155 __u64 oldmask;
156 __u64 cr2;
157 __u64 fpstate;
158 __u64 reserved1[8];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800159};
160#define _fpstate_ia32 _fpstate_32
161#define sigcontext_ia32 sigcontext_32
162#ifdef __i386__
Christopher Ferris05d08e92016-02-04 13:16:38 -0800163struct sigcontext {
164 __u16 gs, __gsh;
165 __u16 fs, __fsh;
166 __u16 es, __esh;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800167 __u16 ds, __dsh;
168 __u32 edi;
169 __u32 esi;
170 __u32 ebp;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800171 __u32 esp;
172 __u32 ebx;
173 __u32 edx;
174 __u32 ecx;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800175 __u32 eax;
176 __u32 trapno;
177 __u32 err;
178 __u32 eip;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800179 __u16 cs, __csh;
180 __u32 eflags;
181 __u32 esp_at_signal;
182 __u16 ss, __ssh;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800183 struct _fpstate __user * fpstate;
184 __u32 oldmask;
185 __u32 cr2;
186};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800187#else
188struct sigcontext {
189 __u64 r8;
190 __u64 r9;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800191 __u64 r10;
192 __u64 r11;
193 __u64 r12;
194 __u64 r13;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800195 __u64 r14;
196 __u64 r15;
197 __u64 rdi;
198 __u64 rsi;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800199 __u64 rbp;
200 __u64 rbx;
201 __u64 rdx;
202 __u64 rax;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800203 __u64 rcx;
204 __u64 rsp;
205 __u64 rip;
206 __u64 eflags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800207 __u16 cs;
208 __u16 gs;
209 __u16 fs;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700210 union {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700211 __u16 ss;
212 __u16 __pad0;
213 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800214 __u64 err;
215 __u64 trapno;
216 __u64 oldmask;
217 __u64 cr2;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800218 struct _fpstate __user * fpstate;
219#ifdef __ILP32__
220 __u32 __fpstate_pad;
221#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -0800222 __u64 reserved1[8];
223};
224#endif
Elliott Hughesabd62612013-11-08 11:45:48 -0800225#endif