1*7d7d1bf1SArnaldo Carvalho de Melo #ifndef _ASM_X86_REQUIRED_FEATURES_H 2*7d7d1bf1SArnaldo Carvalho de Melo #define _ASM_X86_REQUIRED_FEATURES_H 3*7d7d1bf1SArnaldo Carvalho de Melo 4*7d7d1bf1SArnaldo Carvalho de Melo /* Define minimum CPUID feature set for kernel These bits are checked 5*7d7d1bf1SArnaldo Carvalho de Melo really early to actually display a visible error message before the 6*7d7d1bf1SArnaldo Carvalho de Melo kernel dies. Make sure to assign features to the proper mask! 7*7d7d1bf1SArnaldo Carvalho de Melo 8*7d7d1bf1SArnaldo Carvalho de Melo Some requirements that are not in CPUID yet are also in the 9*7d7d1bf1SArnaldo Carvalho de Melo CONFIG_X86_MINIMUM_CPU_FAMILY which is checked too. 10*7d7d1bf1SArnaldo Carvalho de Melo 11*7d7d1bf1SArnaldo Carvalho de Melo The real information is in arch/x86/Kconfig.cpu, this just converts 12*7d7d1bf1SArnaldo Carvalho de Melo the CONFIGs into a bitmask */ 13*7d7d1bf1SArnaldo Carvalho de Melo 14*7d7d1bf1SArnaldo Carvalho de Melo #ifndef CONFIG_MATH_EMULATION 15*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_FPU (1<<(X86_FEATURE_FPU & 31)) 16*7d7d1bf1SArnaldo Carvalho de Melo #else 17*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_FPU 0 18*7d7d1bf1SArnaldo Carvalho de Melo #endif 19*7d7d1bf1SArnaldo Carvalho de Melo 20*7d7d1bf1SArnaldo Carvalho de Melo #if defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64) 21*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_PAE (1<<(X86_FEATURE_PAE & 31)) 22*7d7d1bf1SArnaldo Carvalho de Melo #else 23*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_PAE 0 24*7d7d1bf1SArnaldo Carvalho de Melo #endif 25*7d7d1bf1SArnaldo Carvalho de Melo 26*7d7d1bf1SArnaldo Carvalho de Melo #ifdef CONFIG_X86_CMPXCHG64 27*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31)) 28*7d7d1bf1SArnaldo Carvalho de Melo #else 29*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_CX8 0 30*7d7d1bf1SArnaldo Carvalho de Melo #endif 31*7d7d1bf1SArnaldo Carvalho de Melo 32*7d7d1bf1SArnaldo Carvalho de Melo #if defined(CONFIG_X86_CMOV) || defined(CONFIG_X86_64) 33*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_CMOV (1<<(X86_FEATURE_CMOV & 31)) 34*7d7d1bf1SArnaldo Carvalho de Melo #else 35*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_CMOV 0 36*7d7d1bf1SArnaldo Carvalho de Melo #endif 37*7d7d1bf1SArnaldo Carvalho de Melo 38*7d7d1bf1SArnaldo Carvalho de Melo #ifdef CONFIG_X86_USE_3DNOW 39*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_3DNOW (1<<(X86_FEATURE_3DNOW & 31)) 40*7d7d1bf1SArnaldo Carvalho de Melo #else 41*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_3DNOW 0 42*7d7d1bf1SArnaldo Carvalho de Melo #endif 43*7d7d1bf1SArnaldo Carvalho de Melo 44*7d7d1bf1SArnaldo Carvalho de Melo #if defined(CONFIG_X86_P6_NOP) || defined(CONFIG_X86_64) 45*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_NOPL (1<<(X86_FEATURE_NOPL & 31)) 46*7d7d1bf1SArnaldo Carvalho de Melo #else 47*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_NOPL 0 48*7d7d1bf1SArnaldo Carvalho de Melo #endif 49*7d7d1bf1SArnaldo Carvalho de Melo 50*7d7d1bf1SArnaldo Carvalho de Melo #ifdef CONFIG_MATOM 51*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_MOVBE (1<<(X86_FEATURE_MOVBE & 31)) 52*7d7d1bf1SArnaldo Carvalho de Melo #else 53*7d7d1bf1SArnaldo Carvalho de Melo # define NEED_MOVBE 0 54*7d7d1bf1SArnaldo Carvalho de Melo #endif 55*7d7d1bf1SArnaldo Carvalho de Melo 56*7d7d1bf1SArnaldo Carvalho de Melo #ifdef CONFIG_X86_64 57*7d7d1bf1SArnaldo Carvalho de Melo #ifdef CONFIG_PARAVIRT 58*7d7d1bf1SArnaldo Carvalho de Melo /* Paravirtualized systems may not have PSE or PGE available */ 59*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_PSE 0 60*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_PGE 0 61*7d7d1bf1SArnaldo Carvalho de Melo #else 62*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_PSE (1<<(X86_FEATURE_PSE) & 31) 63*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_PGE (1<<(X86_FEATURE_PGE) & 31) 64*7d7d1bf1SArnaldo Carvalho de Melo #endif 65*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_MSR (1<<(X86_FEATURE_MSR & 31)) 66*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_FXSR (1<<(X86_FEATURE_FXSR & 31)) 67*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_XMM (1<<(X86_FEATURE_XMM & 31)) 68*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_XMM2 (1<<(X86_FEATURE_XMM2 & 31)) 69*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_LM (1<<(X86_FEATURE_LM & 31)) 70*7d7d1bf1SArnaldo Carvalho de Melo #else 71*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_PSE 0 72*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_MSR 0 73*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_PGE 0 74*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_FXSR 0 75*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_XMM 0 76*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_XMM2 0 77*7d7d1bf1SArnaldo Carvalho de Melo #define NEED_LM 0 78*7d7d1bf1SArnaldo Carvalho de Melo #endif 79*7d7d1bf1SArnaldo Carvalho de Melo 80*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK0 (NEED_FPU|NEED_PSE|NEED_MSR|NEED_PAE|\ 81*7d7d1bf1SArnaldo Carvalho de Melo NEED_CX8|NEED_PGE|NEED_FXSR|NEED_CMOV|\ 82*7d7d1bf1SArnaldo Carvalho de Melo NEED_XMM|NEED_XMM2) 83*7d7d1bf1SArnaldo Carvalho de Melo #define SSE_MASK (NEED_XMM|NEED_XMM2) 84*7d7d1bf1SArnaldo Carvalho de Melo 85*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW) 86*7d7d1bf1SArnaldo Carvalho de Melo 87*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK2 0 88*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK3 (NEED_NOPL) 89*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK4 (NEED_MOVBE) 90*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK5 0 91*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK6 0 92*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK7 0 93*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK8 0 94*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK9 0 95*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK10 0 96*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK11 0 97*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK12 0 98*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK13 0 99*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK14 0 100*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK15 0 101*7d7d1bf1SArnaldo Carvalho de Melo #define REQUIRED_MASK16 0 102*7d7d1bf1SArnaldo Carvalho de Melo 103*7d7d1bf1SArnaldo Carvalho de Melo #endif /* _ASM_X86_REQUIRED_FEATURES_H */ 104