blob: 618feb98f9f5de4f67eaeebae2ebab62ff967946 [file] [log] [blame]
Andi Kleenc7f81c92007-05-02 19:27:20 +02001#ifndef _ASM_REQUIRED_FEATURES_H
2#define _ASM_REQUIRED_FEATURES_H 1
3
4/* Define minimum CPUID feature set for kernel These bits are checked
5 really early to actually display a visible error message before the
H. Peter Anvinec481532007-07-11 12:18:29 -07006 kernel dies. Make sure to assign features to the proper mask!
Andi Kleenc7f81c92007-05-02 19:27:20 +02007
8 Some requirements that are not in CPUID yet are also in the
H. Peter Anvinec481532007-07-11 12:18:29 -07009 CONFIG_X86_MINIMUM_CPU_FAMILY which is checked too.
Andi Kleenc7f81c92007-05-02 19:27:20 +020010
11 The real information is in arch/i386/Kconfig.cpu, this just converts
12 the CONFIGs into a bitmask */
13
H. Peter Anvinec481532007-07-11 12:18:29 -070014#ifndef CONFIG_MATH_EMULATION
15# define NEED_FPU (1<<(X86_FEATURE_FPU & 31))
Andi Kleenc7f81c92007-05-02 19:27:20 +020016#else
H. Peter Anvinec481532007-07-11 12:18:29 -070017# define NEED_FPU 0
18#endif
19
20#ifdef CONFIG_X86_PAE
21# define NEED_PAE (1<<(X86_FEATURE_PAE & 31))
22#else
23# define NEED_PAE 0
Andi Kleenc7f81c92007-05-02 19:27:20 +020024#endif
25
26#ifdef CONFIG_X86_CMOV
H. Peter Anvinec481532007-07-11 12:18:29 -070027# define NEED_CMOV (1<<(X86_FEATURE_CMOV & 31))
Andi Kleenc7f81c92007-05-02 19:27:20 +020028#else
H. Peter Anvinec481532007-07-11 12:18:29 -070029# define NEED_CMOV 0
Andi Kleenc7f81c92007-05-02 19:27:20 +020030#endif
31
Avi Kivity2d9ce172007-07-19 14:30:14 +030032#ifdef CONFIG_X86_PAE
H. Peter Anvinec481532007-07-11 12:18:29 -070033# define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31))
Andi Kleenc7f81c92007-05-02 19:27:20 +020034#else
H. Peter Anvinec481532007-07-11 12:18:29 -070035# define NEED_CX8 0
Andi Kleenc7f81c92007-05-02 19:27:20 +020036#endif
37
H. Peter Anvinec481532007-07-11 12:18:29 -070038#define REQUIRED_MASK0 (NEED_FPU|NEED_PAE|NEED_CMOV|NEED_CX8)
39
40#ifdef CONFIG_X86_USE_3DNOW
41# define NEED_3DNOW (1<<(X86_FEATURE_3DNOW & 31))
42#else
43# define NEED_3DNOW 0
44#endif
45
46#define REQUIRED_MASK1 (NEED_3DNOW)
47
48#define REQUIRED_MASK2 0
49#define REQUIRED_MASK3 0
50#define REQUIRED_MASK4 0
51#define REQUIRED_MASK5 0
52#define REQUIRED_MASK6 0
Venki Pallipadi1d679532007-07-11 12:18:32 -070053#define REQUIRED_MASK7 0
Andi Kleenc7f81c92007-05-02 19:27:20 +020054
55#endif