diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2022-11-10 00:40:51 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-01-11 16:00:55 +0000 |
commit | 2710df765bad08d8200c70399ace5e78d3d1cecc (patch) | |
tree | 91d7d24f8e5117077c577f8c6b973e97c0944647 /util | |
parent | 16a444c5011e70298ebd9546a39f9d8b61d95030 (diff) |
treewide: stop calling custom TPM log "TCPA"
TCPA usually refers to log described by TPM 1.2 specification.
Change-Id: I896bd94f18b34d6c4b280f58b011d704df3d4022
Ticket: https://ticket.coreboot.org/issues/423
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/cbmem/cbmem.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index b1c2f89515..c0b39ea6d0 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -21,7 +21,7 @@ #include <commonlib/bsd/cbmem_id.h> #include <commonlib/loglevel.h> #include <commonlib/timestamp_serialized.h> -#include <commonlib/tcpa_log_serialized.h> +#include <commonlib/tpm_log_serialized.h> #include <commonlib/coreboot_tables.h> #ifdef __OpenBSD__ @@ -267,7 +267,7 @@ static int find_cbmem_entry(uint32_t id, uint64_t *addr, size_t *size) static struct lb_cbmem_ref timestamps; static struct lb_cbmem_ref console; -static struct lb_cbmem_ref tcpa_log; +static struct lb_cbmem_ref tpm_cb_log; static struct lb_memory_range cbmem; /* This is a work-around for a nasty problem introduced by initially having @@ -336,9 +336,9 @@ static int parse_cbtable_entries(const struct mapping *table_mapping) console = parse_cbmem_ref((struct lb_cbmem_ref *)lbr_p); continue; } - case LB_TAG_TCPA_LOG: { - debug(" Found tcpa log table.\n"); - tcpa_log = + case LB_TAG_TPM_CB_LOG: { + debug(" Found TPM CB log table.\n"); + tpm_cb_log = parse_cbmem_ref((struct lb_cbmem_ref *)lbr_p); continue; } @@ -843,35 +843,35 @@ static void timestamp_add_now(uint32_t timestamp_id) unmap_memory(×tamp_mapping); } -/* dump the tcpa log table */ -static void dump_tcpa_log(void) +/* dump the TPM CB log table */ +static void dump_tpm_cb_log(void) { - const struct tcpa_table *tclt_p; + const struct tpm_cb_log_table *tclt_p; size_t size; - struct mapping tcpa_mapping; + struct mapping log_mapping; - if (tcpa_log.tag != LB_TAG_TCPA_LOG) { - fprintf(stderr, "No tcpa log found in coreboot table.\n"); + if (tpm_cb_log.tag != LB_TAG_TPM_CB_LOG) { + fprintf(stderr, "No TPM log found in coreboot table.\n"); return; } size = sizeof(*tclt_p); - tclt_p = map_memory(&tcpa_mapping, tcpa_log.cbmem_addr, size); + tclt_p = map_memory(&log_mapping, tpm_cb_log.cbmem_addr, size); if (!tclt_p) - die("Unable to map tcpa log header\n"); + die("Unable to map TPM log header\n"); size += tclt_p->num_entries * sizeof(tclt_p->entries[0]); - unmap_memory(&tcpa_mapping); + unmap_memory(&log_mapping); - tclt_p = map_memory(&tcpa_mapping, tcpa_log.cbmem_addr, size); + tclt_p = map_memory(&log_mapping, tpm_cb_log.cbmem_addr, size); if (!tclt_p) - die("Unable to map full tcpa log table\n"); + die("Unable to map full TPM log table\n"); - printf("coreboot TCPA log:\n\n"); + printf("coreboot TPM log:\n\n"); for (uint16_t i = 0; i < tclt_p->num_entries; i++) { - const struct tcpa_entry *tce = &tclt_p->entries[i]; + const struct tpm_cb_log_entry *tce = &tclt_p->entries[i]; printf(" PCR-%u ", tce->pcr); @@ -881,7 +881,7 @@ static void dump_tcpa_log(void) printf(" %s [%s]\n", tce->digest_type, tce->name); } - unmap_memory(&tcpa_mapping); + unmap_memory(&log_mapping); } struct cbmem_console { @@ -1339,7 +1339,7 @@ static void print_usage(const char *name, int exit_code) " -T | --parseable-timestamps: print parseable timestamps\n" " -S | --stacked-timestamps: print stacked timestamps (e.g. for flame graph tools)\n" " -a | --add-timestamp ID: append timestamp with ID\n" - " -L | --tcpa-log print TCPA log\n" + " -L | --tcpa-log print TPM log\n" " -V | --verbose: verbose (debugging) output\n" " -v | --version: print the version\n" " -h | --help: print this help\n" @@ -1677,7 +1677,7 @@ int main(int argc, char** argv) dump_timestamps(timestamp_type); if (print_tcpa_log) - dump_tcpa_log(); + dump_tpm_cb_log(); unmap_memory(&lbtable_mapping); |