aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagendra modadugu <ngm@google.com>2017-12-14 02:03:50 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-12-14 02:03:50 +0000
commit3b7e2209b333ff535717a803a9653d3b9af992d4 (patch)
tree2021e5d0d74015532e8a2a721184fa8cd2a2f330
parentaddaa5e56d1040b8628636e9a744ef8e7daf773e (diff)
parent77c9cf4184d2ba3b7c02c6dda7c2ece63d530233 (diff)
downloadtpm2-3b7e2209b333ff535717a803a9653d3b9af992d4.tar.gz
Revert "Revert "report successful startup to the platform"" am: 9eb074bfa3 am: e46578ab17
am: 77c9cf4184 Change-Id: I8b1d80a9678134dfbb47490a34a2c25df24da00f
-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);