coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cpu.c File Reference
#include <console/console.h>
#include <device/pci.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/smm_reloc.h>
#include <cpu/intel/turbo.h>
#include <intelblocks/cpulib.h>
#include <intelblocks/mp_init.h>
#include <soc/cpu.h>
#include <soc/msr.h>
#include <soc/pci_devs.h>
#include <soc/systemagent.h>
#include <cpu/x86/mtrr.h>
#include <cpu/intel/microcode.h>
#include <cpu/intel/common/common.h>
#include <types.h>
#include "chip.h"
Include dependency graph for cpu.c:

Go to the source code of this file.

Functions

bool cpu_soc_is_in_untrusted_mode (void)
 
static void soc_fsp_load (void)
 
static void configure_misc (void)
 
static void configure_c_states (const config_t *const cfg)
 
void soc_core_init (struct device *cpu)
 
static void per_cpu_smm_trigger (void)
 
void smm_lock (void)
 
static void post_mp_init (void)
 
void soc_init_cpus (struct bus *cpu_bus)
 
int soc_skip_ucode_update (u32 current_patch_id, u32 new_patch_id)
 

Variables

static const struct mp_ops mp_ops
 

Function Documentation

◆ configure_c_states()

◆ configure_misc()

static void configure_misc ( void  )
static

Definition at line 35 of file cpu.c.

References config_of_soc, cpu_set_eist(), msr_struct::hi, IA32_MISC_ENABLE, IA32_PACKAGE_THERM_INTERRUPT, IA32_THERM_INTERRUPT, msr_struct::lo, MSR_POWER_CTL, rdmsr(), and wrmsr().

Referenced by soc_core_init().

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

◆ cpu_soc_is_in_untrusted_mode()

bool cpu_soc_is_in_untrusted_mode ( void  )

Definition at line 22 of file cpu.c.

References ENABLE_IA_UNTRUSTED, msr_struct::lo, MSR_BIOS_DONE, and rdmsr().

Here is the call graph for this function:

◆ per_cpu_smm_trigger()

static void per_cpu_smm_trigger ( void  )
static

Definition at line 148 of file cpu.c.

References smm_relocate().

Here is the call graph for this function:

◆ post_mp_init()

static void post_mp_init ( void  )
static

Definition at line 166 of file cpu.c.

◆ smm_lock()

void smm_lock ( void  )

Definition at line 154 of file cpu.c.

References BIOS_DEBUG, C_BASE_SEG, D_LCK, G_SMRAME, pci_write_config8(), pcidev_path_on_root(), printk, SA_DEVFN_ROOT, and SMRAM.

Referenced by post_mp_init().

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

◆ soc_core_init()

◆ soc_fsp_load()

static void soc_fsp_load ( void  )
static

Definition at line 30 of file cpu.c.

References fsps_load().

Here is the call graph for this function:

◆ soc_init_cpus()

void soc_init_cpus ( struct bus cpu_bus)

Definition at line 197 of file cpu.c.

References configure_tcc_thermal_target(), and mp_init_with_smm().

Here is the call graph for this function:

◆ soc_skip_ucode_update()

int soc_skip_ucode_update ( u32  current_patch_id,
u32  new_patch_id 
)

Definition at line 206 of file cpu.c.

Variable Documentation

◆ mp_ops

const struct mp_ops mp_ops
static
Initial value:
= {
.pre_mp_init = soc_fsp_load,
.get_cpu_count = get_cpu_count,
.get_smm_info = smm_info,
.get_microcode_info = get_microcode_info,
.pre_mp_smm_init = smm_initialize,
.per_cpu_smm_trigger = per_cpu_smm_trigger,
.relocation_handler = smm_relocation_handler,
.post_mp_init = post_mp_init,
}
void smm_relocation_handler(int cpu, uintptr_t curr_smbase, uintptr_t staggered_smbase)
Definition: smmrelocate.c:90
void smm_initialize(void)
Definition: smmrelocate.c:227
void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size)
Definition: smmrelocate.c:213
int get_cpu_count(void)
Definition: cpu.c:10
void get_microcode_info(const void **microcode, int *parallel)
Definition: cpu.c:180
static void soc_fsp_load(void)
Definition: cpu.c:30
static void per_cpu_smm_trigger(void)
Definition: cpu.c:148
static void post_mp_init(void)
Definition: cpu.c:166

Definition at line 166 of file cpu.c.