summaryrefslogtreecommitdiff
path: root/util/cbmem/cbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbmem/cbmem.c')
-rw-r--r--util/cbmem/cbmem.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index fc2dcdcc75..ae1d2127fb 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -690,8 +690,6 @@ static void dump_tcpa_log(void)
const struct tcpa_table *tclt_p;
size_t size;
struct mapping tcpa_mapping;
- char log_string[TCPA_LOG_STRING_LENGTH];
- char hash[TCPA_FORMAT_HASH_LENGTH];
if (tcpa_log.tag != LB_TAG_TCPA_LOG) {
fprintf(stderr, "No tcpa log found in coreboot table.\n");
@@ -716,13 +714,12 @@ static void dump_tcpa_log(void)
for (i = 0; i < tclt_p->num_entries; i++) {
const struct tcpa_entry *tce = &tclt_p->entries[i];
- memset(log_string, 0, TCPA_LOG_STRING_LENGTH);
+ printf(" PCR-%u ", tce->pcr);
+
for (j = 0; j < tce->digest_length; j++)
- sprintf((char *)&(hash[j * 2]), "%02x", tce->digest[j]);
+ printf("%02x", tce->digest[j]);
- snprintf(log_string, TCPA_LOG_STRING_LENGTH, "%u %s 00 [%s]\n",
- tce->pcr, hash, tce->name);
- printf("%s", log_string);
+ printf(" %s [%s]\n", tce->digest_type, tce->name);
}
unmap_memory(&tcpa_mapping);