![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <types.h>
#include <string.h>
#include <device/device.h>
#include <device/pci.h>
#include <commonlib/helpers.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <cpu/x86/smm.h>
#include <cpu/intel/em64t101_save_state.h>
#include <cpu/intel/smm_reloc.h>
#include <console/console.h>
#include <smp/node.h>
Go to the source code of this file.
Macros | |
#define | SMRR_SUPPORTED (1 << 11) |
#define | D_OPEN (1 << 6) |
#define | D_CLS (1 << 5) |
#define | D_LCK (1 << 4) |
#define | G_SMRAME (1 << 3) |
#define | C_BASE_SEG ((0 << 2) | (1 << 1) | (0 << 0)) |
Functions | |
bool | cpu_has_alternative_smrr (void) |
static void | write_smrr_alt (struct smm_relocation_params *relo_params) |
static void | fill_in_relocation_params (struct smm_relocation_params *params) |
static void | setup_ied_area (struct smm_relocation_params *params) |
void | smm_lock (void) |
void | smm_info (uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size) |
void | smm_initialize (void) |
void | smm_relocation_handler (int cpu, uintptr_t curr_smbase, uintptr_t staggered_smbase) |
void | smm_relocate (void) |
#define C_BASE_SEG ((0 << 2) | (1 << 1) | (0 << 0)) |
Definition at line 26 of file smmrelocate.c.
#define D_CLS (1 << 5) |
Definition at line 23 of file smmrelocate.c.
#define D_LCK (1 << 4) |
Definition at line 24 of file smmrelocate.c.
#define D_OPEN (1 << 6) |
Definition at line 22 of file smmrelocate.c.
#define G_SMRAME (1 << 3) |
Definition at line 25 of file smmrelocate.c.
#define SMRR_SUPPORTED (1 << 11) |
Definition at line 20 of file smmrelocate.c.
Definition at line 31 of file smmrelocate.c.
References c, cpuid_eax(), and get_fms().
Referenced by fill_in_relocation_params(), per_cpu_smm_trigger(), and smm_relocation_handler().
|
static |
Definition at line 66 of file smmrelocate.c.
References BIOS_WARNING, cpu_has_alternative_smrr(), IS_ALIGNED, MTRR_PHYS_MASK_VALID, MTRR_TYPE_WRBACK, params, printk, smm_region(), smm_subregion(), and SMM_SUBREGION_CHIPSET.
Referenced by smm_info().
|
static |
Definition at line 95 of file smmrelocate.c.
References memcpy(), memset(), params, and ied_header::signature.
Referenced by smm_info().
Definition at line 125 of file smmrelocate.c.
References BIOS_DEBUG, fill_in_relocation_params(), smm_relocation_params::ied_size, printk, setup_ied_area(), smm_reloc_params, smm_subregion(), and SMM_SUBREGION_HANDLER.
Definition at line 143 of file smmrelocate.c.
References smm_initiate_relocation(), and smm_southbridge_clear_state().
Definition at line 114 of file smmrelocate.c.
References BIOS_DEBUG, C_BASE_SEG, D_LCK, G_SMRAME, northbridge_write_smram(), and printk.
Definition at line 205 of file smmrelocate.c.
References boot_cpu(), and smm_initiate_relocation().
Definition at line 158 of file smmrelocate.c.
References BIOS_DEBUG, BIOS_SPEW, cpu_has_alternative_smrr(), smm_relocation_params::ied_base, smm_relocation_params::ied_size, msr_struct::lo, MTRR_CAP_MSR, printk, rdmsr(), save_state, SMM_DEFAULT_SIZE, smm_reloc_params, SMRR_SUPPORTED, write_smrr(), and write_smrr_alt().
|
static |
Definition at line 47 of file smmrelocate.c.
References BIOS_DEBUG, BIOS_WARNING, CORE2_SMRR_PHYS_BASE, CORE2_SMRR_PHYS_MASK, FEATURE_CONTROL_LOCK_BIT, IA32_FEATURE_CONTROL, msr_struct::lo, printk, rdmsr(), smm_relocation_params::smrr_base, SMRR_ENABLE, smm_relocation_params::smrr_mask, and wrmsr().
Referenced by smm_relocation_handler().