![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <security/tpm/tspi/crtm.h>
#include <security/tpm/tspi.h>
#include <security/tpm/tss.h>
#include <assert.h>
#include <security/vboot/misc.h>
#include <vb2_api.h>
#include <vb2_sha.h>
Go to the source code of this file.
Functions | |
static uint32_t | tpm_setup_s3_helper (void) |
static uint32_t | tpm_setup_epilogue (uint32_t result) |
static int | tspi_tpm_is_setup (void) |
uint32_t | tpm_setup (int s3flag) |
Start the TPM and establish the root of trust. More... | |
uint32_t | tpm_clear_and_reenable (void) |
Issue a TPM_Clear and re-enable/reactivate the TPM. More... | |
uint32_t | tpm_extend_pcr (int pcr, enum vb2_hash_algorithm digest_algo, const uint8_t *digest, size_t digest_len, const char *name) |
Ask vboot for a digest and extend a TPM PCR with it. More... | |
Variables | |
static int | tpm_is_setup |
Issue a TPM_Clear and re-enable/reactivate the TPM.
Definition at line 192 of file tspi.c.
References BIOS_ERR, BIOS_INFO, printk, tlcl_force_clear(), tlcl_set_deactivated(), tlcl_set_enable(), and TPM_SUCCESS.
Referenced by _factory_initialize_tpm(), safe_define_space(), safe_write(), and vb2ex_tpm_clear_owner().
uint32_t tpm_extend_pcr | ( | int | pcr, |
enum vb2_hash_algorithm | digest_algo, | ||
const uint8_t * | digest, | ||
size_t | digest_len, | ||
const char * | name | ||
) |
Ask vboot for a digest and extend a TPM PCR with it.
pcr | sets the pcr index |
diget_algo | sets the digest algorithm |
digest | sets the hash to extend into the tpm |
digest_len | the length of the digest |
name | sets additional info where the digest comes from |
Definition at line 220 of file tspi.c.
References BIOS_DEBUG, BIOS_ERR, CONFIG, name, NULL, printk, tcpa_log_add_table_entry(), tlcl_extend(), tlcl_lib_init(), TPM_E_IOERROR, TPM_SUCCESS, and tspi_tpm_is_setup().
Referenced by tspi_cbfs_measurement(), and vboot_extend_pcr().
uint32_t tpm_setup | ( | int | s3flag | ) |
Start the TPM and establish the root of trust.
s3flag | tells the tpm setup if we wake up from a s3 state on x86 |
Definition at line 135 of file tspi.c.
References BIOS_DEBUG, BIOS_ERR, BIOS_INFO, CONFIG, printk, tlcl_assert_physical_presence(), tlcl_lib_init(), tlcl_physical_presence_cmd_enable(), tlcl_startup(), TPM_E_INVALID_POSTINIT, tpm_is_setup, tpm_setup_epilogue(), tpm_setup_s3_helper(), TPM_SUCCESS, and tspi_measure_cache_to_pcr().
Referenced by bootblock_main_with_timestamp(), init_tpm_dev(), psp_verstage_s0i3_resume(), and vboot_setup_tpm().
Definition at line 80 of file tspi.c.
References BIOS_INFO, post_code, POST_TPM_FAILURE, printk, and TPM_SUCCESS.
Referenced by tpm_setup().
Definition at line 54 of file tspi.c.
References BIOS_ERR, BIOS_INFO, printk, tlcl_resume(), TPM_E_INVALID_POSTINIT, and TPM_SUCCESS.
Referenced by tpm_setup().
|
inlinestatic |
Definition at line 91 of file tspi.c.
References CONFIG, ENV_BOOTBLOCK, ENV_RAMSTAGE, tpm_is_setup, vboot_logic_executed(), and verification_should_run().
Referenced by tpm_extend_pcr().
|
static |
Definition at line 90 of file tspi.c.
Referenced by tpm_setup(), and tspi_tpm_is_setup().