1 /* attempt to consolidate cpu attributes */
2 
3 #ifndef X86_CPU_H
4 #define X86_CPU_H
5 
6 struct cpu_dev {
7 	void		(*c_early_init)(struct cpuinfo_x86 *c);
8 	void		(*c_init)(struct cpuinfo_x86 * c);
9 };
10 
11 extern const struct cpu_dev intel_cpu_dev, amd_cpu_dev, centaur_cpu_dev,
12     shanghai_cpu_dev, hygon_cpu_dev;
13 
14 extern bool opt_arat;
15 extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx;
16 extern unsigned int opt_cpuid_mask_xsave_eax;
17 extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx;
18 
19 extern int get_model_name(struct cpuinfo_x86 *c);
20 extern void display_cacheinfo(struct cpuinfo_x86 *c);
21 
22 extern void detect_ht(struct cpuinfo_x86 *c);
23 extern bool detect_extended_topology(struct cpuinfo_x86 *c);
24 
25 void cf_check early_init_amd(struct cpuinfo_x86 *c);
26 void amd_log_freq(const struct cpuinfo_x86 *c);
27 void amd_init_lfence(struct cpuinfo_x86 *c);
28 void amd_init_ssbd(const struct cpuinfo_x86 *c);
29 void amd_init_spectral_chicken(void);
30 void detect_zen2_null_seg_behaviour(void);
31 
32 void intel_unlock_cpuid_leaves(struct cpuinfo_x86 *c);
33 
34 #endif /* X86_CPU_H */
35