![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/cpu.h>
#include <stdint.h>
#include <cpu/amd/microcode.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/msr.h>
#include <cbfs.h>
#include <timestamp.h>
Go to the source code of this file.
Data Structures | |
struct | microcode |
Macros | |
#define | CPU_MICROCODE_BLOB_NAME "cpu_microcode_blob.bin" |
#define | MPB_MAX_SIZE CONFIG_SOC_AMD_COMMON_BLOCK_UCODE_SIZE |
#define | MPB_DATA_OFFSET 32 |
Functions | |
_Static_assert (CONFIG_SOC_AMD_COMMON_BLOCK_UCODE_SIZE > 0, "SOC_AMD_COMMON_BLOCK_UCODE_SIZE is not set") | |
_Static_assert (sizeof(struct microcode)==MPB_MAX_SIZE, "microcode size is invalid") | |
static void | apply_microcode_patch (const struct microcode *m) |
static uint16_t | get_equivalent_processor_rev_id (void) |
static const struct microcode * | find_microcode (const struct microcode *ucode, size_t ucode_len) |
void | amd_update_microcode_from_cbfs (void) |
void | preload_microcode (void) |
Variables | |
struct microcode | __packed |
#define CPU_MICROCODE_BLOB_NAME "cpu_microcode_blob.bin" |
Definition at line 13 of file update_microcode.c.
#define MPB_DATA_OFFSET 32 |
Definition at line 19 of file update_microcode.c.
#define MPB_MAX_SIZE CONFIG_SOC_AMD_COMMON_BLOCK_UCODE_SIZE |
Definition at line 18 of file update_microcode.c.
_Static_assert | ( | CONFIG_SOC_AMD_COMMON_BLOCK_UCODE_SIZE | , |
0 | , | ||
"SOC_AMD_COMMON_BLOCK_UCODE_SIZE is not set" | |||
) |
_Static_assert | ( | sizeof(struct microcode) | = =MPB_MAX_SIZE , |
"microcode size is invalid" | |||
) |
Definition at line 90 of file update_microcode.c.
References apply_microcode_patch(), BIOS_WARNING, cbfs_map(), cbfs_unmap(), CPU_MICROCODE_BLOB_NAME, find_microcode(), printk, timestamp_add_now(), TS_READ_UCODE_END, and TS_READ_UCODE_START.
Definition at line 43 of file update_microcode.c.
References BIOS_DEBUG, BIOS_ERR, BIOS_INFO, msr_struct::hi, IA32_BIOS_SIGN_ID, msr_struct::lo, m, MSR_PATCH_LOADER, printk, rdmsr(), and wrmsr().
Referenced by amd_update_microcode_from_cbfs().
|
static |
Definition at line 74 of file update_microcode.c.
References BIOS_WARNING, get_equivalent_processor_rev_id(), m, MPB_MAX_SIZE, NULL, and printk.
Referenced by amd_update_microcode_from_cbfs().
Definition at line 67 of file update_microcode.c.
References cpuid_eax().
Referenced by find_microcode().
Definition at line 127 of file update_microcode.c.
References BIOS_DEBUG, cbfs_preload(), CONFIG, CPU_MICROCODE_BLOB_NAME, and printk.