aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagendra modadugu <ngm@google.com>2017-12-14 01:52:44 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-12-14 01:52:44 +0000
commite46578ab17221be45a136c6fdd308ab463e71121 (patch)
tree2021e5d0d74015532e8a2a721184fa8cd2a2f330
parentcfe80ed361a662d6e91984e4ec5eb57193a614d6 (diff)
parent9eb074bfa3d0e7fa271fe8cf5aed5821e43b9ba9 (diff)
downloadtpm2-e46578ab17221be45a136c6fdd308ab463e71121.tar.gz
Revert "Revert "report successful startup to the platform""
am: 9eb074bfa3 Change-Id: I527a90bb19ab982b46137993d44b12886d8de00a
-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);