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.h>
#include <region_file.h>
#include <string.h>
#include <symbols.h>
#include <cbmem.h>
#include <bootstate.h>
#include <vb2_sha.h>
Go to the source code of this file.
Functions | |
static struct tcpa_table * | tcpa_cbmem_init (void) |
struct tcpa_table * | tcpa_log_init (void) |
Get the pointer to the single instance of global tcpa log data, and initialize it when necessary. More... | |
void | tcpa_log_dump (void *unused) |
Dump TCPA log entries on console. More... | |
void | tcpa_log_add_table_entry (const char *name, const uint32_t pcr, enum vb2_hash_algorithm digest_algo, const uint8_t *digest, const size_t digest_len) |
Add table entry for cbmem TCPA log. More... | |
void | tcpa_preram_log_clear (void) |
Clears the pre-RAM tcpa log data and initializes any content with default values. More... | |
static void | recover_tcpa_log (int is_recovery) |
ROMSTAGE_CBMEM_INIT_HOOK (recover_tcpa_log) | |
BOOT_STATE_INIT_ENTRY (BS_PAYLOAD_BOOT, BS_ON_ENTRY, tcpa_log_dump, NULL) | |
BOOT_STATE_INIT_ENTRY | ( | BS_PAYLOAD_BOOT | , |
BS_ON_ENTRY | , | ||
tcpa_log_dump | , | ||
NULL | |||
) |
|
static |
Definition at line 125 of file log.c.
References BIOS_WARNING, tcpa_entry::digest, tcpa_entry::digest_length, tcpa_entry::digest_type, tcpa_table::entries, MAX_PRERAM_TCPA_LOG_ENTRIES, memcpy(), MIN, tcpa_entry::name, NULL, tcpa_table::num_entries, tcpa_entry::pcr, printk, strncpy(), tcpa_cbmem_init(), TCPA_DIGEST_MAX_LENGTH, TCPA_PCR_HASH_LEN, and TCPA_PCR_HASH_NAME.
ROMSTAGE_CBMEM_INIT_HOOK | ( | recover_tcpa_log | ) |
|
static |
Definition at line 12 of file log.c.
References cbmem_add(), cbmem_find(), CBMEM_ID_TCPA_LOG, cbmem_possibly_online(), tcpa_table::max_entries, MAX_TCPA_LOG_ENTRIES, and tcpa_table::num_entries.
Referenced by recover_tcpa_log(), and tcpa_log_init().
void tcpa_log_add_table_entry | ( | const char * | name, |
const uint32_t | pcr, | ||
enum vb2_hash_algorithm | digest_algo, | ||
const uint8_t * | digest, | ||
const size_t | digest_len | ||
) |
Add table entry for cbmem TCPA log.
name | Name of the hashed data |
pcr | PCR used to extend hashed data |
diget_algo | sets the digest algorithm |
digest | sets the hash extended into the tpm |
digest_len | the length of the digest |
Definition at line 79 of file log.c.
References BIOS_WARNING, tcpa_entry::digest, tcpa_entry::digest_length, tcpa_entry::digest_type, tcpa_table::entries, tcpa_table::max_entries, memcpy(), name, tcpa_entry::name, tcpa_table::num_entries, tcpa_entry::pcr, printk, strncpy(), TCPA_DIGEST_MAX_LENGTH, tcpa_log_init(), TCPA_PCR_HASH_LEN, and TCPA_PCR_HASH_NAME.
Referenced by tpm_extend_pcr().
Dump TCPA log entries on console.
Definition at line 54 of file log.c.
References BIOS_INFO, tcpa_entry::digest, tcpa_entry::digest_length, tcpa_entry::digest_type, tcpa_table::entries, tcpa_entry::name, tcpa_table::num_entries, tcpa_entry::pcr, printk, and tcpa_log_init().
struct tcpa_table* tcpa_log_init | ( | void | ) |
Get the pointer to the single instance of global tcpa log data, and initialize it when necessary.
Definition at line 33 of file log.c.
References cbmem_possibly_online(), CONFIG, ENV_ROMSTAGE, and tcpa_cbmem_init().
Referenced by tcpa_log_add_table_entry(), tcpa_log_dump(), and tspi_measure_cache_to_pcr().
Clears the pre-RAM tcpa log data and initializes any content with default values.
Definition at line 116 of file log.c.
References BIOS_INFO, tcpa_table::max_entries, MAX_TCPA_LOG_ENTRIES, tcpa_table::num_entries, and printk.
Referenced by tspi_init_crtm().