blob: 9dfce4e0417d92adc623d32ff93f67109316b451 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_SIGCONTEXT_H
2#define _ASM_X86_SIGCONTEXT_H
Thomas Gleixner77129c52007-10-23 22:37:24 +02003
David Howellsaf170c52012-12-14 22:37:13 +00004#include <uapi/asm/sigcontext.h>
Suresh Siddhabdd8cab2008-07-29 10:29:24 -07005
Thomas Gleixner77129c52007-10-23 22:37:24 +02006#ifdef __i386__
Thomas Gleixner77129c52007-10-23 22:37:24 +02007struct sigcontext {
8 unsigned short gs, __gsh;
9 unsigned short fs, __fsh;
10 unsigned short es, __esh;
11 unsigned short ds, __dsh;
H. Peter Anvin742fa542008-01-30 13:30:56 +010012 unsigned long di;
13 unsigned long si;
14 unsigned long bp;
15 unsigned long sp;
16 unsigned long bx;
17 unsigned long dx;
18 unsigned long cx;
19 unsigned long ax;
Thomas Gleixner77129c52007-10-23 22:37:24 +020020 unsigned long trapno;
21 unsigned long err;
H. Peter Anvin742fa542008-01-30 13:30:56 +010022 unsigned long ip;
Thomas Gleixner77129c52007-10-23 22:37:24 +020023 unsigned short cs, __csh;
H. Peter Anvin742fa542008-01-30 13:30:56 +010024 unsigned long flags;
25 unsigned long sp_at_signal;
Thomas Gleixner77129c52007-10-23 22:37:24 +020026 unsigned short ss, __ssh;
Suresh Siddhabdd8cab2008-07-29 10:29:24 -070027
28 /*
29 * fpstate is really (struct _fpstate *) or (struct _xstate *)
30 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
31 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
Adam Buchbinder6070d812009-12-04 15:47:01 -050032 * of extended memory layout. See comments at the definition of
Suresh Siddhabdd8cab2008-07-29 10:29:24 -070033 * (struct _fpx_sw_bytes)
34 */
35 void __user *fpstate; /* zero when no FPU/extended context */
Thomas Gleixner77129c52007-10-23 22:37:24 +020036 unsigned long oldmask;
37 unsigned long cr2;
38};
Thomas Gleixner77129c52007-10-23 22:37:24 +020039#else /* __i386__ */
Thomas Gleixner77129c52007-10-23 22:37:24 +020040struct sigcontext {
41 unsigned long r8;
42 unsigned long r9;
43 unsigned long r10;
44 unsigned long r11;
45 unsigned long r12;
46 unsigned long r13;
47 unsigned long r14;
48 unsigned long r15;
H. Peter Anvin742fa542008-01-30 13:30:56 +010049 unsigned long di;
50 unsigned long si;
51 unsigned long bp;
52 unsigned long bx;
53 unsigned long dx;
54 unsigned long ax;
55 unsigned long cx;
56 unsigned long sp;
57 unsigned long ip;
58 unsigned long flags;
Thomas Gleixner77129c52007-10-23 22:37:24 +020059 unsigned short cs;
60 unsigned short gs;
61 unsigned short fs;
62 unsigned short __pad0;
63 unsigned long err;
64 unsigned long trapno;
65 unsigned long oldmask;
66 unsigned long cr2;
Suresh Siddhabdd8cab2008-07-29 10:29:24 -070067
68 /*
69 * fpstate is really (struct _fpstate *) or (struct _xstate *)
70 * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
71 * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
Adam Buchbinder6070d812009-12-04 15:47:01 -050072 * of extended memory layout. See comments at the definition of
Suresh Siddhabdd8cab2008-07-29 10:29:24 -070073 * (struct _fpx_sw_bytes)
74 */
75 void __user *fpstate; /* zero when no FPU/extended context */
Thomas Gleixner77129c52007-10-23 22:37:24 +020076 unsigned long reserved1[8];
77};
Thomas Gleixner77129c52007-10-23 22:37:24 +020078#endif /* !__i386__ */
H. Peter Anvin1965aae2008-10-22 22:26:29 -070079#endif /* _ASM_X86_SIGCONTEXT_H */