![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <arch/mmio.h>
#include <console/console.h>
#include <cbfs.h>
#include <cpu/x86/cr.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/msr.h>
#include <cpu/x86/mtrr.h>
#include <lib.h>
#include <smp/node.h>
#include <string.h>
#include <types.h>
#include <cf9_reset.h>
#include "txt.h"
#include "txt_register.h"
#include "txt_getsec.h"
Go to the source code of this file.
Macros | |
#define | MCU_BASE_ADDR (TXT_BASE + 0x278) |
#define | BIOACM_ADDR (TXT_BASE + 0x27c) |
#define | APINIT_ADDR (TXT_BASE + 0x290) |
#define | SEMAPHORE (TXT_BASE + 0x294) |
Functions | |
void __noreturn | txt_reset_platform (void) |
int | intel_txt_log_acm_error (const uint32_t acm_error) |
Dump the ACM error status bits. More... | |
void | intel_txt_log_spad (void) |
bool | intel_txt_memory_has_secrets (void) |
bool | intel_txt_chipset_is_production_fused (void) |
static struct acm_info_table * | find_info_table (const void *ptr) |
static int | validate_acm (const void *ptr) |
Validate that the provided ACM is usable on this platform. More... | |
static void * | intel_txt_prepare_bios_acm (size_t *acm_len) |
void | intel_txt_run_sclean (void) |
int | intel_txt_run_bios_acm (const u8 input_params) |
static bool | check_precondition (const int cond) |
bool | intel_txt_prepare_txt_env (void) |
|
static |
Definition at line 382 of file common.c.
References BIOS_DEBUG, and printk.
Referenced by intel_txt_prepare_txt_env().
|
static |
Definition at line 165 of file common.c.
References acm_header_v0::header_len, and acm_header_v0::scratch_size.
Referenced by validate_acm().
Definition at line 149 of file common.c.
References read32(), true, TXT_VER_FSBIF, TXT_VER_PRODUCTION_FUSED, TXT_VER_QPIIF, and UINT32_MAX.
Referenced by txt_dump_chipset_info(), and validate_acm().
int intel_txt_log_acm_error | ( | const uint32_t | acm_error | ) |
Dump the ACM error status bits.
acm_error | The status register to dump |
Definition at line 49 of file common.c.
References ACMERROR_TXT_AC_MODULE_TYPE_BIOS, ACMERROR_TXT_AC_MODULE_TYPE_SINIT, ACMERROR_TXT_CLASS_CODE, ACMERROR_TXT_CLASS_SHIFT, ACMERROR_TXT_EXTERNAL, ACMERROR_TXT_MAJOR_CODE, ACMERROR_TXT_MAJOR_SHIFT, ACMERROR_TXT_MINOR_CODE, ACMERROR_TXT_MINOR_SHIFT, ACMERROR_TXT_PROGRESS_CODE, ACMERROR_TXT_PROGRESS_SHIFT, ACMERROR_TXT_TYPE_CODE, ACMERROR_TXT_TYPE_SHIFT, ACMERROR_TXT_VALID, BIOS_ERR, printk, and type.
Referenced by check_secrets_txt(), intel_txt_log_bios_acm_error(), intel_txt_run_bios_acm(), and mainboard_romstage_entry().
Definition at line 101 of file common.c.
References ACMSTS_BIOS_TRUSTED, ACMSTS_IBB_MEASURED, ACMSTS_TXT_DISABLED, ACMSTS_VERIFICATION_ERROR, BIOS_INFO, printk, read64(), and TXT_SPAD.
Referenced by init_intel_txt(), and mainboard_romstage_entry().
Definition at line 135 of file common.c.
References BIOS_CRIT, CONFIG, printk, read64(), read8(), TXT_E2STS, TXT_E2STS_SECRET_STS, TXT_ESTS, and TXT_ESTS_WAKE_ERROR_STS.
Referenced by check_secrets_txt(), mainboard_romstage_entry(), and security_clear_dram_request().
Definition at line 238 of file common.c.
References ALIGN_UP, BIOS_ERR, cbfs_map(), cbfs_unmap(), CONFIG, get_var_mtrr_count(), IS_ALIGNED, log2_ceil(), NULL, popcnt(), printk, txt_dump_acm_info(), and validate_acm().
Referenced by intel_txt_run_bios_acm(), and intel_txt_run_sclean().
Definition at line 394 of file common.c.
References ACMSTS_TXT_DISABLED, BIOS_DEBUG, BIOS_ERR, BIOS_INFO, BIT, boot_cpu(), check_precondition(), CONFIG, cpuid_ecx(), CPUID_SMX, CPUID_VMX, FEATURE_ENABLE_VMX, getsec_capabilities(), getsec_parameter(), GETSEC_PARAMS_TXT_EXT_MACHINE_CHECK, msr_struct::hi, IA32_FEATURE_CONTROL, IA32_MC_STATUS, IA32_MCG_STATUS, msr_struct::lo, mca_get_bank_count(), MCA_STATUS_HI_UC, mp_park_aps(), NULL, printk, rdmsr(), read64(), txt_dump_getsec_parameters(), txt_reset_platform(), and TXT_SPAD.
Referenced by init_intel_txt().
int intel_txt_run_bios_acm | ( | const u8 | input_params | ) |
Definition at line 353 of file common.c.
References ACMERROR_TXT_VALID, BIOS_ERR, cbfs_unmap(), getsec_enteraccs(), intel_txt_log_acm_error(), intel_txt_prepare_bios_acm(), printk, read32(), read64(), TXT_BIOSACM_ERRORCODE, and TXT_SPAD.
Referenced by check_secrets_txt(), init_intel_txt(), and lockdown_intel_txt().
Definition at line 313 of file common.c.
References BIOACM_ADDR, BIOS_ALERT, BIOS_CRIT, cbfs_unmap(), getsec_sclean(), intel_txt_prepare_bios_acm(), printk, SEMAPHORE, and write32().
Referenced by intel_txt_romstage_init().
void __noreturn txt_reset_platform | ( | void | ) |
Definition at line 29 of file common.c.
References full_reset(), global_reset(), and set_global_reset().
Referenced by intel_txt_prepare_txt_env(), and intel_txt_romstage_init().
|
static |
Validate that the provided ACM is usable on this platform.
Definition at line 176 of file common.c.
References ACM_E_CANT_CALL_GETSEC, ACM_E_MODULE_SUB_TYPE_WRONG, ACM_E_MODULE_VENDOR_NOT_INTEL, ACM_E_NO_INFO_TABLE, ACM_E_NOT_BIOS_ACM, ACM_E_NOT_FIT_INTO_CPU_ACM_MEM, ACM_E_PLATFORM_IS_NOT_PROD, ACM_E_SIZE_INCORRECT, ACM_E_TYPE_NOT_MATCH, ACM_E_UUID_NOT_MATCH, ACM_FORMAT_FLAGS_DEBUG, BIOS, BIOS_ERR, CHIPSET_ACM, find_info_table(), acm_header_v0::flags, getsec_parameter(), acm_header_v0::header_len, info, INTEL_ACM_VENDOR, intel_txt_chipset_is_production_fused(), log2_ceil(), memcmp(), acm_header_v0::module_sub_type, acm_header_v0::module_type, acm_header_v0::module_vendor, NULL, printk, acm_header_v0::scratch_size, and acm_header_v0::size.
Referenced by intel_txt_prepare_bios_acm().