From 2710df765bad08d8200c70399ace5e78d3d1cecc Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Thu, 10 Nov 2022 00:40:51 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69444 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- util/cbmem/cbmem.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'util') 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 #include #include -#include +#include #include #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); -- cgit v1.2.3