aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-06-01 18:53:59 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-03 22:11:22 +0000
commit523b0eb19d9a9397b2f817caf41766a478b05d43 (patch)
tree716e00bfa0b87146a8d79f6eef99df9993111dee
parent163cddf19bd5e599e6e35f63872fee31da679589 (diff)
downloadtpm2-523b0eb19d9a9397b2f817caf41766a478b05d43.tar.gz
Changes to allow compilation of Startup.c
BUG=none TEST=compilation succeeds: cc -Wall -Werror -c -o /dev/null Startup.c Change-Id: Ia8b369aa72c526af5d074c2e464b6edc672cb0cd Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/274669 Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
-rw-r--r--CommandAudit_fp.h3
-rw-r--r--CryptUtil_fp.h3
-rw-r--r--DA_fp.h3
-rw-r--r--Hierarchy_fp.h8
-rw-r--r--NV_fp.h10
-rw-r--r--PCR_fp.h4
-rw-r--r--Power_fp.h3
-rw-r--r--Session_fp.h3
-rw-r--r--Startup.c1
-rw-r--r--Startup_fp.h18
-rw-r--r--TPM_Types.h1
-rw-r--r--Time_fp.h4
-rw-r--r--Unique_fp.h16
13 files changed, 73 insertions, 4 deletions
diff --git a/CommandAudit_fp.h b/CommandAudit_fp.h
index 25a6711..93a5d43 100644
--- a/CommandAudit_fp.h
+++ b/CommandAudit_fp.h
@@ -29,3 +29,6 @@ BOOL CommandAuditSet(
);
#endif // __TPM2_COMMANDAUDIT_FP_H
+void CommandAuditStartup(
+ STARTUP_TYPE type // IN: start up type
+ );
diff --git a/CryptUtil_fp.h b/CryptUtil_fp.h
index 4371fd0..9445223 100644
--- a/CryptUtil_fp.h
+++ b/CryptUtil_fp.h
@@ -389,6 +389,9 @@ void CryptUpdateDigestInt(
UINT32 intSize, // IN: the size of 'intValue' in byte
void *intValue // IN: integer value to be hashed
);
+BOOL CryptUtilStartup(
+ STARTUP_TYPE type // IN: the startup type
+ );
TPM_RC CryptVerifySignature(
TPMI_DH_OBJECT keyHandle, // IN: The handle of sign key
TPM2B_DIGEST *digest, // IN: The digest being validated
diff --git a/DA_fp.h b/DA_fp.h
index e3ff6f9..cb8883f 100644
--- a/DA_fp.h
+++ b/DA_fp.h
@@ -13,5 +13,8 @@ void DAPreInstall_Init(
void DARegisterFailure(
TPM_HANDLE handle // IN: handle for failure
);
+void DAStartup(
+ STARTUP_TYPE type // IN: startup type
+ );
#endif // __TPM2_DA_FP_H
diff --git a/Hierarchy_fp.h b/Hierarchy_fp.h
index 12a8041..9cc129c 100644
--- a/Hierarchy_fp.h
+++ b/Hierarchy_fp.h
@@ -16,9 +16,11 @@ TPM2B_AUTH *HierarchyGetProof(
BOOL HierarchyIsEnabled(
TPMI_RH_HIERARCHY hierarchy // IN: hierarchy
);
-
-#endif // __TPM2_HIERARCHY_FP_H
-
void HierarchyPreInstall_Init(
void
);
+void HierarchyStartup(
+ STARTUP_TYPE type // IN: start up type
+ );
+
+#endif // __TPM2_HIERARCHY_FP_H
diff --git a/NV_fp.h b/NV_fp.h
index fe8d08e..138c183 100644
--- a/NV_fp.h
+++ b/NV_fp.h
@@ -37,6 +37,9 @@ TPM_RC NvDefineIndex(
void NvDeleteEntity(
TPM_HANDLE handle // IN: handle of entity to be deleted
);
+void NvEntityStartup(
+ STARTUP_TYPE type // IN: start up type
+ );
void NvFlushHierarchy(
TPMI_RH_HIERARCHY hierarchy // IN: hierarchy to be flushed.
);
@@ -96,6 +99,13 @@ BOOL NvIsPlatformPersistentHandle(
BOOL NvIsUndefinedIndex(
TPMI_RH_NV_INDEX handle // IN: handle
);
+void NvReadPersistent(
+ void
+ );
+void NvReadReserved(
+ NV_RESERVE type, // IN: type of reserved data
+ void *buffer // OUT: buffer receives the data.
+ );
void NvSetGlobalLock(
void
);
diff --git a/PCR_fp.h b/PCR_fp.h
index f820e7b..1e29e28 100644
--- a/PCR_fp.h
+++ b/PCR_fp.h
@@ -91,6 +91,10 @@ void PCRSetValue(
void PCRSimStart(
void
);
+void PCRStartup(
+ STARTUP_TYPE type, // IN: startup type
+ BYTE locality // IN: startup locality
+ );
void PCRStateSave(
TPM_SU type // IN: startup type
);
diff --git a/Power_fp.h b/Power_fp.h
index a26d7eb..a585cd0 100644
--- a/Power_fp.h
+++ b/Power_fp.h
@@ -10,5 +10,8 @@
BOOL TPMIsStarted(
void
);
+void TPMRegisterStartup(
+ void
+ );
#endif // __TPM2_POWER_FP_H
diff --git a/Session_fp.h b/Session_fp.h
index 1e93bb9..7c6b6f9 100644
--- a/Session_fp.h
+++ b/Session_fp.h
@@ -71,5 +71,8 @@ BOOL SessionPCRValueIsCurrent(
void SessionResetPolicyData(
SESSION *session // IN: the session to reset
);
+void SessionStartup(
+ STARTUP_TYPE type
+ );
#endif // __TPM2_SESSION_FP_H
diff --git a/Startup.c b/Startup.c
index aa2d50b..ec60a22 100644
--- a/Startup.c
+++ b/Startup.c
@@ -7,6 +7,7 @@
#include "InternalRoutines.h"
#include "Startup_fp.h"
+#include "Unique_fp.h"
//
//
// Error Returns Meaning
diff --git a/Startup_fp.h b/Startup_fp.h
new file mode 100644
index 0000000..5358658
--- /dev/null
+++ b/Startup_fp.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2015 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef __TPM2_STARTUP_FP_H_
+#define __TPM2_STARTUP_FP_H_
+
+typedef struct {
+ TPM_SU startupType;
+} Startup_In;
+
+TPM_RC TPM2_Startup(
+ Startup_In *in // IN: input parameter list
+);
+
+#endif // __TPM2_STARTUP_FP_H_
diff --git a/TPM_Types.h b/TPM_Types.h
index 289f3cc..ba8435e 100644
--- a/TPM_Types.h
+++ b/TPM_Types.h
@@ -1424,6 +1424,7 @@ enum {
RC_StartAuthSession_nonceCaller,
RC_StartAuthSession_symmetric,
RC_StartAuthSession_tpmKey,
+ RC_Startup_startupType,
};
enum {
diff --git a/Time_fp.h b/Time_fp.h
index 3805d6c..64d72fa 100644
--- a/Time_fp.h
+++ b/Time_fp.h
@@ -18,7 +18,9 @@ TPM_RC TimeGetRange(
void TimeSetAdjustRate(
TPM_CLOCK_ADJUST adjust // IN: adjust constant
);
-
+void TimeStartup(
+ STARTUP_TYPE type // IN: start up type
+ );
void TimeUpdateToCurrent(
void
);
diff --git a/Unique_fp.h b/Unique_fp.h
new file mode 100644
index 0000000..5c89696
--- /dev/null
+++ b/Unique_fp.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2015 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef __TPM2_UNIQUE_FP_H_
+#define __TPM2_UNIQUE_FP_H_
+
+LIB_EXPORT uint32_t _plat__GetUnique(
+ uint32_t which, // authorities (0) or details
+ uint32_t bSize, // size of the buffer
+ unsigned char *b // output buffer
+);
+
+#endif // __TPM2_UNIQUE_FP_H_