coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
common_init.c File Reference
#include <acpi/acpigen.h>
#include <arch/cpu.h>
#include <console/console.h>
#include <cpu/intel/msr.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/turbo.h>
#include "common.h"
Include dependency graph for common_init.c:

Go to the source code of this file.

Macros

#define CPUID_6_ECX_EPB   (1 << 3)
 
#define CPUID_6_ENGERY_PERF_PREF   (1 << 10)
 
#define CPUID_6_HWP   (1 << 7)
 

Functions

void set_vmx_and_lock (void)
 
void set_feature_ctrl_vmx_arg (bool enable)
 
void set_feature_ctrl_vmx (void)
 
void set_feature_ctrl_lock (void)
 
void cpu_init_cppc_config (struct cppc_config *config, u32 version)
 
void set_aesni_lock (void)
 
void enable_lapic_tpr (void)
 
void configure_dca_cap (void)
 
void set_energy_perf_bias (u8 policy)
 
bool check_energy_perf_cap (void)
 
void enable_energy_perf_pref (void)
 
void set_energy_perf_pref (u8 pref)
 

Macro Definition Documentation

◆ CPUID_6_ECX_EPB

#define CPUID_6_ECX_EPB   (1 << 3)

Definition at line 11 of file common_init.c.

◆ CPUID_6_ENGERY_PERF_PREF

#define CPUID_6_ENGERY_PERF_PREF   (1 << 10)

Definition at line 12 of file common_init.c.

◆ CPUID_6_HWP

#define CPUID_6_HWP   (1 << 7)

Definition at line 13 of file common_init.c.

Function Documentation

◆ check_energy_perf_cap()

bool check_energy_perf_cap ( void  )

Definition at line 193 of file common_init.c.

References CPUID_6_ENGERY_PERF_PREF, CPUID_6_HWP, cpuid_eax(), and CPUID_LEAF_PM.

Referenced by pre_mp_init(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configure_dca_cap()

void configure_dca_cap ( void  )

Definition at line 172 of file common_init.c.

References cpu_get_feature_flags_ecx(), CPUID_DCA, DCA_TYPE0_EN, IA32_PLATFORM_DCA_CAP, and msr_set().

Referenced by cpu_core_init(), model_206ax_init(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpu_init_cppc_config()

void cpu_init_cppc_config ( struct cppc_config config,
u32  version 
)

Definition at line 111 of file common_init.c.

◆ enable_energy_perf_pref()

void enable_energy_perf_pref ( void  )

Definition at line 207 of file common_init.c.

References BIOS_DEBUG, HWP_ENABLE, IA32_PM_ENABLE, msr_struct::lo, msr_set(), printk, and rdmsr().

Referenced by pre_mp_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable_lapic_tpr()

void enable_lapic_tpr ( void  )

Definition at line 167 of file common_init.c.

References MSR_PIC_MSG_CONTROL, msr_unset(), and TPR_UPDATES_DISABLE.

Referenced by cpu_core_init(), model_2065x_init(), model_206ax_init(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_aesni_lock()

void set_aesni_lock ( void  )

Definition at line 146 of file common_init.c.

References AESNI_LOCK, CONFIG, cpu_get_feature_flags_ecx(), CPUID_AES, intel_ht_sibling(), msr_struct::lo, MSR_FEATURE_CONFIG, msr_set(), and rdmsr().

Referenced by model_2065x_init(), model_206ax_init(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_energy_perf_bias()

void set_energy_perf_bias ( u8  policy)

Definition at line 178 of file common_init.c.

References BIOS_DEBUG, CPUID_6_ECX_EPB, cpuid_ecx(), ENERGY_POLICY_MASK, IA32_ENERGY_PERF_BIAS, msr_unset_and_set(), and printk.

Referenced by cpu_core_init(), model_206ax_init(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_energy_perf_pref()

void set_energy_perf_pref ( u8  pref)

Definition at line 223 of file common_init.c.

References IA32_HWP_REQUEST, IA32_HWP_REQUEST_EPP_MASK, IA32_HWP_REQUEST_EPP_SHIFT, and msr_unset_and_set().

Referenced by soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_feature_ctrl_lock()

void set_feature_ctrl_lock ( void  )

Definition at line 72 of file common_init.c.

References BIOS_DEBUG, CONFIG, cpu_get_feature_flags_ecx(), CPUID_SMX, CPUID_VMX, IA32_FEATURE_CONTROL, msr_struct::lo, lock(), printk, rdmsr(), and wrmsr().

Referenced by fc_lock_configure(), set_vmx_and_lock(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_feature_ctrl_vmx()

void set_feature_ctrl_vmx ( void  )

Definition at line 67 of file common_init.c.

References CONFIG, and set_feature_ctrl_vmx_arg().

Referenced by per_cpu_smm_trigger(), set_vmx_and_lock(), and vmx_configure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_feature_ctrl_vmx_arg()

void set_feature_ctrl_vmx_arg ( bool  enable)

Definition at line 21 of file common_init.c.

References BIOS_DEBUG, CONFIG, cpu_get_feature_flags_ecx(), CPUID_SMX, CPUID_VMX, msr_struct::hi, IA32_FEATURE_CONTROL, msr_struct::lo, printk, rdmsr(), and wrmsr().

Referenced by set_feature_ctrl_vmx(), and soc_core_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_vmx_and_lock()

void set_vmx_and_lock ( void  )

Definition at line 15 of file common_init.c.

References set_feature_ctrl_lock(), and set_feature_ctrl_vmx().

Referenced by cpu_core_init(), model_2065x_init(), model_206ax_init(), and per_cpu_smm_trigger().

Here is the call graph for this function:
Here is the caller graph for this function: