mb/starlabs/*: Correct config for SATA DEVSLP GPIO
[coreboot.git] / src / cpu / intel / common / common.h
blobd28d95c5c8179e51597404aecd44416a5e0ca85e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _CPU_INTEL_COMMON_H
4 #define _CPU_INTEL_COMMON_H
6 #include <types.h>
7 #include <acpi/acpigen.h>
9 void set_vmx_and_lock(void);
10 void set_feature_ctrl_vmx(void);
11 void set_feature_ctrl_vmx_arg(bool enable);
12 void set_feature_ctrl_lock(void);
15 * Init CPPC block with MSRs for Intel Enhanced Speed Step Technology.
16 * Version 2 is suggested--this function's implementation of version 3
17 * may have room for improvement.
19 struct cppc_config;
20 void cpu_init_cppc_config(struct cppc_config *config, u32 version);
23 * Returns true if CPU supports Hyper-Threading.
25 bool intel_ht_supported(void);
28 * Returns true if it's not thread 0 on a hyperthreading enabled core.
30 bool intel_ht_sibling(void);
33 * Lock AES-NI feature (MSR_FEATURE_CONFIG) to prevent unintended changes
34 * to the enablement state as suggested in Intel document 325384-070US.
36 void set_aesni_lock(void);
38 /* Enable local CPU APIC TPR (Task Priority Register) updates */
39 void enable_lapic_tpr(void);
41 /* Enable DCA (Direct Cache Access) */
42 void configure_dca_cap(void);
45 * Set EPB (Energy Performance Bias)
46 * Possible values are 0 (performance) to 15 (powersave).
48 void set_energy_perf_bias(u8 policy);
51 * Check energy performance preference and HWP capabilities from Thermal and
52 * Power Management Leaf CPUID.
54 bool check_energy_perf_cap(void);
57 * Set the IA32_HWP_REQUEST Energy-Performance Preference bits on the logical
58 * thread. 0 is a hint to the HWP to prefer performance, and 255 is a hint to
59 * prefer energy efficiency.
61 void set_energy_perf_pref(u8 pref);
64 * Instructs the CPU to use EPP hints. This means that any energy policies set
65 * up in `set_energy_perf_bias` will be ignored afterwards.
67 void enable_energy_perf_pref(void);
70 * Check if Total Memory Encryption (TME) is supported by the CPU
72 * coreboot shall detect the existence of TME feature by running CPUID instruction:
73 * CPUID leaf 7/sub-leaf 0: Return Value in ECX [bit 13] = 1
75 bool is_tme_supported(void);
77 #endif