H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_SIGCONTEXT_H |
| 2 | #define _ASM_X86_SIGCONTEXT_H |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 3 | |
David Howells | af170c5 | 2012-12-14 22:37:13 +0000 | [diff] [blame] | 4 | #include <uapi/asm/sigcontext.h> |
Suresh Siddha | bdd8cab | 2008-07-29 10:29:24 -0700 | [diff] [blame] | 5 | |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 6 | #ifdef __i386__ |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 7 | struct sigcontext { |
| 8 | unsigned short gs, __gsh; |
| 9 | unsigned short fs, __fsh; |
| 10 | unsigned short es, __esh; |
| 11 | unsigned short ds, __dsh; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 12 | 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 Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 20 | unsigned long trapno; |
| 21 | unsigned long err; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 22 | unsigned long ip; |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 23 | unsigned short cs, __csh; |
H. Peter Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 24 | unsigned long flags; |
| 25 | unsigned long sp_at_signal; |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 26 | unsigned short ss, __ssh; |
Suresh Siddha | bdd8cab | 2008-07-29 10:29:24 -0700 | [diff] [blame] | 27 | |
| 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 Buchbinder | 6070d81 | 2009-12-04 15:47:01 -0500 | [diff] [blame] | 32 | * of extended memory layout. See comments at the definition of |
Suresh Siddha | bdd8cab | 2008-07-29 10:29:24 -0700 | [diff] [blame] | 33 | * (struct _fpx_sw_bytes) |
| 34 | */ |
| 35 | void __user *fpstate; /* zero when no FPU/extended context */ |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 36 | unsigned long oldmask; |
| 37 | unsigned long cr2; |
| 38 | }; |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 39 | #else /* __i386__ */ |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 40 | struct 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 Anvin | 742fa54 | 2008-01-30 13:30:56 +0100 | [diff] [blame] | 49 | 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 Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 59 | 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 Siddha | bdd8cab | 2008-07-29 10:29:24 -0700 | [diff] [blame] | 67 | |
| 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 Buchbinder | 6070d81 | 2009-12-04 15:47:01 -0500 | [diff] [blame] | 72 | * of extended memory layout. See comments at the definition of |
Suresh Siddha | bdd8cab | 2008-07-29 10:29:24 -0700 | [diff] [blame] | 73 | * (struct _fpx_sw_bytes) |
| 74 | */ |
| 75 | void __user *fpstate; /* zero when no FPU/extended context */ |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 76 | unsigned long reserved1[8]; |
| 77 | }; |
Thomas Gleixner | 77129c5 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 78 | #endif /* !__i386__ */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 79 | #endif /* _ASM_X86_SIGCONTEXT_H */ |