diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-06-01 18:53:59 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-03 22:11:22 +0000 |
commit | 523b0eb19d9a9397b2f817caf41766a478b05d43 (patch) | |
tree | 716e00bfa0b87146a8d79f6eef99df9993111dee | |
parent | 163cddf19bd5e599e6e35f63872fee31da679589 (diff) | |
download | tpm2-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.h | 3 | ||||
-rw-r--r-- | CryptUtil_fp.h | 3 | ||||
-rw-r--r-- | DA_fp.h | 3 | ||||
-rw-r--r-- | Hierarchy_fp.h | 8 | ||||
-rw-r--r-- | NV_fp.h | 10 | ||||
-rw-r--r-- | PCR_fp.h | 4 | ||||
-rw-r--r-- | Power_fp.h | 3 | ||||
-rw-r--r-- | Session_fp.h | 3 | ||||
-rw-r--r-- | Startup.c | 1 | ||||
-rw-r--r-- | Startup_fp.h | 18 | ||||
-rw-r--r-- | TPM_Types.h | 1 | ||||
-rw-r--r-- | Time_fp.h | 4 | ||||
-rw-r--r-- | Unique_fp.h | 16 |
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 @@ -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 @@ -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 ); @@ -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 ); @@ -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 @@ -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 { @@ -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_ |