[SeaBIOS] [PATCH v3 5/7] tpm: Move tpm_log_init to a later point
Stefan Berger
stefanb at linux.vnet.ibm.com
Fri Aug 5 17:07:12 CEST 2016
Move tpm_log_init to a point after tpm_startup since in the subsequent
steps we will need to be able to call TPM2_GetCapabilties from this
function to learn about the TPM's PCR bank configuration. We can move
it there, since tpm_startup does not write anything into the log.
Signed-off-by: Stefan Berger <stefanb at linux.vnet.ibm.com>
---
src/tcgbios.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index de02864..acf75c7 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -940,17 +940,19 @@ tpm_setup(void)
if (ret)
return;
- tpm_log_init();
-
TPM_working = 1;
- if (runningOnXen())
+ if (runningOnXen()) {
+ tpm_log_init();
return;
+ }
ret = tpm_startup();
if (ret)
return;
+ tpm_log_init();
+
tpm_smbios_measure();
tpm_add_action(2, "Start Option ROM Scan");
}
--
2.5.5
More information about the SeaBIOS
mailing list