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 <[email protected]> --- src/tcgbios.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tcgbios.c b/src/tcgbios.c index 206c296..1eaf45e 100644 --- a/src/tcgbios.c +++ b/src/tcgbios.c @@ -909,17 +909,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 _______________________________________________ SeaBIOS mailing list [email protected] https://www.coreboot.org/mailman/listinfo/seabios
