1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef BOOT_CPUFLAGS_H 3 #define BOOT_CPUFLAGS_H 4 5 #include <asm/cpufeatures.h> 6 #include <asm/processor-flags.h> 7 8 struct cpu_features { 9 int level; /* Family, or 64 for x86-64 */ 10 int family; /* Family, always */ 11 int model; 12 u32 flags[NCAPINTS]; 13 }; 14 15 extern struct cpu_features cpu; 16 extern u32 cpu_vendor[3]; 17 18 #ifdef CONFIG_X86_32 19 bool has_eflag(unsigned long mask); 20 #else has_eflag(unsigned long mask)21static inline bool has_eflag(unsigned long mask) { return true; } 22 #endif 23 void get_cpuflags(void); 24 void cpuid_count(u32 id, u32 count, u32 *a, u32 *b, u32 *c, u32 *d); 25 bool has_cpuflag(int flag); 26 27 #endif 28