diff --git a/board/cr50/board.h b/board/cr50/board.h index db47101953..27faa9341a 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -146,6 +146,8 @@ /* Implement custom udelay, due to usec hwtimer imprecision. */ #define CONFIG_HW_SPECIFIC_UDELAY +#define CONFIG_TPM_LOGGING + #ifndef __ASSEMBLER__ #include "gpio_signal.h" diff --git a/common/tpm_registers.c b/common/tpm_registers.c index b8d522a460..619bfb669b 100644 --- a/common/tpm_registers.c +++ b/common/tpm_registers.c @@ -20,6 +20,7 @@ #include "system.h" #include "system_chip.h" #include "task.h" +#include "tpm_log.h" #include "tpm_manufacture.h" #include "tpm_registers.h" #include "util.h" @@ -696,6 +697,10 @@ int tpm_reset_request(int wait_until_done, int wipe_nvmem_first) return EC_ERROR_BUSY; } + /* Record input parameters as two bits in the data field. */ + tpm_log_event(TPM_EVENT_INIT, + (!!wait_until_done << 1) | !!wipe_nvmem_first); + reset_in_progress = 1; wipe_result = EC_SUCCESS;