aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86')
-rw-r--r--include/asm-x86/Kbuild2
-rw-r--r--include/asm-x86/sigcontext.h149
-rw-r--r--include/asm-x86/sigcontext_32.h85
-rw-r--r--include/asm-x86/sigcontext_64.h55
4 files changed, 137 insertions, 154 deletions
diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild
index 5e4def7007e4..4e4de4bfba41 100644
--- a/include/asm-x86/Kbuild
+++ b/include/asm-x86/Kbuild
@@ -23,8 +23,6 @@ unifdef-y += posix_types_64.h
23unifdef-y += ptrace.h 23unifdef-y += ptrace.h
24unifdef-y += setup_32.h 24unifdef-y += setup_32.h
25unifdef-y += setup_64.h 25unifdef-y += setup_64.h
26unifdef-y += sigcontext_32.h
27unifdef-y += sigcontext_64.h
28unifdef-y += signal_32.h 26unifdef-y += signal_32.h
29unifdef-y += signal_64.h 27unifdef-y += signal_64.h
30unifdef-y += unistd_32.h 28unifdef-y += unistd_32.h
diff --git a/include/asm-x86/sigcontext.h b/include/asm-x86/sigcontext.h
index 0d16ceff1599..c047f9dc3423 100644
--- a/include/asm-x86/sigcontext.h
+++ b/include/asm-x86/sigcontext.h
@@ -1,13 +1,138 @@
1#ifdef __KERNEL__ 1#ifndef _ASM_X86_SIGCONTEXT_H
2# ifdef CONFIG_X86_32 2#define _ASM_X86_SIGCONTEXT_H
3# include "sigcontext_32.h" 3
4# else 4#include <linux/compiler.h>
5# include "sigcontext_64.h" 5#include <asm/types.h>
6# endif 6
7#else 7#ifdef __i386__
8# ifdef __i386__ 8/*
9# include "sigcontext_32.h" 9 * As documented in the iBCS2 standard..
10# else 10 *
11# include "sigcontext_64.h" 11 * The first part of "struct _fpstate" is just the normal i387
12# endif 12 * hardware setup, the extra "status" word is used to save the
13 * coprocessor status word before entering the handler.
14 *
15 * Pentium III FXSR, SSE support
16 * Gareth Hughes <gareth@valinux.com>, May 2000
17 *
18 * The FPU state data structure has had to grow to accommodate the
19 * extended FPU state required by the Streaming SIMD Extensions.
20 * There is no documented standard to accomplish this at the moment.
21 */
22struct _fpreg {
23 unsigned short significand[4];
24 unsigned short exponent;
25};
26
27struct _fpxreg {
28 unsigned short significand[4];
29 unsigned short exponent;
30 unsigned short padding[3];
31};
32
33struct _xmmreg {
34 unsigned long element[4];
35};
36
37struct _fpstate {
38 /* Regular FPU environment */
39 unsigned long cw;
40 unsigned long sw;
41 unsigned long tag;
42 unsigned long ipoff;
43 unsigned long cssel;
44 unsigned long dataoff;
45 unsigned long datasel;
46 struct _fpreg _st[8];
47 unsigned short status;
48 unsigned short magic; /* 0xffff = regular FPU data only */
49
50 /* FXSR FPU environment */
51 unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
52 unsigned long mxcsr;
53 unsigned long reserved;
54 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
55 struct _xmmreg _xmm[8];
56 unsigned long padding[56];
57};
58
59#define X86_FXSR_MAGIC 0x0000
60
61struct sigcontext {
62 unsigned short gs, __gsh;
63 unsigned short fs, __fsh;
64 unsigned short es, __esh;
65 unsigned short ds, __dsh;
66 unsigned long edi;
67 unsigned long esi;
68 unsigned long ebp;
69 unsigned long esp;
70 unsigned long ebx;
71 unsigned long edx;
72 unsigned long ecx;
73 unsigned long eax;
74 unsigned long trapno;
75 unsigned long err;
76 unsigned long eip;
77 unsigned short cs, __csh;
78 unsigned long eflags;
79 unsigned long esp_at_signal;
80 unsigned short ss, __ssh;
81 struct _fpstate __user * fpstate;
82 unsigned long oldmask;
83 unsigned long cr2;
84};
85
86#else /* __i386__ */
87
88/* FXSAVE frame */
89/* Note: reserved1/2 may someday contain valuable data. Always save/restore
90 them when you change signal frames. */
91struct _fpstate {
92 __u16 cwd;
93 __u16 swd;
94 __u16 twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */
95 __u16 fop;
96 __u64 rip;
97 __u64 rdp;
98 __u32 mxcsr;
99 __u32 mxcsr_mask;
100 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */
101 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */
102 __u32 reserved2[24];
103};
104
105struct sigcontext {
106 unsigned long r8;
107 unsigned long r9;
108 unsigned long r10;
109 unsigned long r11;
110 unsigned long r12;
111 unsigned long r13;
112 unsigned long r14;
113 unsigned long r15;
114 unsigned long rdi;
115 unsigned long rsi;
116 unsigned long rbp;
117 unsigned long rbx;
118 unsigned long rdx;
119 unsigned long rax;
120 unsigned long rcx;
121 unsigned long rsp;
122 unsigned long rip;
123 unsigned long eflags; /* RFLAGS */
124 unsigned short cs;
125 unsigned short gs;
126 unsigned short fs;
127 unsigned short __pad0;
128 unsigned long err;
129 unsigned long trapno;
130 unsigned long oldmask;
131 unsigned long cr2;
132 struct _fpstate __user *fpstate; /* zero when no FPU context */
133 unsigned long reserved1[8];
134};
135
136#endif /* !__i386__ */
137
13#endif 138#endif
diff --git a/include/asm-x86/sigcontext_32.h b/include/asm-x86/sigcontext_32.h
deleted file mode 100644
index aaef089a7787..000000000000
--- a/include/asm-x86/sigcontext_32.h
+++ /dev/null
@@ -1,85 +0,0 @@
1#ifndef _ASMi386_SIGCONTEXT_H
2#define _ASMi386_SIGCONTEXT_H
3
4#include <linux/compiler.h>
5
6/*
7 * As documented in the iBCS2 standard..
8 *
9 * The first part of "struct _fpstate" is just the normal i387
10 * hardware setup, the extra "status" word is used to save the
11 * coprocessor status word before entering the handler.
12 *
13 * Pentium III FXSR, SSE support
14 * Gareth Hughes <gareth@valinux.com>, May 2000
15 *
16 * The FPU state data structure has had to grow to accommodate the
17 * extended FPU state required by the Streaming SIMD Extensions.
18 * There is no documented standard to accomplish this at the moment.
19 */
20struct _fpreg {
21 unsigned short significand[4];
22 unsigned short exponent;
23};
24
25struct _fpxreg {
26 unsigned short significand[4];
27 unsigned short exponent;
28 unsigned short padding[3];
29};
30
31struct _xmmreg {
32 unsigned long element[4];
33};
34
35struct _fpstate {
36 /* Regular FPU environment */
37 unsigned long cw;
38 unsigned long sw;
39 unsigned long tag;
40 unsigned long ipoff;
41 unsigned long cssel;
42 unsigned long dataoff;
43 unsigned long datasel;
44 struct _fpreg _st[8];
45 unsigned short status;
46 unsigned short magic; /* 0xffff = regular FPU data only */
47
48 /* FXSR FPU environment */
49 unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
50 unsigned long mxcsr;
51 unsigned long reserved;
52 struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
53 struct _xmmreg _xmm[8];
54 unsigned long padding[56];
55};
56
57#define X86_FXSR_MAGIC 0x0000
58
59struct sigcontext {
60 unsigned short gs, __gsh;
61 unsigned short fs, __fsh;
62 unsigned short es, __esh;
63 unsigned short ds, __dsh;
64 unsigned long edi;
65 unsigned long esi;
66 unsigned long ebp;
67 unsigned long esp;
68 unsigned long ebx;
69 unsigned long edx;
70 unsigned long ecx;
71 unsigned long eax;
72 unsigned long trapno;
73 unsigned long err;
74 unsigned long eip;
75 unsigned short cs, __csh;
76 unsigned long eflags;
77 unsigned long esp_at_signal;
78 unsigned short ss, __ssh;
79 struct _fpstate __user * fpstate;
80 unsigned long oldmask;
81 unsigned long cr2;
82};
83
84
85#endif
diff --git a/include/asm-x86/sigcontext_64.h b/include/asm-x86/sigcontext_64.h
deleted file mode 100644
index b4e40236666c..000000000000
--- a/include/asm-x86/sigcontext_64.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef _ASM_X86_64_SIGCONTEXT_H
2#define _ASM_X86_64_SIGCONTEXT_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6
7/* FXSAVE frame */
8/* Note: reserved1/2 may someday contain valuable data. Always save/restore
9 them when you change signal frames. */
10struct _fpstate {
11 __u16 cwd;
12 __u16 swd;
13 __u16 twd; /* Note this is not the same as the 32bit/x87/FSAVE twd */
14 __u16 fop;
15 __u64 rip;
16 __u64 rdp;
17 __u32 mxcsr;
18 __u32 mxcsr_mask;
19 __u32 st_space[32]; /* 8*16 bytes for each FP-reg */
20 __u32 xmm_space[64]; /* 16*16 bytes for each XMM-reg */
21 __u32 reserved2[24];
22};
23
24struct sigcontext {
25 unsigned long r8;
26 unsigned long r9;
27 unsigned long r10;
28 unsigned long r11;
29 unsigned long r12;
30 unsigned long r13;
31 unsigned long r14;
32 unsigned long r15;
33 unsigned long rdi;
34 unsigned long rsi;
35 unsigned long rbp;
36 unsigned long rbx;
37 unsigned long rdx;
38 unsigned long rax;
39 unsigned long rcx;
40 unsigned long rsp;
41 unsigned long rip;
42 unsigned long eflags; /* RFLAGS */
43 unsigned short cs;
44 unsigned short gs;
45 unsigned short fs;
46 unsigned short __pad0;
47 unsigned long err;
48 unsigned long trapno;
49 unsigned long oldmask;
50 unsigned long cr2;
51 struct _fpstate __user *fpstate; /* zero when no FPU context */
52 unsigned long reserved1[8];
53};
54
55#endif