coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
microcode.c File Reference
#include <stdint.h>
#include <stddef.h>
#include <cbfs.h>
#include <arch/cpu.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/microcode.h>
#include <smp/spinlock.h>
Include dependency graph for microcode.c:

Go to the source code of this file.

Data Structures

struct  microcode
 
struct  ext_sig_table
 
struct  ext_sig_entry
 

Macros

#define MICROCODE_CBFS_FILE   "cpu_microcode_blob.bin"
 

Functions

static u32 read_microcode_rev (void)
 
void intel_microcode_load_unlocked (const void *microcode_patch)
 
uint32_t get_current_microcode_rev (void)
 
uint32_t get_microcode_rev (const void *microcode)
 
uint32_t get_microcode_size (const void *microcode)
 
uint32_t get_microcode_checksum (const void *microcode)
 
static struct ext_sig_tableucode_get_ext_sig_table (const struct microcode *ucode)
 
static const voidfind_cbfs_microcode (void)
 
const voidintel_microcode_find (void)
 
void intel_update_microcode_from_cbfs (void)
 

Macro Definition Documentation

◆ MICROCODE_CBFS_FILE

#define MICROCODE_CBFS_FILE   "cpu_microcode_blob.bin"

Definition at line 69 of file microcode.c.

Function Documentation

◆ find_cbfs_microcode()

static const void* find_cbfs_microcode ( void  )
static

◆ get_current_microcode_rev()

uint32_t get_current_microcode_rev ( void  )

Definition at line 112 of file microcode.c.

References read_microcode_rev().

Referenced by ap_init(), and report_cpu_info().

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

◆ get_microcode_checksum()

uint32_t get_microcode_checksum ( const void microcode)

Definition at line 127 of file microcode.c.

◆ get_microcode_rev()

uint32_t get_microcode_rev ( const void microcode)

Definition at line 117 of file microcode.c.

◆ get_microcode_size()

uint32_t get_microcode_size ( const void microcode)

Definition at line 122 of file microcode.c.

Referenced by fill_fsps_cpu_params().

Here is the caller graph for this function:

◆ intel_microcode_find()

const void* intel_microcode_find ( void  )

Definition at line 223 of file microcode.c.

References find_cbfs_microcode().

Referenced by coreboot_init_cpus(), cpx_init_cpus(), fill_fsps_cpu_params(), fill_in_pattrs(), get_microcode_info(), intel_update_microcode_from_cbfs(), per_cpu_smm_trigger(), pre_mp_init(), and sgx_configure().

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

◆ intel_microcode_load_unlocked()

void intel_microcode_load_unlocked ( const void microcode_patch)

◆ intel_update_microcode_from_cbfs()

void intel_update_microcode_from_cbfs ( void  )

Definition at line 242 of file microcode.c.

References intel_microcode_find(), intel_microcode_load_unlocked(), spin_lock, and spin_unlock.

Here is the call graph for this function:

◆ read_microcode_rev()

static u32 read_microcode_rev ( void  )
inlinestatic

Definition at line 44 of file microcode.c.

References msr_struct::hi, and msr_struct::lo.

Referenced by find_cbfs_microcode(), get_current_microcode_rev(), and intel_microcode_load_unlocked().

Here is the caller graph for this function:

◆ ucode_get_ext_sig_table()

static struct ext_sig_table* ucode_get_ext_sig_table ( const struct microcode ucode)
static

Definition at line 133 of file microcode.c.

References microcode::data_size, ext_sig_table::ext_sig_cnt, NULL, and microcode::total_size.

Referenced by find_cbfs_microcode().

Here is the caller graph for this function: