]> xenbits.xensource.com Git - osstest/seabios.git/commitdiff
tcgbios: Fix details in log entries
authorStefan Berger <stefanb@linux.ibm.com>
Wed, 9 Jun 2021 17:31:59 +0000 (13:31 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 30 Jun 2021 20:58:48 +0000 (16:58 -0400)
Fix two details of the logs:

- Set the field '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>
src/tcgbios.c

index 82894f5c4dc985569d62462ca661cef5a524c9af..4150aa07985b28221f860bdf5582d0a01a8c2806 100644 (file)
@@ -274,7 +274,7 @@ 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,
     };
 
@@ -1016,7 +1016,8 @@ tpm_add_event_separators(void)
     u32 pcrIndex;
     for (pcrIndex = 0; pcrIndex <= 7; pcrIndex++)
         tpm_add_measurement_to_log(pcrIndex, EV_SEPARATOR,
-                                   NULL, 0,
+                                   (const char *)evt_separator,
+                                   sizeof(evt_separator),
                                    evt_separator,
                                    sizeof(evt_separator));
 }