Initial commit to seed TPM2.0 source code directory
LICENSE file text copied from TCG library specification. README
describes the procedure used to extract source code from parts 3 and 4
of the specification.
The python scripts and part{34}.txt files will be removed in the
following commits.
Change-Id: Ie281e6e988481831f33483053455e8aff8f3f75f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
diff --git a/_TPM_Init.c b/_TPM_Init.c
new file mode 100644
index 0000000..7c8fa7f
--- /dev/null
+++ b/_TPM_Init.c
@@ -0,0 +1,40 @@
+// This file was extracted from the TCG Published
+// Trusted Platform Module Library
+// Part 3: Commands
+// Family "2.0"
+// Level 00 Revision 01.16
+// October 30, 2014
+
+#include "InternalRoutines.h"
+LIB_EXPORT void
+_TPM_Init(
+ void
+ )
+{
+ // Clear the failure mode flags
+ g_inFailureMode = FALSE;
+ g_forceFailureMode = FALSE;
+
+ // Initialize the NvEnvironment.
+ g_nvOk = NvPowerOn();
+
+ // Initialize crypto engine
+ CryptInitUnits();
+
+ // Start clock
+ TimePowerOn();
+
+ // Set initialization state
+ TPMInit();
+
+ // Initialize object table
+ ObjectStartup();
+
+ // Set g_DRTMHandle as unassigned
+ g_DRTMHandle = TPM_RH_UNASSIGNED;
+
+ // No H-CRTM, yet.
+ g_DrtmPreStartup = FALSE;
+
+ return;
+}