diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-07-29 13:29:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-30 13:49:24 -0400 |
commit | dc1e35c6e95e8923cf1d3510438b63c600fee1e2 (patch) | |
tree | 4348f51f1bfdd124efd6d16dcc552bd4a148fdfb /include/asm-x86/xsave.h | |
parent | a648bf4632628c787abb0514277f2a231fca39ca (diff) |
x86, xsave: enable xsave/xrstor on cpus with xsave support
Enables xsave/xrstor by turning on cr4.osxsave on cpu's which have
the xsave support. For now, features that OS supports/enabled are
FP and SSE.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/xsave.h')
-rw-r--r-- | include/asm-x86/xsave.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/asm-x86/xsave.h b/include/asm-x86/xsave.h new file mode 100644 index 000000000000..6d70e62c6bdc --- /dev/null +++ b/include/asm-x86/xsave.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef __ASM_X86_XSAVE_H | ||
2 | #define __ASM_X86_XSAVE_H | ||
3 | |||
4 | #include <asm/processor.h> | ||
5 | #include <asm/i387.h> | ||
6 | |||
7 | #define XSTATE_FP 0x1 | ||
8 | #define XSTATE_SSE 0x2 | ||
9 | |||
10 | #define XSTATE_FPSSE (XSTATE_FP | XSTATE_SSE) | ||
11 | |||
12 | #define FXSAVE_SIZE 512 | ||
13 | |||
14 | /* | ||
15 | * These are the features that the OS can handle currently. | ||
16 | */ | ||
17 | #define XCNTXT_LMASK (XSTATE_FP | XSTATE_SSE) | ||
18 | #define XCNTXT_HMASK 0x0 | ||
19 | |||
20 | extern unsigned int xstate_size, pcntxt_hmask, pcntxt_lmask; | ||
21 | extern struct xsave_struct *init_xstate_buf; | ||
22 | |||
23 | extern void xsave_cntxt_init(void); | ||
24 | extern void xsave_init(void); | ||
25 | |||
26 | #endif | ||