aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-12-12 00:07:25 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-12-12 00:07:25 +0000
commit2b3aae417a3efeaac3fa395e57f646543f5eccd1 (patch)
tree2021e5d0d74015532e8a2a721184fa8cd2a2f330
parent3f1d0efcbc9ce6322c0af1b02bed2fa9dd20c7ec (diff)
parentd93e63aaa8825c695c42bbd77dcd393246867843 (diff)
downloadtpm2-2b3aae417a3efeaac3fa395e57f646543f5eccd1.tar.gz
report successful startup to the platform am: ae8d044cd1 am: 40e9f967e4
am: d93e63aaa8 Change-Id: Ifc245b4b0c564cfba57499754d38835234b17b4c
-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);