Kees Cook | dd78b97 | 2013-10-10 17:18:13 -0700 | [diff] [blame] | 1 | #ifndef BOOT_CPUFLAGS_H |
| 2 | #define BOOT_CPUFLAGS_H |
| 3 | |
Borislav Petkov | cd4d09e | 2016-01-26 22:12:04 +0100 | [diff] [blame] | 4 | #include <asm/cpufeatures.h> |
Kees Cook | dd78b97 | 2013-10-10 17:18:13 -0700 | [diff] [blame] | 5 | #include <asm/processor-flags.h> |
| 6 | |
| 7 | struct cpu_features { |
| 8 | int level; /* Family, or 64 for x86-64 */ |
Dave Hansen | e4a84be | 2016-07-07 17:19:14 -0700 | [diff] [blame] | 9 | int family; /* Family, always */ |
Kees Cook | dd78b97 | 2013-10-10 17:18:13 -0700 | [diff] [blame] | 10 | int model; |
| 11 | u32 flags[NCAPINTS]; |
| 12 | }; |
| 13 | |
| 14 | extern struct cpu_features cpu; |
| 15 | extern u32 cpu_vendor[3]; |
| 16 | |
| 17 | int has_eflag(unsigned long mask); |
H. Peter Anvin | 6e6a493 | 2013-10-13 04:08:56 -0700 | [diff] [blame] | 18 | void get_cpuflags(void); |
Kees Cook | dd78b97 | 2013-10-10 17:18:13 -0700 | [diff] [blame] | 19 | |
| 20 | #endif |