summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.ibm.com>2021-06-09 12:48:41 -0400
committerAlexey Kardashevskiy <aik@ozlabs.ru>2021-06-15 16:26:23 +1000
commite25b1d6f49d40df21266b48e34766031d1d00b92 (patch)
treee6ad5710c0136cbda4eebf2631e176e539aea960
parent33a7322de13e9dca4b38851a345a58d37e7a441d (diff)
downloadqemu-SLOF-e25b1d6f49d40df21266b48e34766031d1d00b92.tar.gz
tcgbios: Fix details in log entries
Fix two details of the logs: - Set the filed SpecErrata to 2 as required by specs. - Write the separator into the log entry's event field. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--lib/libtpm/tcgbios.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libtpm/tcgbios.c b/lib/libtpm/tcgbios.c
index f9e4602..d3deccb 100644
--- a/lib/libtpm/tcgbios.c
+++ b/lib/libtpm/tcgbios.c
@@ -659,7 +659,7 @@ static int tpm20_write_EfiSpecIdEventStruct(void)
.hdr.platformClass = TPM_TCPA_ACPI_CLASS_CLIENT,
.hdr.specVersionMinor = 0,
.hdr.specVersionMajor = 2,
- .hdr.specErrata = 0,
+ .hdr.specErrata = 2,
.hdr.uintnSize = 2,
};
struct tpms_pcr_selection *sel;
@@ -958,7 +958,8 @@ uint32_t tpm_add_event_separators(uint32_t start_pcr, uint32_t end_pcr)
/* event separators need to be extended and logged for PCRs 0-7 */
for (pcrIndex = start_pcr; pcrIndex <= end_pcr; pcrIndex++) {
rc = tpm_add_measurement_to_log(pcrIndex, EV_SEPARATOR,
- NULL, 0,
+ (const char *)evt_separator,
+ sizeof(evt_separator),
evt_separator,
sizeof(evt_separator));
if (rc)