[SeaBIOS] [PATCH] tcgbios: Fix details in log entries

Stefan Berger posted 1 patch 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20210609173159.1493092-1-stefanb@linux.ibm.com
src/tcgbios.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[SeaBIOS] [PATCH] tcgbios: Fix details in log entries
Posted by Stefan Berger 2 years, 10 months ago
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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tcgbios.c b/src/tcgbios.c
index 82894f5..4150aa0 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -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));
 }
-- 
2.31.1

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] tcgbios: Fix details in log entries
Posted by Kevin O'Connor 2 years, 9 months ago
On Wed, Jun 09, 2021 at 01:31:59PM -0400, Stefan Berger wrote:
> 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>

Thanks.  I committed this change.

-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org