coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
getsec.c File Reference
#include <cf9_reset.h>
#include <console/console.h>
#include <cpu/intel/common/common.h>
#include <cpu/x86/cr.h>
#include <cpu/x86/cache.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/msr.h>
#include <types.h>
#include "txt_register.h"
#include "txt_getsec.h"
Include dependency graph for getsec.c:

Go to the source code of this file.

Functions

static bool getsec_enabled (void)
 Check for SMX support and enable it if possible. More...
 
void enable_getsec_or_reset (void)
 
bool getsec_parameter (uint32_t *version_mask, uint32_t *version_numbers_supported, uint32_t *max_size_acm_area, uint32_t *memory_type_mask, uint32_t *senter_function_disable, uint32_t *txt_feature_flags)
 Get information as returned by getsec[PARAMETER]. More...
 
bool getsec_capabilities (uint32_t *eax)
 Get capabilities as returned by getsec[CAPABILITIES]. More...
 

Function Documentation

◆ enable_getsec_or_reset()

void enable_getsec_or_reset ( void  )

Definition at line 56 of file getsec.c.

References BIOS_NOTICE, FEATURE_CONTROL_LOCK_BIT, full_reset(), IA32_FEATURE_CONTROL, msr_struct::lo, printk, rdmsr(), and wrmsr().

Here is the call graph for this function:

◆ getsec_capabilities()

bool getsec_capabilities ( uint32_t eax)

Get capabilities as returned by getsec[CAPABILITIES].

Returns false on error, true on success.

Definition at line 147 of file getsec.c.

References getsec_enabled(), and IA32_GETSEC_CAPABILITIES.

Referenced by intel_txt_prepare_txt_env(), and is_txt_chipset().

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

◆ getsec_enabled()

static bool getsec_enabled ( void  )
static

Check for SMX support and enable it if possible.

Returns false on error, true on success.

Definition at line 20 of file getsec.c.

References BIOS_ERR, cpuid_ecx(), CPUID_SMX, CPUID_VMX, CR4_SMXE, ENV_ROMSTAGE_OR_BEFORE, IA32_FEATURE_CONTROL, msr_struct::lo, printk, rdmsr(), read_cr4(), and write_cr4().

Referenced by getsec_capabilities(), and getsec_parameter().

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

◆ getsec_parameter()

bool getsec_parameter ( uint32_t version_mask,
uint32_t version_numbers_supported,
uint32_t max_size_acm_area,
uint32_t memory_type_mask,
uint32_t senter_function_disable,
uint32_t txt_feature_flags 
)

Get information as returned by getsec[PARAMETER].

Arguments can be set to NULL if not needed.

Returns false on error, true on success.

Definition at line 89 of file getsec.c.

References getsec_enabled(), and IA32_GETSEC_PARAMETERS.

Referenced by intel_txt_prepare_txt_env(), lockdown_intel_txt(), txt_dump_getsec_parameters(), and validate_acm().

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