aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagendra modadugu <ngm@google.com>2017-12-14 01:55:43 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-12-14 01:55:43 +0000
commit77c9cf4184d2ba3b7c02c6dda7c2ece63d530233 (patch)
tree2021e5d0d74015532e8a2a721184fa8cd2a2f330
parente7d921b9f064d107273bf5bf05fddb6e7cdfe8b8 (diff)
parente46578ab17221be45a136c6fdd308ab463e71121 (diff)
downloadtpm2-77c9cf4184d2ba3b7c02c6dda7c2ece63d530233.tar.gz
Revert "Revert "report successful startup to the platform"" am: 9eb074bfa3
am: e46578ab17 Change-Id: Idd2bc4e530cf808da0f6041a938346ae02608044
-rw-r--r--Startup.c3
-rw-r--r--include/tpm2/Platform.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/Startup.c b/Startup.c
index 8759e52..54df25b 100644
--- a/Startup.c
+++ b/Startup.c
@@ -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;
}
diff --git a/include/tpm2/Platform.h b/include/tpm2/Platform.h
index f7bcbcd..4779594 100644
--- a/include/tpm2/Platform.h
+++ b/include/tpm2/Platform.h
@@ -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);