cpuflags.h 486 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef BOOT_CPUFLAGS_H
  3. #define BOOT_CPUFLAGS_H
  4. #include <asm/cpufeatures.h>
  5. #include <asm/processor-flags.h>
  6. struct cpu_features {
  7. int level; /* Family, or 64 for x86-64 */
  8. int family; /* Family, always */
  9. int model;
  10. u32 flags[NCAPINTS];
  11. };
  12. extern struct cpu_features cpu;
  13. extern u32 cpu_vendor[3];
  14. int has_eflag(unsigned long mask);
  15. void get_cpuflags(void);
  16. void cpuid_count(u32 id, u32 count, u32 *a, u32 *b, u32 *c, u32 *d);
  17. #endif