![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <security/intel/stm/StmApi.h>
#include <security/intel/stm/SmmStm.h>
#include <security/intel/stm/StmPlatformResource.h>
#include <security/tpm/tspi.h>
#include <cpu/x86/smm.h>
#include <cpu/x86/msr.h>
#include <cbfs.h>
#include <console/console.h>
#include <stdbool.h>
#include <stdint.h>
#include <arch/rom_segs.h>
Go to the source code of this file.
Data Structures | |
struct | descriptor |
Macros | |
#define | FXSAVE_SIZE 512 |
Functions | |
int | load_stm_image (uintptr_t mseg) |
static void | read_gdtr (struct descriptor *gdtr) |
void | setup_smm_descriptor (void *smbase, int32_t apic_id, int32_t entry32_off) |
void | stm_setup (uintptr_t mseg, int cpu, uintptr_t smbase, uintptr_t base_smbase, uint32_t offset32) |
Variables | |
uint8_t * | stm_resource_heap |
static int | stm_load_status = 0 |
#define FXSAVE_SIZE 512 |
Definition at line 135 of file StmPlatformSmm.c.
int load_stm_image | ( | uintptr_t | mseg | ) |
Definition at line 21 of file StmPlatformSmm.c.
References BIOS_DEBUG, cbfs_load(), HARDWARE_STM_HEADER::cr3_offset, STM_HEADER::hw_stm_hdr, memset(), HARDWARE_STM_HEADER::monitor_features, printk, SOFTWARE_STM_HEADER::static_image_size, stm_check_stm_image(), stm_gen_4g_pagetable_x64(), HARDWARE_STM_HEADER::stm_header_revision, and STM_HEADER::sw_stm_hdr.
Referenced by stm_setup().
|
static |
Definition at line 75 of file StmPlatformSmm.c.
Referenced by setup_smm_descriptor().
Definition at line 80 of file StmPlatformSmm.c.
References TXT_PROCESSOR_SMM_DESCRIPTOR::acpi_rsdp, descriptor::base, BIOS_DEBUG, TXT_PROCESSOR_SMM_DESCRIPTOR::bios_hw_resource_requirements_ptr, get_stm_resource(), descriptor::limit, TXT_PROCESSOR_SMM_DESCRIPTOR::local_apic_id, memcpy(), memset(), printk, read_gdtr(), ROM_CODE_SEG, ROM_DATA_SEG, TXT_PROCESSOR_SMM_DESCRIPTOR::signature, TXT_PROCESSOR_SMM_DESCRIPTOR::size, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_cs, SMM_DEFAULT_BASE, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_descriptor_ver_major, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_descriptor_ver_minor, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_ds, SMM_ENTRY_OFFSET, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_gdt_ptr, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_gdt_size, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_other_segment, SMM_PSD_OFFSET, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_smi_handler_rip, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_ss, SMM_TASK_STATE_SEG, TXT_PROCESSOR_SMM_DESCRIPTOR::smm_tr, TXT_PROCESSOR_SMM_DESCRIPTOR_SIGNATURE, TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MAJOR, and TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR.
Referenced by stm_setup().
void stm_setup | ( | uintptr_t | mseg, |
int | cpu, | ||
uintptr_t | smbase, | ||
uintptr_t | base_smbase, | ||
uint32_t | offset32 | ||
) |
Definition at line 139 of file StmPlatformSmm.c.
References add_resources_cmd(), BIOS_DEBUG, BIOS_WARNING, msr_struct::hi, IA32_SMM_MONITOR_CTL_MSR, IA32_SMM_MONITOR_VALID, IA32_VMX_BASIC_MSR, msr_struct::lo, load_stm_image(), printk, rdmsr(), setup_smm_descriptor(), stm_load_status, stm_resource_heap, VMX_BASIC_HI_DUAL_MONITOR, and wrmsr().
Referenced by smm_do_relocation().
|
static |
Definition at line 137 of file StmPlatformSmm.c.
Referenced by stm_setup().
|
extern |
Definition at line 95 of file SmmStm.c.
Referenced by add_pi_resource(), and stm_setup().