diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2017-12-01 12:58:58 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-12-11 15:16:22 -0800 |
commit | ae8d044cd15f49f56de4db84da7203a0ac2ff783 (patch) | |
tree | 8d70c2186bc1d22f0b1dc4532669f00d2b93b88c | |
parent | c456225bd529067d237dc7242c954e22479b1fea (diff) | |
download | tpm2-ae8d044cd15f49f56de4db84da7203a0ac2ff783.tar.gz |
report successful startup to the platform
For proper CCD password management it is necessary to be able to alert
the rest of the system when the actual restart happens. A good
indication of a restart is successful processing of the Starup command
of the SU_RESET type.
CQ-DEPEND=CL:804141
BRANCH=cr50
BUG=b:67007578
TEST=verified that the callback is indeed called on appropriate starups.
Change-Id: I984fb971410ff29454250c40e44a7ca7710eaf1c
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/803741
Reviewed-by: Andrey Pronin <apronin@chromium.org>
-rw-r--r-- | Platform.h | 6 | ||||
-rw-r--r-- | Startup.c | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -384,6 +384,12 @@ _plat__GetFwVersion( uint32_t *fw2 ); +// A function to call after every successful SU_RESET TPM2_Startup. +LIB_EXPORT void +_plat__ResetCallback( + void +); + int uart_printf(const char *format, ...); #define ecprintf(format, args...) uart_printf(format, ## args); @@ -163,5 +163,8 @@ TPM2_Startup( // The H-CRTM state no longer matters g_DrtmPreStartup = FALSE; + if (startup == SU_RESET) + _plat__ResetCallback(); + return TPM_RC_SUCCESS; } |