Changes to allow compilation of PropertyCap.c
am: 4a0a7f6d8b
* commit '4a0a7f6d8b13be8d30ac2be10a4c4d9a00c5c4f0':
Changes to allow compilation of PropertyCap.c
diff --git a/CryptUtil_fp.h b/CryptUtil_fp.h
index 8532ba8..27cc786 100644
--- a/CryptUtil_fp.h
+++ b/CryptUtil_fp.h
@@ -15,6 +15,9 @@
UINT32 maxCount, // IN: count of returned curve
TPML_ECC_CURVE *curveList // OUT: ECC curve list
);
+UINT32 CryptCapGetEccCurveNumber(
+ void
+ );
UINT16 CryptCommit(void);
LIB_EXPORT int CryptCompare(
const UINT32 aSize, // IN: size of a
diff --git a/NV_fp.h b/NV_fp.h
index 63844db..f2b4d4c 100644
--- a/NV_fp.h
+++ b/NV_fp.h
@@ -11,6 +11,18 @@
TPMI_DH_OBJECT evictHandle, // IN: new evict handle
OBJECT *object // IN: object to be added
);
+UINT32 NvCapGetCounterAvail(
+ void
+ );
+UINT32 NvCapGetCounterNumber(
+ void
+ );
+UINT32 NvCapGetIndexNumber(
+ void
+ );
+UINT32 NvCapGetPersistentAvail(
+ void
+ );
UINT32 NvCapGetPersistentNumber(
void
);
diff --git a/Object_fp.h b/Object_fp.h
index 8be2ef3..5a4ea3f 100644
--- a/Object_fp.h
+++ b/Object_fp.h
@@ -15,6 +15,9 @@
UINT32 count, // IN: count of returned handles
TPML_HANDLE *handleList // OUT: list of handle
);
+UINT32 ObjectCapGetTransientAvail(
+ void
+ );
void ObjectCleanupEvict(
void
);
diff --git a/Session_fp.h b/Session_fp.h
index 2e95dad..6f3583c 100644
--- a/Session_fp.h
+++ b/Session_fp.h
@@ -7,11 +7,23 @@
#ifndef __TPM2_SESSION_FP_H
#define __TPM2_SESSION_FP_H
+UINT32 SessionCapGetActiveAvail(
+ void
+ );
+UINT32 SessionCapGetActiveNumber(
+ void
+ );
TPMI_YES_NO SessionCapGetLoaded(
TPMI_SH_POLICY handle, // IN: start handle
UINT32 count, // IN: count of returned handle
TPML_HANDLE *handleList // OUT: list of handle
);
+UINT32 SessionCapGetLoadedAvail(
+ void
+ );
+UINT32 SessionCapGetLoadedNumber(
+ void
+ );
TPMI_YES_NO SessionCapGetSaved(
TPMI_SH_HMAC handle, // IN: start handle
UINT32 count, // IN: count of returned handle
diff --git a/TPM_Types.h b/TPM_Types.h
index 3169a5c..6b71cf2 100644
--- a/TPM_Types.h
+++ b/TPM_Types.h
@@ -442,6 +442,36 @@
UINT8 Extended : 3;
} TPMA_LOCALITY;
+// Table 33 - TPMA_PERMANENT Bits
+typedef struct {
+ UINT32 ownerAuthSet : 1;
+ UINT32 endorsementAuthSet : 1;
+ UINT32 lockoutAuthSet : 1;
+ UINT32 reserved3_7 : 5;
+ UINT32 disableClear : 1;
+ UINT32 inLockout : 1;
+ UINT32 tpmGeneratedEPS : 1;
+ UINT32 reserved11_31 : 21;
+} TPMA_PERMANENT;
+
+// Table 34 - TPMA_STARTUP_CLEAR Bits
+typedef struct {
+ UINT32 phEnable : 1;
+ UINT32 shEnable : 1;
+ UINT32 ehEnable : 1;
+ UINT32 phEnableNV : 1;
+ UINT32 reserved3_30 : 27;
+ UINT32 orderly : 1;
+} TPMA_STARTUP_CLEAR;
+
+// Table 35 - TPMA_MEMORY Bits
+typedef struct {
+ UINT32 sharedRAM : 1;
+ UINT32 sharedNV : 1;
+ UINT32 objectCopiedToRam : 1;
+ UINT32 reserved3_31 : 29;
+} TPMA_MEMORY;
+
// Table 36 - TPMA_CC Bits
typedef struct {
UINT32 commandIndex : 16;
diff --git a/Tpm.h b/Tpm.h
index e35f076..c63a62f 100644
--- a/Tpm.h
+++ b/Tpm.h
@@ -12,4 +12,12 @@
#include "Implementation.h"
#include "TPM_Types.h"
#include "swap.h"
+
+ // from the title page of the specification
+#define TPM_SPEC_FAMILY 0x200
+#define TPM_SPEC_LEVEL 0
+#define TPM_SPEC_VERSION 0x116
+#define TPM_SPEC_DAY_OF_YEAR 303
+#define TPM_SPEC_YEAR 2014
+
#endif // _TPM_H_