aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss')
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateCredential_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateIdentity_fp.h64
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/BaseTypes.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyCreation_fp.h95
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyX509_fp.h91
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Certify_fp.h93
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangeEPS_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangePPS_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClearControl_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Clear_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockRateAdjust_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockSet_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Commit_fp.h94
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextLoad_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextSave_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateEndorsementKeyPair_fp.h64
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateLoaded_fp.h90
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreatePrimary_fp.h96
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateWrapKey_fp.h65
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Create_fp.h96
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackLockReset_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackParameters_fp.h86
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Duplicate_fp.h91
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECC_Parameters_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_KeyGen_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_ZGen_fp.h86
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EC_Ephemeral_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt2_fp.h93
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt_fp.h93
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EventSequenceComplete_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EvictControl_fp.h82
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Extend_fp.h64
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushContext_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushSpecific_fp.h58
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability12_fp.h65
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability_fp.h90
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCommandAuditDigest_fp.h91
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetRandom_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetSessionAuditDigest_fp.h93
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTestResult_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTime_fp.h91
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_Start_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HashSequenceStart_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Hash_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyChangeAuth_fp.h80
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyControl_fp.h83
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Implementation.h1446
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Import_fp.h93
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/IncrementalSelfTest_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadExternal_fp.h87
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadKey2_fp.h66
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Load_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeCredential_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeIdentity_fp.h66
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NTC_fp.h52
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Certify_fp.h98
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ChangeAuth_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace12_fp.h52
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace_fp.h83
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Extend_fp.h83
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_GlobalWriteLock_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Increment_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadLock_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadPublic_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValueAuth_fp.h65
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValue_fp.h65
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Read_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_SetBits_fp.h83
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpaceSpecial_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpace_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteLock_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValueAuth_fp.h57
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValue_fp.h55
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Write_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OIAP_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OSAP_fp.h60
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ObjectChangeAuth_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerReadInternalPub_fp.h62
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerSetDisable_fp.h50
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Allocate_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Event_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Extend_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Read_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset12_fp.h51
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthPolicy_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthValue_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PP_Commands_fp.h80
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters.h386
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters12.h68
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PcrRead12_fp.h56
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthValue_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorizeNV_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorize_fp.h86
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCommandCode_fp.h80
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCounterTimer_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCpHash_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyDuplicationSelect_fp.h85
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyGetDigest_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyLocality_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNV_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNameHash_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNvWritten_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyOR_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPCR_fp.h82
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPassword_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPhysicalPresence_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyRestart_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySecret_fp.h95
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySigned_fp.h96
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTemplate_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTicket_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote2_fp.h69
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote_fp.h91
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Decrypt_fp.h90
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Encrypt_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadClock_fp.h77
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPubek_fp.h63
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPublic_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Rewrap_fp.h92
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SelfTest_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceComplete_fp.h92
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceUpdate_fp.h82
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetAlgorithmSet_fp.h81
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetCommandCodeAuditStatus_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetPrimaryPolicy_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Shutdown_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign12_fp.h65
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign_fp.h89
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StartAuthSession_fp.h97
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup12_fp.h50
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup_fp.h84
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StirRandom_fp.h78
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPMB.h104
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPM_Types.h2825
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TakeOwnership_fp.h67
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TestParms_fp.h79
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TpmBuildSwitches.h87
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal12_fp.h94
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal_fp.h696
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unseal_fp.h83
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/VerifySignature_fp.h88
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ZGen_2Phase_fp.h93
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmconstants12.h1721
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmstructures12.h2482
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmtypes12.h148
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tss.h112
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscrypto.h164
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscryptoh.h100
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror.h115
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror12.h248
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssfile.h95
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal.h1628
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal12.h192
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprint.h290
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprintcmd.h172
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssresponsecode.h62
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsstransmit.h80
-rw-r--r--roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssutils.h101
160 files changed, 24397 insertions, 0 deletions
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateCredential_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateCredential_fp.h
new file mode 100644
index 000000000..e2b6083cb
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateCredential_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ActivateCredential_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef ACTIVATECREDENTIAL_FP_H
+#define ACTIVATECREDENTIAL_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT activateHandle;
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_ID_OBJECT credentialBlob;
+ TPM2B_ENCRYPTED_SECRET secret;
+} ActivateCredential_In;
+
+#define RC_ActivateCredential_activateHandle (TPM_RC_H + TPM_RC_1)
+#define RC_ActivateCredential_keyHandle (TPM_RC_H + TPM_RC_2)
+#define RC_ActivateCredential_credentialBlob (TPM_RC_P + TPM_RC_1)
+#define RC_ActivateCredential_secret (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_DIGEST certInfo;
+} ActivateCredential_Out;
+
+TPM_RC
+TPM2_ActivateCredential(
+ ActivateCredential_In *in, // IN: input parameter list
+ ActivateCredential_Out *out // OUT: output parameter list
+ );
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateIdentity_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateIdentity_fp.h
new file mode 100644
index 000000000..84b97b62e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ActivateIdentity_fp.h
@@ -0,0 +1,64 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 ActivateIdentity */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ActivateIdentity_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef ACTIVATEIDENTITY_FP_H
+#define ACTIVATEIDENTITY_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_KEY_HANDLE idKeyHandle;
+ UINT32 blobSize;
+ BYTE blob[MAX_RSA_KEY_BYTES];
+} ActivateIdentity_In;
+
+typedef struct {
+ TPM_SYMMETRIC_KEY symmetricKey;
+} ActivateIdentity_Out;
+
+TPM_RC
+TPM2_ActivateIdentity(
+ ActivateIdentity_In *in, // IN: input parameter buffer
+ ActivateIdentity_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/BaseTypes.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/BaseTypes.h
new file mode 100644
index 000000000..c87663c6b
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/BaseTypes.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: BaseTypes.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2016 */
+/* */
+/********************************************************************************/
+
+/* 5.2 BaseTypes.h */
+
+#ifndef BASETYPES_H
+#define BASETYPES_H
+
+#include <stdint.h>
+
+/* NULL definition */
+
+#ifndef NULL
+#define NULL (0)
+#endif
+typedef uint8_t UINT8;
+typedef uint8_t BYTE;
+typedef int8_t INT8;
+typedef int BOOL;
+typedef uint16_t UINT16;
+typedef int16_t INT16;
+typedef uint32_t UINT32;
+typedef int32_t INT32;
+typedef uint64_t UINT64;
+typedef int64_t INT64;
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyCreation_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyCreation_fp.h
new file mode 100644
index 000000000..98c336b95
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyCreation_fp.h
@@ -0,0 +1,95 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: CertifyCreation_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CERTIFYCREATION_FP_H
+#define CERTIFYCREATION_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT signHandle;
+ TPMI_DH_OBJECT objectHandle;
+ TPM2B_DATA qualifyingData;
+ TPM2B_DIGEST creationHash;
+ TPMT_SIG_SCHEME inScheme;
+ TPMT_TK_CREATION creationTicket;
+} CertifyCreation_In;
+
+#define RC_CertifyCreation_signHandle (TPM_RC_H + TPM_RC_1)
+#define RC_CertifyCreation_objectHandle (TPM_RC_H + TPM_RC_2)
+#define RC_CertifyCreation_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_CertifyCreation_creationHash (TPM_RC_P + TPM_RC_2)
+#define RC_CertifyCreation_inScheme (TPM_RC_P + TPM_RC_3)
+#define RC_CertifyCreation_creationTicket (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM2B_ATTEST certifyInfo;
+ TPMT_SIGNATURE signature;
+} CertifyCreation_Out;
+
+TPM_RC
+TPM2_CertifyCreation(
+ CertifyCreation_In *in, // IN: input parameter list
+ CertifyCreation_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyX509_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyX509_fp.h
new file mode 100644
index 000000000..1fb36fe7f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CertifyX509_fp.h
@@ -0,0 +1,91 @@
+/********************************************************************************/
+/* */
+/* TPM2_CertifyX509 Command Header */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2019 */
+/* */
+/********************************************************************************/
+
+#ifndef CERTIFYX509_FP_H
+#define CERTIFYX509_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT objectHandle;
+ TPMI_DH_OBJECT signHandle;
+ TPM2B_DATA reserved;
+ TPMT_SIG_SCHEME inScheme;
+ TPM2B_MAX_BUFFER partialCertificate;
+} CertifyX509_In;
+
+#define RC_CertifyX509_objectHandle (TPM_RC_H + TPM_RC_1)
+#define RC_CertifyX509_signHandle (TPM_RC_H + TPM_RC_2)
+#define RC_CertifyX509_reserved (TPM_RC_P + TPM_RC_1)
+#define RC_CertifyX509_inScheme (TPM_RC_P + TPM_RC_2)
+#define RC_CertifyX509_partialCertificate (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_MAX_BUFFER addedToCertificate;
+ TPM2B_DIGEST tbsDigest;
+ TPMT_SIGNATURE signature;
+} CertifyX509_Out;
+
+TPM_RC
+TPM2_CertifyX509(
+ CertifyX509_In *in, // IN: input parameter list
+ CertifyX509_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Certify_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Certify_fp.h
new file mode 100644
index 000000000..dc186e4eb
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Certify_fp.h
@@ -0,0 +1,93 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Certify_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CERTIFY_FP_H
+#define CERTIFY_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT objectHandle;
+ TPMI_DH_OBJECT signHandle;
+ TPM2B_DATA qualifyingData;
+ TPMT_SIG_SCHEME inScheme;
+} Certify_In;
+
+#define RC_Certify_objectHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Certify_signHandle (TPM_RC_H + TPM_RC_2)
+#define RC_Certify_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_Certify_inScheme (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_ATTEST certifyInfo;
+ TPMT_SIGNATURE signature;
+} Certify_Out;
+
+
+
+TPM_RC
+TPM2_Certify(
+ Certify_In *in, // IN: input parameter list
+ Certify_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangeEPS_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangeEPS_fp.h
new file mode 100644
index 000000000..085473021
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangeEPS_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ChangeEPS_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CHANGEEPS_FP_H
+#define CHANGEEPS_FP_H
+
+typedef struct {
+ TPMI_RH_PLATFORM authHandle;
+} ChangeEPS_In;
+
+#define RC_ChangeEPS_authHandle (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_ChangeEPS(
+ ChangeEPS_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangePPS_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangePPS_fp.h
new file mode 100644
index 000000000..566cfe748
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ChangePPS_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ChangePPS_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CHANGEPPS_FP_H
+#define CHANGEPPS_FP_H
+
+typedef struct {
+ TPMI_RH_PLATFORM authHandle;
+} ChangePPS_In;
+
+#define RC_ChangePPS_authHandle (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_ChangePPS(
+ ChangePPS_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClearControl_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClearControl_fp.h
new file mode 100644
index 000000000..4ecd727e6
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClearControl_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ClearControl_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CLEARCONTROL_FP_H
+#define CLEARCONTROL_FP_H
+
+typedef struct {
+ TPMI_RH_CLEAR auth;
+ TPMI_YES_NO disable;
+} ClearControl_In;
+
+#define RC_ClearControl_auth (TPM_RC_H + TPM_RC_1)
+#define RC_ClearControl_disable (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_ClearControl(
+ ClearControl_In *in // IN: input parameter list
+ );
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Clear_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Clear_fp.h
new file mode 100644
index 000000000..f12e6bc8e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Clear_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Clear_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CLEAR_FP_H
+#define CLEAR_FP_H
+
+typedef struct {
+ TPMI_RH_CLEAR authHandle;
+} Clear_In;
+
+#define RC_Clear_authHandle (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_Clear(
+ Clear_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockRateAdjust_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockRateAdjust_fp.h
new file mode 100644
index 000000000..e66d153ae
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockRateAdjust_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ClockRateAdjust_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CLOCKRATEADJUST_FP_H
+#define CLOCKRATEADJUST_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION auth;
+ TPM_CLOCK_ADJUST rateAdjust;
+} ClockRateAdjust_In;
+
+#define RC_ClockRateAdjust_auth (TPM_RC_H + TPM_RC_1)
+#define RC_ClockRateAdjust_rateAdjust (TPM_RC_P + TPM_RC_1)
+
+
+TPM_RC
+TPM2_ClockRateAdjust(
+ ClockRateAdjust_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockSet_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockSet_fp.h
new file mode 100644
index 000000000..c62ea974f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ClockSet_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ClockSet_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CLOCKSET_FP_H
+#define CLOCKSET_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION auth;
+ UINT64 newTime;
+} ClockSet_In;
+
+#define RC_ClockSet_auth (TPM_RC_H + TPM_RC_1)
+#define RC_ClockSet_newTime (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_ClockSet(
+ ClockSet_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Commit_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Commit_fp.h
new file mode 100644
index 000000000..653dd53e0
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Commit_fp.h
@@ -0,0 +1,94 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Commit_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef COMMIT_FP_H
+#define COMMIT_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT signHandle;
+ TPM2B_ECC_POINT P1;
+ TPM2B_SENSITIVE_DATA s2;
+ TPM2B_ECC_PARAMETER y2;
+} Commit_In;
+
+#define RC_Commit_signHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Commit_P1 (TPM_RC_P + TPM_RC_1)
+#define RC_Commit_s2 (TPM_RC_P + TPM_RC_2)
+#define RC_Commit_y2 (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_ECC_POINT K;
+ TPM2B_ECC_POINT L;
+ TPM2B_ECC_POINT E;
+ UINT16 counter;
+} Commit_Out;
+
+TPM_RC
+TPM2_Commit(
+ Commit_In *in, // IN: input parameter list
+ Commit_Out *out // OUT: output parameter list
+ );
+
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextLoad_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextLoad_fp.h
new file mode 100644
index 000000000..5742f7f3f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextLoad_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ContextLoad_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CONTEXTLOAD_FP_H
+#define CONTEXTLOAD_FP_H
+
+typedef struct {
+ TPMS_CONTEXT context;
+} ContextLoad_In;
+
+#define RC_ContextLoad_context (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPMI_DH_CONTEXT loadedHandle;
+} ContextLoad_Out;
+
+TPM_RC
+TPM2_ContextLoad(
+ ContextLoad_In *in, // IN: input parameter list
+ ContextLoad_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextSave_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextSave_fp.h
new file mode 100644
index 000000000..bfb17119e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ContextSave_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ContextSave_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CONTEXTSAVE_FP_H
+#define CONTEXTSAVE_FP_H
+
+typedef struct {
+ TPMI_DH_CONTEXT saveHandle;
+} ContextSave_In;
+
+#define RC_ContextSave_saveHandle (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPMS_CONTEXT context;
+} ContextSave_Out;
+
+TPM_RC
+TPM2_ContextSave(
+ ContextSave_In *in, // IN: input parameter list
+ ContextSave_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateEndorsementKeyPair_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateEndorsementKeyPair_fp.h
new file mode 100644
index 000000000..a183ba028
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateEndorsementKeyPair_fp.h
@@ -0,0 +1,64 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 CreateEndorsementKeyPair */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: CreateEndorsementKeyPair_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef CREATEENDORSEMENTKEYPAIR_FP_H
+#define CREATEENDORSEMENTKEYPAIR_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_NONCE antiReplay;
+ TPM_KEY_PARMS keyInfo;
+} CreateEndorsementKeyPair_In;
+
+typedef struct {
+ TPM_PUBKEY pubEndorsementKey;
+ TPM_DIGEST checksum;
+} CreateEndorsementKeyPair_Out;
+
+TPM_RC
+TPM2_CreateEndorsementKeyPair(
+ CreateEndorsementKeyPair_In *in, // IN: input parameter buffer
+ CreateEndorsementKeyPair_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateLoaded_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateLoaded_fp.h
new file mode 100644
index 000000000..a6792c155
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateLoaded_fp.h
@@ -0,0 +1,90 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: CreateLoaded_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+#ifndef CREATELOADED_FP_H
+#define CREATELOADED_FP_H
+
+/* rev 136 */
+
+typedef struct {
+ TPMI_DH_PARENT parentHandle;
+ TPM2B_SENSITIVE_CREATE inSensitive;
+ TPM2B_TEMPLATE inPublic;
+} CreateLoaded_In;
+
+#define RC_CreateLoaded_parentHandle (TPM_RC_H + TPM_RC_1)
+#define RC_CreateLoaded_inSensitive (TPM_RC_P + TPM_RC_1)
+#define RC_CreateLoaded_inPublic (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM_HANDLE objectHandle;
+ TPM2B_PRIVATE outPrivate;
+ TPM2B_PUBLIC outPublic;
+ TPM2B_NAME name;
+} CreateLoaded_Out;
+
+TPM_RC
+TPM2_CreateLoaded(
+ CreateLoaded_In *in, // IN: input parameter list
+ CreateLoaded_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreatePrimary_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreatePrimary_fp.h
new file mode 100644
index 000000000..958293b10
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreatePrimary_fp.h
@@ -0,0 +1,96 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: CreatePrimary_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef CREATEPRIMARY_FP_H
+#define CREATEPRIMARY_FP_H
+
+typedef struct {
+ TPMI_RH_HIERARCHY primaryHandle;
+ TPM2B_SENSITIVE_CREATE inSensitive;
+ TPM2B_PUBLIC inPublic;
+ TPM2B_DATA outsideInfo;
+ TPML_PCR_SELECTION creationPCR;
+} CreatePrimary_In;
+
+#define RC_CreatePrimary_primaryHandle (TPM_RC_H + TPM_RC_1)
+#define RC_CreatePrimary_inSensitive (TPM_RC_P + TPM_RC_1)
+#define RC_CreatePrimary_inPublic (TPM_RC_P + TPM_RC_2)
+#define RC_CreatePrimary_outsideInfo (TPM_RC_P + TPM_RC_3)
+#define RC_CreatePrimary_creationPCR (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM_HANDLE objectHandle;
+ TPM2B_PUBLIC outPublic;
+ TPM2B_CREATION_DATA creationData;
+ TPM2B_DIGEST creationHash;
+ TPMT_TK_CREATION creationTicket;
+ TPM2B_NAME name;
+} CreatePrimary_Out;
+
+TPM_RC
+TPM2_CreatePrimary(
+ CreatePrimary_In *in, // IN: input parameter list
+ CreatePrimary_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateWrapKey_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateWrapKey_fp.h
new file mode 100644
index 000000000..a078d22d3
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/CreateWrapKey_fp.h
@@ -0,0 +1,65 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 CreateWrapKey */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: CreateWrapKey_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef CREATEWRAPKEY_FP_H
+#define CREATEWRAPKEY_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_KEY_HANDLE parentHandle;
+ TPM_ENCAUTH dataUsageAuth;
+ TPM_ENCAUTH dataMigrationAuth;
+ TPM_KEY12 keyInfo;
+} CreateWrapKey_In;
+
+typedef struct {
+ TPM_KEY12 wrappedKey;
+} CreateWrapKey_Out;
+
+TPM_RC
+TPM2_CreateWrapKey(
+ CreateWrapKey_In *in, // IN: input parameter buffer
+ CreateWrapKey_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Create_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Create_fp.h
new file mode 100644
index 000000000..95eca6159
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Create_fp.h
@@ -0,0 +1,96 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Create_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 137 */
+
+#ifndef CREATE_FP_H
+#define CREATE_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT parentHandle;
+ TPM2B_SENSITIVE_CREATE inSensitive;
+ TPM2B_PUBLIC inPublic;
+ TPM2B_DATA outsideInfo;
+ TPML_PCR_SELECTION creationPCR;
+} Create_In;
+
+#define RC_Create_parentHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Create_inSensitive (TPM_RC_P + TPM_RC_1)
+#define RC_Create_inPublic (TPM_RC_P + TPM_RC_2)
+#define RC_Create_outsideInfo (TPM_RC_P + TPM_RC_3)
+#define RC_Create_creationPCR (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM2B_PRIVATE outPrivate;
+ TPM2B_PUBLIC outPublic;
+ TPM2B_CREATION_DATA creationData;
+ TPM2B_DIGEST creationHash;
+ TPMT_TK_CREATION creationTicket;
+} Create_Out;
+
+TPM_RC
+TPM2_Create(
+ Create_In *in, // IN: input parameter list
+ Create_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackLockReset_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackLockReset_fp.h
new file mode 100644
index 000000000..6ef8ea2bf
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackLockReset_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: DictionaryAttackLockReset_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef DICTIONARYATTACKLOCKRESET_FP_H
+#define DICTIONARYATTACKLOCKRESET_FP_H
+
+typedef struct {
+ TPMI_RH_LOCKOUT lockHandle;
+} DictionaryAttackLockReset_In;
+
+#define RC_DictionaryAttackLockReset_lockHandle (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_DictionaryAttackLockReset(
+ DictionaryAttackLockReset_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackParameters_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackParameters_fp.h
new file mode 100644
index 000000000..86903c323
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/DictionaryAttackParameters_fp.h
@@ -0,0 +1,86 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: DictionaryAttackParameters_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef DICTIONARYATTACKPARAMETERS_FP_H
+#define DICTIONARYATTACKPARAMETERS_FP_H
+
+
+typedef struct {
+ TPMI_RH_LOCKOUT lockHandle;
+ UINT32 newMaxTries;
+ UINT32 newRecoveryTime;
+ UINT32 lockoutRecovery;
+} DictionaryAttackParameters_In;
+
+#define RC_DictionaryAttackParameters_lockHandle (TPM_RC_H + TPM_RC_1)
+#define RC_DictionaryAttackParameters_newMaxTries (TPM_RC_P + TPM_RC_1)
+#define RC_DictionaryAttackParameters_newRecoveryTime (TPM_RC_P + TPM_RC_2)
+#define RC_DictionaryAttackParameters_lockoutRecovery (TPM_RC_P + TPM_RC_3)
+
+TPM_RC
+TPM2_DictionaryAttackParameters(
+ DictionaryAttackParameters_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Duplicate_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Duplicate_fp.h
new file mode 100644
index 000000000..97693be53
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Duplicate_fp.h
@@ -0,0 +1,91 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Duplicate_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef DUPLICATE_FP_H
+#define DUPLICATE_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT objectHandle;
+ TPMI_DH_OBJECT newParentHandle;
+ TPM2B_DATA encryptionKeyIn;
+ TPMT_SYM_DEF_OBJECT symmetricAlg;
+} Duplicate_In;
+
+typedef struct {
+ TPM2B_DATA encryptionKeyOut;
+ TPM2B_PRIVATE duplicate;
+ TPM2B_ENCRYPTED_SECRET outSymSeed;
+} Duplicate_Out;
+
+#define RC_Duplicate_objectHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Duplicate_newParentHandle (TPM_RC_H + TPM_RC_2)
+#define RC_Duplicate_encryptionKeyIn (TPM_RC_P + TPM_RC_1)
+#define RC_Duplicate_symmetricAlg (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_Duplicate(
+ Duplicate_In *in, // IN: input parameter list
+ Duplicate_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECC_Parameters_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECC_Parameters_fp.h
new file mode 100644
index 000000000..18bc2a391
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECC_Parameters_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ECC_Parameters_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef ECC_PARAMETERS_FP_H
+#define ECC_PARAMETERS_FP_H
+
+typedef struct {
+ TPMI_ECC_CURVE curveID;
+} ECC_Parameters_In;
+
+#define RC_ECC_Parameters_curveID (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPMS_ALGORITHM_DETAIL_ECC parameters;
+} ECC_Parameters_Out;
+
+TPM_RC
+TPM2_ECC_Parameters(
+ ECC_Parameters_In *in, // IN: input parameter list
+ ECC_Parameters_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_KeyGen_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_KeyGen_fp.h
new file mode 100644
index 000000000..9ff523f14
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_KeyGen_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ECDH_KeyGen_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef ECDH_KEYGEN_FP_H
+#define ECDH_KEYGEN_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+} ECDH_KeyGen_In;
+
+#define RC_ECDH_KeyGen_keyHandle (TPM_RC_H + TPM_RC_1)
+
+typedef struct {
+ TPM2B_ECC_POINT zPoint;
+ TPM2B_ECC_POINT pubPoint;
+} ECDH_KeyGen_Out;
+
+TPM_RC
+TPM2_ECDH_KeyGen(
+ ECDH_KeyGen_In *in, // IN: input parameter list
+ ECDH_KeyGen_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_ZGen_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_ZGen_fp.h
new file mode 100644
index 000000000..f93fe15dc
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ECDH_ZGen_fp.h
@@ -0,0 +1,86 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ECDH_ZGen_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef ECDH_ZGEN_FP_H
+#define ECDH_ZGEN_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_ECC_POINT inPoint;
+} ECDH_ZGen_In;
+
+#define RC_ECDH_ZGen_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_ECDH_ZGen_inPoint (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM2B_ECC_POINT outPoint;
+} ECDH_ZGen_Out;
+
+TPM_RC
+TPM2_ECDH_ZGen(
+ ECDH_ZGen_In *in, // IN: input parameter list
+ ECDH_ZGen_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EC_Ephemeral_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EC_Ephemeral_fp.h
new file mode 100644
index 000000000..679762324
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EC_Ephemeral_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: EC_Ephemeral_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef EC_EPHEMERAL_FP_H
+#define EC_EPHEMERAL_FP_H
+
+typedef struct {
+ TPMI_ECC_CURVE curveID;
+} EC_Ephemeral_In;
+
+#define RC_EC_Ephemeral_curveID (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM2B_ECC_POINT Q;
+ UINT16 counter;
+} EC_Ephemeral_Out;
+
+TPM_RC
+TPM2_EC_Ephemeral(
+ EC_Ephemeral_In *in, // IN: input parameter list
+ EC_Ephemeral_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt2_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt2_fp.h
new file mode 100644
index 000000000..cff3a6445
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt2_fp.h
@@ -0,0 +1,93 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: EncryptDecrypt2_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015, 2016 */
+/* */
+/********************************************************************************/
+
+/* rev 146*/
+
+#ifndef ENCRYPTDECRYPT2_FP_H
+#define ENCRYPTDECRYPT2_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_MAX_BUFFER inData;
+ TPMI_YES_NO decrypt;
+ TPMI_ALG_CIPHER_MODE mode;
+ TPM2B_IV ivIn;
+} EncryptDecrypt2_In;
+
+#define RC_EncryptDecrypt2_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_EncryptDecrypt2_inData (TPM_RC_P + TPM_RC_1)
+#define RC_EncryptDecrypt2_decrypt (TPM_RC_P + TPM_RC_2)
+#define RC_EncryptDecrypt2_mode (TPM_RC_P + TPM_RC_3)
+#define RC_EncryptDecrypt2_ivIn (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM2B_MAX_BUFFER outData;
+ TPM2B_IV ivOut;
+} EncryptDecrypt2_Out;
+
+TPM_RC
+TPM2_EncryptDecrypt2(
+ EncryptDecrypt2_In *in, // IN: input parameter list
+ EncryptDecrypt2_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt_fp.h
new file mode 100644
index 000000000..57b0872f1
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EncryptDecrypt_fp.h
@@ -0,0 +1,93 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: EncryptDecrypt_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 146 */
+
+#ifndef ENCRYPTDECRYPT_FP_H
+#define ENCRYPTDECRYPT_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPMI_YES_NO decrypt;
+ TPMI_ALG_CIPHER_MODE mode;
+ TPM2B_IV ivIn;
+ TPM2B_MAX_BUFFER inData;
+} EncryptDecrypt_In;
+
+#define RC_EncryptDecrypt_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_EncryptDecrypt_decrypt (TPM_RC_P + TPM_RC_1)
+#define RC_EncryptDecrypt_mode (TPM_RC_P + TPM_RC_2)
+#define RC_EncryptDecrypt_ivIn (TPM_RC_P + TPM_RC_3)
+#define RC_EncryptDecrypt_inData (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM2B_MAX_BUFFER outData;
+ TPM2B_IV ivOut;
+} EncryptDecrypt_Out;
+
+TPM_RC
+TPM2_EncryptDecrypt(
+ EncryptDecrypt_In *in, // IN: input parameter list
+ EncryptDecrypt_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EventSequenceComplete_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EventSequenceComplete_fp.h
new file mode 100644
index 000000000..e58837e5d
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EventSequenceComplete_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: EventSequenceComplete_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef EVENTSEQUENCECOMPLETE_FP_H
+#define EVENTSEQUENCECOMPLETE_FP_H
+
+typedef struct {
+ TPMI_DH_PCR pcrHandle;
+ TPMI_DH_OBJECT sequenceHandle;
+ TPM2B_MAX_BUFFER buffer;
+} EventSequenceComplete_In;
+
+#define RC_EventSequenceComplete_pcrHandle (TPM_RC_H + TPM_RC_1)
+#define RC_EventSequenceComplete_sequenceHandle (TPM_RC_H + TPM_RC_2)
+#define RC_EventSequenceComplete_buffer (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPML_DIGEST_VALUES results;
+} EventSequenceComplete_Out;
+
+TPM_RC
+TPM2_EventSequenceComplete(
+ EventSequenceComplete_In *in, // IN: input parameter list
+ EventSequenceComplete_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EvictControl_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EvictControl_fp.h
new file mode 100644
index 000000000..1b31c4992
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/EvictControl_fp.h
@@ -0,0 +1,82 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: EvictControl_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef EVICTCONTROL_FP_H
+#define EVICTCONTROL_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION auth;
+ TPMI_DH_OBJECT objectHandle;
+ TPMI_DH_PERSISTENT persistentHandle;
+} EvictControl_In;
+
+#define RC_EvictControl_auth (TPM_RC_H + TPM_RC_1)
+#define RC_EvictControl_objectHandle (TPM_RC_H + TPM_RC_2)
+#define RC_EvictControl_persistentHandle (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_EvictControl(
+ EvictControl_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Extend_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Extend_fp.h
new file mode 100644
index 000000000..197e4c802
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Extend_fp.h
@@ -0,0 +1,64 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Extend */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Extend_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef EXTEND_FP_H
+#define EXTEND_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+
+ TPM_PCRINDEX pcrNum;
+ TPM_DIGEST inDigest;
+} Extend_In;
+
+typedef struct {
+ TPM_PCRVALUE outDigest;
+} Extend_Out;
+
+TPM_RC
+TPM2_Extend(
+ Extend_In *in, // IN: input parameter buffer
+ Extend_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushContext_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushContext_fp.h
new file mode 100644
index 000000000..97b22e53b
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushContext_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: FlushContext_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef FLUSHCONTEXT_FP_H
+#define FLUSHCONTEXT_FP_H
+
+typedef struct {
+ TPMI_DH_CONTEXT flushHandle;
+} FlushContext_In;
+
+#define RC_FlushContext_flushHandle (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_FlushContext(
+ FlushContext_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushSpecific_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushSpecific_fp.h
new file mode 100644
index 000000000..59b675134
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/FlushSpecific_fp.h
@@ -0,0 +1,58 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 FlushSpecific */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: FlushSpecific_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef FLUSHSPECIFIC_FP_H
+#define FLUSHSPECIFIC_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_HANDLE handle;
+ TPM_RESOURCE_TYPE resourceType;
+} FlushSpecific_In;
+
+TPM_RC
+TPM2_FlushSpecific(
+ FlushSpecific_In *in // IN: input parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability12_fp.h
new file mode 100644
index 000000000..a1c47a053
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability12_fp.h
@@ -0,0 +1,65 @@
+/********************************************************************************/
+/* */
+/* Get Capability for TPM 1.2 */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef GETCAPABILITY12_FP_H
+#define GETCAPABILITY12_FP_H
+
+typedef struct {
+ TPM_CAPABILITY_AREA capArea;
+ UINT32 subCapSize;
+ uint8_t subCap[MAX_RESPONSE_SIZE];
+} GetCapability12_In;
+
+#define RC_GetCapability12_capArea (TPM_RC_P + TPM_RC_1)
+#define RC_GetCapability12_subCapSize (TPM_RC_P + TPM_RC_2)
+#define RC_GetCapability12_subcap (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ UINT32 respSize;
+ uint8_t resp[MAX_RESPONSE_SIZE];
+} GetCapability12_Out;
+
+
+TPM_RC
+TPM2_GetCapability12(
+ GetCapability12_In *in, // IN: input parameter list
+ GetCapability12_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability_fp.h
new file mode 100644
index 000000000..7257613ae
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCapability_fp.h
@@ -0,0 +1,90 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: GetCapability_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef GETCAPABILITY_FP_H
+#define GETCAPABILITY_FP_H
+
+typedef struct {
+ TPM_CAP capability;
+ UINT32 property;
+ UINT32 propertyCount;
+} GetCapability_In;
+
+#define RC_GetCapability_capability (TPM_RC_P + TPM_RC_1)
+#define RC_GetCapability_property (TPM_RC_P + TPM_RC_2)
+#define RC_GetCapability_propertyCount (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPMI_YES_NO moreData;
+ TPMS_CAPABILITY_DATA capabilityData;
+} GetCapability_Out;
+
+
+TPM_RC
+TPM2_GetCapability(
+ GetCapability_In *in, // IN: input parameter list
+ GetCapability_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCommandAuditDigest_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCommandAuditDigest_fp.h
new file mode 100644
index 000000000..71a5f152d
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetCommandAuditDigest_fp.h
@@ -0,0 +1,91 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: GetCommandAuditDigest_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef GETCOMMANDAUDITDIGEST_FP_H
+#define GETCOMMANDAUDITDIGEST_FP_H
+
+typedef struct {
+ TPMI_RH_ENDORSEMENT privacyHandle;
+ TPMI_DH_OBJECT signHandle;
+ TPM2B_DATA qualifyingData;
+ TPMT_SIG_SCHEME inScheme;
+} GetCommandAuditDigest_In;
+
+#define RC_GetCommandAuditDigest_privacyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_GetCommandAuditDigest_signHandle (TPM_RC_H + TPM_RC_2)
+#define RC_GetCommandAuditDigest_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_GetCommandAuditDigest_inScheme (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_ATTEST auditInfo;
+ TPMT_SIGNATURE signature;
+} GetCommandAuditDigest_Out;
+
+TPM_RC
+TPM2_GetCommandAuditDigest(
+ GetCommandAuditDigest_In *in, // IN: input parameter list
+ GetCommandAuditDigest_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetRandom_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetRandom_fp.h
new file mode 100644
index 000000000..438da95c0
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetRandom_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: GetRandom_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef GETRANDOM_FP_H
+#define GETRANDOM_FP_H
+
+typedef struct {
+ UINT16 bytesRequested;
+} GetRandom_In;
+
+#define RC_GetRandom_bytesRequested (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM2B_DIGEST randomBytes;
+} GetRandom_Out;
+
+TPM_RC
+TPM2_GetRandom(
+ GetRandom_In *in, // IN: input parameter list
+ GetRandom_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetSessionAuditDigest_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetSessionAuditDigest_fp.h
new file mode 100644
index 000000000..b49c8cd68
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetSessionAuditDigest_fp.h
@@ -0,0 +1,93 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: GetSessionAuditDigest_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef GETSESSIONAUDITDIGEST_FP_H
+#define GETSESSIONAUDITDIGEST_FP_H
+
+typedef struct {
+ TPMI_RH_ENDORSEMENT privacyAdminHandle;
+ TPMI_DH_OBJECT signHandle;
+ TPMI_SH_HMAC sessionHandle;
+ TPM2B_DATA qualifyingData;
+ TPMT_SIG_SCHEME inScheme;
+} GetSessionAuditDigest_In;
+
+#define RC_GetSessionAuditDigest_privacyAdminHandle (TPM_RC_H + TPM_RC_1)
+#define RC_GetSessionAuditDigest_signHandle (TPM_RC_H + TPM_RC_2)
+#define RC_GetSessionAuditDigest_sessionHandle (TPM_RC_H + TPM_RC_3)
+#define RC_GetSessionAuditDigest_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_GetSessionAuditDigest_inScheme (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_ATTEST auditInfo;
+ TPMT_SIGNATURE signature;
+} GetSessionAuditDigest_Out;
+
+TPM_RC
+TPM2_GetSessionAuditDigest(
+ GetSessionAuditDigest_In *in, // IN: input parameter list
+ GetSessionAuditDigest_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTestResult_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTestResult_fp.h
new file mode 100644
index 000000000..4c4c71660
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTestResult_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: GetTestResult_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2016 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef GETTESTRESULT_FP_H
+#define GETTESTRESULT_FP_H
+
+typedef struct{
+ TPM2B_MAX_BUFFER outData;
+ TPM_RC testResult;
+} GetTestResult_Out;
+
+
+ TPM_RC
+TPM2_GetTestResult(
+ GetTestResult_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTime_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTime_fp.h
new file mode 100644
index 000000000..75c5e6c1e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/GetTime_fp.h
@@ -0,0 +1,91 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: GetTime_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef GETTIME_FP_H
+#define GETTIME_FP_H
+
+typedef struct {
+ TPMI_RH_ENDORSEMENT privacyAdminHandle;
+ TPMI_DH_OBJECT signHandle;
+ TPM2B_DATA qualifyingData;
+ TPMT_SIG_SCHEME inScheme;
+} GetTime_In;
+
+#define RC_GetTime_privacyAdminHandle (TPM_RC_H + TPM_RC_1)
+#define RC_GetTime_signHandle (TPM_RC_H + TPM_RC_2)
+#define RC_GetTime_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_GetTime_inScheme (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_ATTEST timeInfo;
+ TPMT_SIGNATURE signature;
+} GetTime_Out;
+
+TPM_RC
+TPM2_GetTime(
+ GetTime_In *in, // IN: input parameter list
+ GetTime_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_Start_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_Start_fp.h
new file mode 100644
index 000000000..b27b2e574
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_Start_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: HMAC_Start_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef HMAC_START_FP_H
+#define HMAC_START_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT handle;
+ TPM2B_AUTH auth;
+ TPMI_ALG_HASH hashAlg;
+} HMAC_Start_In;
+
+typedef struct {
+ TPMI_DH_OBJECT sequenceHandle;
+} HMAC_Start_Out;
+
+#define RC_HMAC_Start_handle (TPM_RC_H + TPM_RC_1)
+#define RC_HMAC_Start_auth (TPM_RC_P + TPM_RC_1)
+#define RC_HMAC_Start_hashAlg (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_HMAC_Start(
+ HMAC_Start_In *in, // IN: input parameter list
+ HMAC_Start_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_fp.h
new file mode 100644
index 000000000..aace92290
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HMAC_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: HMAC_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef HMAC_FP_H
+#define HMAC_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT handle;
+ TPM2B_MAX_BUFFER buffer;
+ TPMI_ALG_HASH hashAlg;
+} HMAC_In;
+
+#define RC_HMAC_handle (TPM_RC_H + TPM_RC_1)
+#define RC_HMAC_buffer (TPM_RC_P + TPM_RC_1)
+#define RC_HMAC_hashAlg (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_DIGEST outHMAC;
+} HMAC_Out;
+
+TPM_RC
+TPM2_HMAC(
+ HMAC_In *in, // IN: input parameter list
+ HMAC_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HashSequenceStart_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HashSequenceStart_fp.h
new file mode 100644
index 000000000..7a5bd1167
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HashSequenceStart_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: HashSequenceStart_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef HASHSEQUENCESTART_FP_H
+#define HASHSEQUENCESTART_FP_H
+
+typedef struct {
+ TPM2B_AUTH auth;
+ TPMI_ALG_HASH hashAlg;
+} HashSequenceStart_In;
+
+#define RC_HashSequenceStart_auth (TPM_RC_P + TPM_RC_1)
+#define RC_HashSequenceStart_hashAlg (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPMI_DH_OBJECT sequenceHandle;
+} HashSequenceStart_Out;
+
+
+
+TPM_RC
+TPM2_HashSequenceStart(
+ HashSequenceStart_In *in, // IN: input parameter list
+ HashSequenceStart_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Hash_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Hash_fp.h
new file mode 100644
index 000000000..7e3a0093f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Hash_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Hash_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef HASH_FP_H
+#define HASH_FP_H
+
+typedef struct {
+ TPM2B_MAX_BUFFER data;
+ TPMI_ALG_HASH hashAlg;
+ TPMI_RH_HIERARCHY hierarchy;
+} Hash_In;
+
+#define RC_Hash_data (TPM_RC_P + TPM_RC_1)
+#define RC_Hash_hashAlg (TPM_RC_P + TPM_RC_2)
+#define RC_Hash_hierarchy (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_DIGEST outHash;
+ TPMT_TK_HASHCHECK validation;
+} Hash_Out;
+
+TPM_RC
+TPM2_Hash(
+ Hash_In *in, // IN: input parameter list
+ Hash_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyChangeAuth_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyChangeAuth_fp.h
new file mode 100644
index 000000000..df6278a66
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyChangeAuth_fp.h
@@ -0,0 +1,80 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: HierarchyChangeAuth_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef HIERARCHYCHANGEAUTH_FP_H
+#define HIERARCHYCHANGEAUTH_FP_H
+
+typedef struct {
+ TPMI_RH_HIERARCHY_AUTH authHandle;
+ TPM2B_AUTH newAuth;
+} HierarchyChangeAuth_In;
+
+#define RC_HierarchyChangeAuth_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_HierarchyChangeAuth_newAuth (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_HierarchyChangeAuth(
+ HierarchyChangeAuth_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyControl_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyControl_fp.h
new file mode 100644
index 000000000..e774f6df1
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/HierarchyControl_fp.h
@@ -0,0 +1,83 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: HierarchyControl_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef HIERARCHYCONTROL_FP_H
+#define HIERARCHYCONTROL_FP_H
+
+typedef struct {
+ TPMI_RH_HIERARCHY authHandle;
+ TPMI_RH_ENABLES enable;
+ TPMI_YES_NO state;
+} HierarchyControl_In;
+
+#define RC_HierarchyControl_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_HierarchyControl_enable (TPM_RC_P + TPM_RC_1)
+#define RC_HierarchyControl_state (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_HierarchyControl(
+ HierarchyControl_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Implementation.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Implementation.h
new file mode 100644
index 000000000..9d63da1d2
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Implementation.h
@@ -0,0 +1,1446 @@
+/********************************************************************************/
+/* */
+/* TSS Implementation Specific Constants */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012 - 2019 */
+/* */
+/********************************************************************************/
+
+/* #define TPM_TSS_SO_0 to get the libibmtss.so.0 values. Leave it undefined to get the new
+ libibmtss.so.1 values.
+
+ The new values are required for a TPM with 4 or more hash algorithms.
+*/
+
+// A.2 Implementation.h
+
+#ifndef _IMPLEMENTATION_H_
+#define _IMPLEMENTATION_H_
+
+#include <ibmtss/TpmBuildSwitches.h>
+#include <ibmtss/BaseTypes.h>
+#include <ibmtss/TPMB.h>
+
+/* Constants for TPM_Types.h structures. Changing these values is likely to break ABI
+ compatiblility.*/
+
+// From Vendor-Specific: Table 4 - Defines for Key Size Constants
+
+#ifdef TPM_TSS_SO_0
+#define MAX_RSA_KEY_BYTES 256
+#else
+#define MAX_RSA_KEY_BYTES 512
+#endif
+
+#ifdef TPM_TSS_SO_0
+#define MAX_ECC_KEY_BYTES 48
+#else
+#define MAX_ECC_KEY_BYTES 128
+#endif
+
+/* This is the PC Client minimum value, and should be used for applications. */
+#define IMPLEMENTATION_PCR 24
+
+#define MAX_HANDLE_NUM 3 /* the maximum number of handles in the handle
+ area */
+#define MAX_ACTIVE_SESSIONS 64 /* the number of simultaneously active sessions that
+ are supported by the TPM implementation */
+#define MAX_SESSION_NUM 3 /* this is the current maximum value */
+
+#ifdef TPM_TSS_SO_0
+#define PCR_SELECT_MAX ((IMPLEMENTATION_PCR+7)/8)
+#else
+/* increased to 8 to handle up to 64 PCRs */
+#define PCR_SELECT_MAX 8
+#endif
+
+#ifdef TPM_TSS_SO_0
+#define MAX_CONTEXT_SIZE 2048
+#else
+#define MAX_CONTEXT_SIZE 5120
+#endif
+
+#define MAX_DIGEST_BUFFER 2048
+#define MAX_NV_BUFFER_SIZE 2048
+#define MAX_CAP_BUFFER 2048
+
+#ifdef TPM_TSS_SO_0
+#define MAX_ALG_LIST_SIZE 64 /* number of algorithms that can be in a list */
+#else
+#define MAX_ALG_LIST_SIZE 128 /* number of algorithms that can be in a list */
+#endif
+
+#define MAX_COMMAND_SIZE 4096 /* maximum size of a command */
+#define MAX_RESPONSE_SIZE 4096 /* maximum size of a response */
+
+#ifdef TPM_TSS_SO_0
+#define MAX_SYM_DATA 128 /* this is the maximum number of octets that
+ may be in a sealed blob. */
+#else
+#define MAX_SYM_DATA 256
+#endif
+
+#ifdef TPM_TSS_SO_0
+/* For the TSS .so.0, the number of digest and PCR banks was originally dependent on the number of
+ supported hash algoriths, using common TPM / TSS code. */
+#define HASH_COUNT 3
+#else
+/* For the TSS .so.1, the number was increased to support a SW TPM with 4 banks (unlikely for a HW
+ TPM) plus future expansion. */
+#define HASH_COUNT 16
+#endif
+
+/* value independent of supported hash algorithms */
+#define LABEL_MAX_BUFFER 48
+#if LABEL_MAX_BUFFER < 32
+#error "The size allowed for the label is not large enough for interoperability."
+#endif
+
+/* hard code maximum independent of the algorithms actually supported */
+#define MAX_SYM_KEY_BYTES 32
+#define MAX_SYM_BLOCK_SIZE 16
+
+#define RSA_DEFAULT_PUBLIC_EXPONENT 0x00010001 /* 2^^16 + 1 */
+
+#undef TRUE
+#undef FALSE
+
+// From TPM 2.0 Part 2: Table 4 - Defines for Logic Values
+
+#define TRUE 1
+#define FALSE 0
+#define YES 1
+#define NO 0
+#define SET 1
+#define CLEAR 0
+
+// Change these definitions to turn all algorithms or commands ON or OFF. That is, to turn all
+// algorithms on, set ALG_NO to YES. This is mostly useful as a debug feature.
+
+#define ALG_YES YES
+#define ALG_NO NO
+#define CC_YES YES
+#define CC_NO NO
+
+// From Vendor-Specific: Table 2 - Defines for Implemented Algorithms
+
+#ifndef ALG_RSA
+#define ALG_RSA ALG_YES
+#endif
+#ifndef ALG_SHA1
+#define ALG_SHA1 ALG_YES
+#endif
+#define ALG_HMAC ALG_YES
+#ifndef ALG_TDES
+#define ALG_TDES ALG_YES
+#endif
+#define ALG_AES ALG_YES
+#define ALG_MGF1 ALG_YES
+#define ALG_XOR ALG_YES
+#define ALG_KEYEDHASH ALG_YES
+#ifndef ALG_SHA256
+#define ALG_SHA256 ALG_YES
+#endif
+#ifndef ALG_SHA384
+#define ALG_SHA384 ALG_YES
+#endif
+#ifndef ALG_SHA512
+#define ALG_SHA512 ALG_YES
+#endif
+#define ALG_SHA3_256 ALG_NO
+#define ALG_SHA3_384 ALG_NO
+#define ALG_SHA3_512 ALG_NO
+#define ALG_SM3_256 ALG_YES
+#define ALG_SM4 ALG_NO
+#define ALG_RSASSA (ALG_YES*ALG_RSA)
+#define ALG_RSAES (ALG_YES*ALG_RSA)
+#define ALG_RSAPSS (ALG_YES*ALG_RSA)
+#define ALG_OAEP (ALG_YES*ALG_RSA)
+#ifndef ALG_ECC
+#define ALG_ECC ALG_YES
+#endif
+#define ALG_ECDH (ALG_YES*ALG_ECC)
+#define ALG_ECDSA (ALG_YES*ALG_ECC)
+#define ALG_ECDAA (ALG_YES*ALG_ECC)
+#define ALG_SM2 (ALG_YES*ALG_ECC)
+#define ALG_ECSCHNORR (ALG_YES*ALG_ECC)
+#define ALG_ECMQV (ALG_NO*ALG_ECC)
+#define ALG_SYMCIPHER ALG_YES
+#define ALG_KDF1_SP800_56A (ALG_YES*ALG_ECC)
+#define ALG_KDF2 ALG_NO
+#define ALG_KDF1_SP800_108 ALG_YES
+#define ALG_CTR ALG_YES
+#define ALG_OFB ALG_YES
+#define ALG_CBC ALG_YES
+#define ALG_CFB ALG_YES
+#define ALG_ECB ALG_YES
+
+// From Vendor-Specific: Table 6 - Defines for Implemented Commands
+
+#define CC_ActivateCredential CC_YES
+#define CC_Certify CC_YES
+#define CC_CertifyCreation CC_YES
+#define CC_CertifyX509 CC_YES
+#define CC_ChangeEPS CC_YES
+#define CC_ChangePPS CC_YES
+#define CC_Clear CC_YES
+#define CC_ClearControl CC_YES
+#define CC_ClockRateAdjust CC_YES
+#define CC_ClockSet CC_YES
+#define CC_Commit (CC_YES*ALG_ECC)
+#define CC_ContextLoad CC_YES
+#define CC_ContextSave CC_YES
+#define CC_Create CC_YES
+#define CC_CreatePrimary CC_YES
+#define CC_DictionaryAttackLockReset CC_YES
+#define CC_DictionaryAttackParameters CC_YES
+#define CC_Duplicate CC_YES
+#define CC_ECC_Parameters (CC_YES*ALG_ECC)
+#define CC_ECDH_KeyGen (CC_YES*ALG_ECC)
+#define CC_ECDH_ZGen (CC_YES*ALG_ECC)
+#define CC_EncryptDecrypt CC_YES
+#define CC_EventSequenceComplete CC_YES
+#define CC_EvictControl CC_YES
+#define CC_FieldUpgradeData CC_NO
+#define CC_FieldUpgradeStart CC_NO
+#define CC_FirmwareRead CC_NO
+#define CC_FlushContext CC_YES
+#define CC_GetCapability CC_YES
+#define CC_GetCommandAuditDigest CC_YES
+#define CC_GetRandom CC_YES
+#define CC_GetSessionAuditDigest CC_YES
+#define CC_GetTestResult CC_YES
+#define CC_GetTime CC_YES
+#define CC_Hash CC_YES
+#define CC_HashSequenceStart CC_YES
+#define CC_HierarchyChangeAuth CC_YES
+#define CC_HierarchyControl CC_YES
+#define CC_HMAC CC_YES
+#define CC_HMAC_Start CC_YES
+#define CC_Import CC_YES
+#define CC_IncrementalSelfTest CC_YES
+#define CC_Load CC_YES
+#define CC_LoadExternal CC_YES
+#define CC_MakeCredential CC_YES
+#define CC_NV_Certify CC_YES
+#define CC_NV_ChangeAuth CC_YES
+#define CC_NV_DefineSpace CC_YES
+#define CC_NV_Extend CC_YES
+#define CC_NV_GlobalWriteLock CC_YES
+#define CC_NV_Increment CC_YES
+#define CC_NV_Read CC_YES
+#define CC_NV_ReadLock CC_YES
+#define CC_NV_ReadPublic CC_YES
+#define CC_NV_SetBits CC_YES
+#define CC_NV_UndefineSpace CC_YES
+#define CC_NV_UndefineSpaceSpecial CC_YES
+#define CC_NV_Write CC_YES
+#define CC_NV_WriteLock CC_YES
+#define CC_ObjectChangeAuth CC_YES
+#define CC_PCR_Allocate CC_YES
+#define CC_PCR_Event CC_YES
+#define CC_PCR_Extend CC_YES
+#define CC_PCR_Read CC_YES
+#define CC_PCR_Reset CC_YES
+#define CC_PCR_SetAuthPolicy CC_YES
+#define CC_PCR_SetAuthValue CC_YES
+#define CC_PolicyAuthorize CC_YES
+#define CC_PolicyAuthorizeNV CC_YES
+#define CC_PolicyAuthValue CC_YES
+#define CC_PolicyCommandCode CC_YES
+#define CC_PolicyCounterTimer CC_YES
+#define CC_PolicyCpHash CC_YES
+#define CC_PolicyDuplicationSelect CC_YES
+#define CC_PolicyGetDigest CC_YES
+#define CC_PolicyLocality CC_YES
+#define CC_PolicyNameHash CC_YES
+#define CC_PolicyNV CC_YES
+#define CC_PolicyOR CC_YES
+#define CC_PolicyPassword CC_YES
+#define CC_PolicyPCR CC_YES
+#define CC_PolicyPhysicalPresence CC_YES
+#define CC_PolicyRestart CC_YES
+#define CC_PolicySecret CC_YES
+#define CC_PolicySigned CC_YES
+#define CC_PolicyTicket CC_YES
+#define CC_PP_Commands CC_YES
+#define CC_Quote CC_YES
+#define CC_ReadClock CC_YES
+#define CC_ReadPublic CC_YES
+#define CC_Rewrap CC_YES
+#define CC_RSA_Decrypt (CC_YES*ALG_RSA)
+#define CC_RSA_Encrypt (CC_YES*ALG_RSA)
+#define CC_SelfTest CC_YES
+#define CC_SequenceComplete CC_YES
+#define CC_SequenceUpdate CC_YES
+#define CC_SetAlgorithmSet CC_YES
+#define CC_SetCommandCodeAuditStatus CC_YES
+#define CC_SetPrimaryPolicy CC_YES
+#define CC_Shutdown CC_YES
+#define CC_Sign CC_YES
+#define CC_StartAuthSession CC_YES
+#define CC_Startup CC_YES
+#define CC_StirRandom CC_YES
+#define CC_TestParms CC_YES
+#define CC_Unseal CC_YES
+#define CC_VerifySignature CC_YES
+#define CC_ZGen_2Phase (CC_YES*ALG_ECC)
+#define CC_EC_Ephemeral (CC_YES*ALG_ECC)
+#define CC_PolicyNvWritten CC_YES
+#define CC_PolicyTemplate CC_YES
+#define CC_CreateLoaded CC_YES
+#define CC_PolicyAuthorizeNV CC_YES
+#define CC_EncryptDecrypt2 CC_YES
+#define CC_Vendor_TCG_Test CC_YES
+
+#define CC_NTC2_PreConfig CC_YES
+#define CC_NTC2_LockPreConfig CC_YES
+#define CC_NTC2_GetConfig CC_YES
+
+// From TCG Algorithm Registry: Table 2 - Definition of TPM_ALG_ID Constants
+
+#define ALG_ERROR_VALUE 0x0000
+#define TPM_ALG_ERROR (TPM_ALG_ID)(ALG_ERROR_VALUE)
+#define ALG_RSA_VALUE 0x0001
+#if defined ALG_RSA && ALG_RSA == YES
+#define TPM_ALG_RSA (TPM_ALG_ID)(ALG_RSA_VALUE)
+#endif
+#define ALG_TDES_VALUE 0x0003
+#if defined ALG_TDES && ALG_TDES == YES
+#define TPM_ALG_TDES (TPM_ALG_ID)(ALG_TDES_VALUE)
+#endif
+#define ALG_SHA_VALUE 0x0004
+#if defined ALG_SHA && ALG_SHA == YES
+#define TPM_ALG_SHA (TPM_ALG_ID)(ALG_SHA_VALUE)
+#endif
+#define ALG_SHA1_VALUE 0x0004
+#if defined ALG_SHA1 && ALG_SHA1 == YES
+#define TPM_ALG_SHA1 (TPM_ALG_ID)(ALG_SHA1_VALUE)
+#endif
+#define ALG_HMAC_VALUE 0x0005
+#if defined ALG_HMAC && ALG_HMAC == YES
+#define TPM_ALG_HMAC (TPM_ALG_ID)(ALG_HMAC_VALUE)
+#endif
+#define ALG_AES_VALUE 0x0006
+#if defined ALG_AES && ALG_AES == YES
+#define TPM_ALG_AES (TPM_ALG_ID)(ALG_AES_VALUE)
+#endif
+#define ALG_MGF1_VALUE 0x0007
+#if defined ALG_MGF1 && ALG_MGF1 == YES
+#define TPM_ALG_MGF1 (TPM_ALG_ID)(ALG_MGF1_VALUE)
+#endif
+#define ALG_KEYEDHASH_VALUE 0x0008
+#if defined ALG_KEYEDHASH && ALG_KEYEDHASH == YES
+#define TPM_ALG_KEYEDHASH (TPM_ALG_ID)(ALG_KEYEDHASH_VALUE)
+#endif
+#define ALG_XOR_VALUE 0x000A
+#if defined ALG_XOR && ALG_XOR == YES
+#define TPM_ALG_XOR (TPM_ALG_ID)(ALG_XOR_VALUE)
+#endif
+#define ALG_SHA256_VALUE 0x000B
+#if defined ALG_SHA256 && ALG_SHA256 == YES
+#define TPM_ALG_SHA256 (TPM_ALG_ID)(ALG_SHA256_VALUE)
+#endif
+#define ALG_SHA384_VALUE 0x000C
+#if defined ALG_SHA384 && ALG_SHA384 == YES
+#define TPM_ALG_SHA384 (TPM_ALG_ID)(ALG_SHA384_VALUE)
+#endif
+#define ALG_SHA512_VALUE 0x000D
+#if defined ALG_SHA512 && ALG_SHA512 == YES
+#define TPM_ALG_SHA512 (TPM_ALG_ID)(ALG_SHA512_VALUE)
+#endif
+#define ALG_NULL_VALUE 0x0010
+#define TPM_ALG_NULL (TPM_ALG_ID)(ALG_NULL_VALUE)
+#define ALG_SM3_256_VALUE 0x0012
+#if defined ALG_SM3_256 && ALG_SM3_256 == YES
+#define TPM_ALG_SM3_256 (TPM_ALG_ID)(ALG_SM3_256_VALUE)
+#endif
+#define ALG_SM4_VALUE 0x0013
+#if defined ALG_SM4 && ALG_SM4 == YES
+#define TPM_ALG_SM4 (TPM_ALG_ID)(ALG_SM4_VALUE)
+#endif
+#define ALG_RSASSA_VALUE 0x0014
+#if defined ALG_RSASSA && ALG_RSASSA == YES
+#define TPM_ALG_RSASSA (TPM_ALG_ID)(ALG_RSASSA_VALUE)
+#endif
+#define ALG_RSAES_VALUE 0x0015
+#if defined ALG_RSAES && ALG_RSAES == YES
+#define TPM_ALG_RSAES (TPM_ALG_ID)(ALG_RSAES_VALUE)
+#endif
+#define ALG_RSAPSS_VALUE 0x0016
+#if defined ALG_RSAPSS && ALG_RSAPSS == YES
+#define TPM_ALG_RSAPSS (TPM_ALG_ID)(ALG_RSAPSS_VALUE)
+#endif
+#define ALG_OAEP_VALUE 0x0017
+#if defined ALG_OAEP && ALG_OAEP == YES
+#define TPM_ALG_OAEP (TPM_ALG_ID)(ALG_OAEP_VALUE)
+#endif
+#define ALG_ECDSA_VALUE 0x0018
+#if defined ALG_ECDSA && ALG_ECDSA == YES
+#define TPM_ALG_ECDSA (TPM_ALG_ID)(ALG_ECDSA_VALUE)
+#endif
+#define ALG_ECDH_VALUE 0x0019
+#if defined ALG_ECDH && ALG_ECDH == YES
+#define TPM_ALG_ECDH (TPM_ALG_ID)(ALG_ECDH_VALUE)
+#endif
+#define ALG_ECDAA_VALUE 0x001A
+#if defined ALG_ECDAA && ALG_ECDAA == YES
+#define TPM_ALG_ECDAA (TPM_ALG_ID)(ALG_ECDAA_VALUE)
+#endif
+#define ALG_SM2_VALUE 0x001B
+#if defined ALG_SM2 && ALG_SM2 == YES
+#define TPM_ALG_SM2 (TPM_ALG_ID)(ALG_SM2_VALUE)
+#endif
+#define ALG_ECSCHNORR_VALUE 0x001C
+#if defined ALG_ECSCHNORR && ALG_ECSCHNORR == YES
+#define TPM_ALG_ECSCHNORR (TPM_ALG_ID)(ALG_ECSCHNORR_VALUE)
+#endif
+#define ALG_ECMQV_VALUE 0x001D
+#if defined ALG_ECMQV && ALG_ECMQV == YES
+#define TPM_ALG_ECMQV (TPM_ALG_ID)(ALG_ECMQV_VALUE)
+#endif
+#define ALG_KDF1_SP800_56A_VALUE 0x0020
+#if defined ALG_KDF1_SP800_56A && ALG_KDF1_SP800_56A == YES
+#define TPM_ALG_KDF1_SP800_56A (TPM_ALG_ID)(ALG_KDF1_SP800_56A_VALUE)
+#endif
+#define ALG_KDF2_VALUE 0x0021
+#if defined ALG_KDF2 && ALG_KDF2 == YES
+#define TPM_ALG_KDF2 (TPM_ALG_ID)(ALG_KDF2_VALUE)
+#endif
+#define ALG_KDF1_SP800_108_VALUE 0x0022
+#if defined ALG_KDF1_SP800_108 && ALG_KDF1_SP800_108 == YES
+#define TPM_ALG_KDF1_SP800_108 (TPM_ALG_ID)(ALG_KDF1_SP800_108_VALUE)
+#endif
+#define ALG_ECC_VALUE 0x0023
+#if defined ALG_ECC && ALG_ECC == YES
+#define TPM_ALG_ECC (TPM_ALG_ID)(ALG_ECC_VALUE)
+#endif
+#define ALG_SYMCIPHER_VALUE 0x0025
+#if defined ALG_SYMCIPHER && ALG_SYMCIPHER == YES
+#define TPM_ALG_SYMCIPHER (TPM_ALG_ID)(ALG_SYMCIPHER_VALUE)
+#endif
+#define ALG_CAMELLIA_VALUE 0x0026
+#if defined ALG_CAMELLIA && ALG_CAMELLIA == YES
+#define TPM_ALG_CAMELLIA (TPM_ALG_ID)(ALG_CAMELLIA_VALUE)
+#endif
+#define ALG_SHA3_256_VALUE 0x0027
+#if defined ALG_SHA3_256 && ALG_SHA3_256 == YES
+#define TPM_ALGSHA3_256 (TPM_ALG_ID)(ALG_SHA3_256_VALUE)
+#endif
+#define ALG_SHA3_384_VALUE 0x0028
+#if defined ALG_SHA3_384 && ALG_SHA3_384 == YES
+#define TPM_ALGSHA3_384 (TPM_ALG_ID)(ALG_SHA3_384_VALUE)
+#endif
+#define ALG_SHA3_512_VALUE 0x0029
+#if defined ALG_SHA3_512 && ALG_SHA3_512 == YES
+#define TPM_ALGSHA3_512 (TPM_ALG_ID)(ALG_SHA3_512_VALUE)
+#endif
+#define ALG_CMAC_VALUE 0x003f
+#if defined ALG_CMAC && ALG_CMAC == YES
+#define TPM_ALG_CMAC (TPM_ALG_ID)(ALG_CMAC_VALUE)
+#endif
+#define ALG_CTR_VALUE 0x0040
+#if defined ALG_CTR && ALG_CTR == YES
+#define TPM_ALG_CTR (TPM_ALG_ID)(ALG_CTR_VALUE)
+#endif
+#define ALG_OFB_VALUE 0x0041
+#if defined ALG_OFB && ALG_OFB == YES
+#define TPM_ALG_OFB (TPM_ALG_ID)(ALG_OFB_VALUE)
+#endif
+#define ALG_CBC_VALUE 0x0042
+#if defined ALG_CBC && ALG_CBC == YES
+#define TPM_ALG_CBC (TPM_ALG_ID)(ALG_CBC_VALUE)
+#endif
+#define ALG_CFB_VALUE 0x0043
+#if defined ALG_CFB && ALG_CFB == YES
+#define TPM_ALG_CFB (TPM_ALG_ID)(ALG_CFB_VALUE)
+#endif
+#define ALG_ECB_VALUE 0x0044
+#if defined ALG_ECB && ALG_ECB == YES
+#define TPM_ALG_ECB (TPM_ALG_ID)(ALG_ECB_VALUE)
+#endif
+
+// From TCG Algorithm Registry: Table 3 - Definition of TPM_ECC_CURVE Constants
+
+#define TPM_ECC_NONE (TPM_ECC_CURVE)(0x0000)
+#define TPM_ECC_NIST_P192 (TPM_ECC_CURVE)(0x0001)
+#define TPM_ECC_NIST_P224 (TPM_ECC_CURVE)(0x0002)
+#define TPM_ECC_NIST_P256 (TPM_ECC_CURVE)(0x0003)
+#define TPM_ECC_NIST_P384 (TPM_ECC_CURVE)(0x0004)
+#define TPM_ECC_NIST_P521 (TPM_ECC_CURVE)(0x0005)
+#define TPM_ECC_BN_P256 (TPM_ECC_CURVE)(0x0010)
+#define TPM_ECC_BN_P638 (TPM_ECC_CURVE)(0x0011)
+#define TPM_ECC_SM2_P256 (TPM_ECC_CURVE)(0x0020)
+
+// From TCG Algorithm Registry: Table 12 - Defines for SHA1 Hash Values
+#define SHA1_DIGEST_SIZE 20
+#define SHA1_BLOCK_SIZE 64
+#define SHA1_DER_SIZE 15
+#define SHA1_DER \
+ 0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14
+
+// From TCG Algorithm Registry: Table 13 - Defines for SHA256 Hash Values
+#define SHA256_DIGEST_SIZE 32
+#define SHA256_BLOCK_SIZE 64
+#define SHA256_DER_SIZE 19
+#define SHA256_DER \
+ 0x30,0x31,0x30,0x0D,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x01,0x05,0x00,0x04,0x20
+
+// From TCG Algorithm Registry: Table 14 - Defines for SHA384 Hash Values
+#define SHA384_DIGEST_SIZE 48
+#define SHA384_BLOCK_SIZE 128
+#define SHA384_DER_SIZE 19
+#define SHA384_DER \
+ 0x30,0x41,0x30,0x0D,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x02,0x05,0x00,0x04,0x30
+
+// From TCG Algorithm Registry: Table 15 - Defines for SHA512 Hash Values
+#define SHA512_DIGEST_SIZE 64
+#define SHA512_BLOCK_SIZE 128
+#define SHA512_DER_SIZE 19
+#define SHA512_DER \
+ 0x30,0x51,0x30,0x0D,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x03,0x05,0x00,0x04,0x40
+
+// From TCG Algorithm Registry: Table 16 - Defines for SM3_256 Hash Values
+#define SM3_256_DIGEST_SIZE 32
+#define SM3_256_BLOCK_SIZE 64
+#define SM3_256_DER_SIZE 18
+#define SM3_256_DER \
+ 0x30,0x30,0x30,0x0C,0x06,0x08,0x2A,0x81,0x1C,0x81,0x45,0x01,0x83,0x11,0x05,0x00,0x04,0x20
+
+// From TCG Algorithm Registry: Table 17 - Defines for AES Symmetric Cipher Algorithm Constants
+#define AES_128_BLOCK_SIZE_BYTES 16
+#define AES_192_BLOCK_SIZE_BYTES 16
+#define AES_256_BLOCK_SIZE_BYTES 16
+
+// From TCG Algorithm Registry: Table 18 - Defines for SM4 Symmetric Cipher Algorithm Constants
+#define SM4_128_BLOCK_SIZE_BYTES 16
+
+// From TCG Algorithm Registry: Table 19 - Defines for CAMELLIA Symmetric Cipher Algorithm Constants
+#define CAMELLIA_128_BLOCK_SIZE_BYTES 16
+#define CAMELLIA_192_BLOCK_SIZE_BYTES 16
+#define CAMELLIA_256_BLOCK_SIZE_BYTES 16
+
+// From TPM 2.0 Part 2: Table 12 - Definition of TPM_CC Constants
+
+typedef UINT32 TPM_CC;
+
+#define TPM_CC_FIRST 0x0000011f /* Compile variable. May decrease based on
+ implementation. */
+
+#ifndef CC_NV_UndefineSpaceSpecial
+# define CC_NV_UndefineSpaceSpecial NO
+#endif
+#if CC_NV_UndefineSpaceSpecial == YES
+#define TPM_CC_NV_UndefineSpaceSpecial (TPM_CC)(0x0000011f)
+#endif
+#ifndef CC_EvictControl
+# define CC_EvictControl NO
+#endif
+#if CC_EvictControl == YES
+#define TPM_CC_EvictControl (TPM_CC)(0x00000120)
+#endif
+#ifndef CC_HierarchyControl
+# define CC_HierarchyControl NO
+#endif
+#if CC_HierarchyControl == YES
+#define TPM_CC_HierarchyControl (TPM_CC)(0x00000121)
+#endif
+#ifndef CC_NV_UndefineSpace
+# define CC_NV_UndefineSpace NO
+#endif
+#if CC_NV_UndefineSpace == YES
+#define TPM_CC_NV_UndefineSpace (TPM_CC)(0x00000122)
+#endif
+#ifndef CC_ChangeEPS
+# define CC_ChangeEPS NO
+#endif
+#if CC_ChangeEPS == YES
+#define TPM_CC_ChangeEPS (TPM_CC)(0x00000124)
+#endif
+#ifndef CC_ChangePPS
+# define CC_ChangePPS NO
+#endif
+#if CC_ChangePPS == YES
+#define TPM_CC_ChangePPS (TPM_CC)(0x00000125)
+#endif
+#ifndef CC_Clear
+# define CC_Clear NO
+#endif
+#if CC_Clear == YES
+#define TPM_CC_Clear (TPM_CC)(0x00000126)
+#endif
+#ifndef CC_ClearControl
+# define CC_ClearControl NO
+#endif
+#if CC_ClearControl == YES
+#define TPM_CC_ClearControl (TPM_CC)(0x00000127)
+#endif
+#ifndef CC_ClockSet
+# define CC_ClockSet NO
+#endif
+#if CC_ClockSet == YES
+#define TPM_CC_ClockSet (TPM_CC)(0x00000128)
+#endif
+#ifndef CC_HierarchyChangeAuth
+# define CC_HierarchyChangeAuth NO
+#endif
+#if CC_HierarchyChangeAuth == YES
+#define TPM_CC_HierarchyChangeAuth (TPM_CC)(0x00000129)
+#endif
+#ifndef CC_NV_DefineSpace
+# define CC_NV_DefineSpace NO
+#endif
+#if CC_NV_DefineSpace == YES
+#define TPM_CC_NV_DefineSpace (TPM_CC)(0x0000012a)
+#endif
+#ifndef CC_PCR_Allocate
+# define CC_PCR_Allocate NO
+#endif
+#if CC_PCR_Allocate == YES
+#define TPM_CC_PCR_Allocate (TPM_CC)(0x0000012b)
+#endif
+#ifndef CC_PCR_SetAuthPolicy
+# define CC_PCR_SetAuthPolicy NO
+#endif
+#if CC_PCR_SetAuthPolicy == YES
+#define TPM_CC_PCR_SetAuthPolicy (TPM_CC)(0x0000012c)
+#endif
+#ifndef CC_PP_Commands
+# define CC_PP_Commands NO
+#endif
+#if CC_PP_Commands == YES
+#define TPM_CC_PP_Commands (TPM_CC)(0x0000012d)
+#endif
+#ifndef CC_SetPrimaryPolicy
+# define CC_SetPrimaryPolicy NO
+#endif
+#if CC_SetPrimaryPolicy == YES
+#define TPM_CC_SetPrimaryPolicy (TPM_CC)(0x0000012e)
+#endif
+#ifndef CC_FieldUpgradeStart
+# define CC_FieldUpgradeStart NO
+#endif
+#if CC_FieldUpgradeStart == YES
+#define TPM_CC_FieldUpgradeStart (TPM_CC)(0x0000012f)
+#endif
+#ifndef CC_ClockRateAdjust
+# define CC_ClockRateAdjust NO
+#endif
+#if CC_ClockRateAdjust == YES
+#define TPM_CC_ClockRateAdjust (TPM_CC)(0x00000130)
+#endif
+#ifndef CC_CreatePrimary
+# define CC_CreatePrimary NO
+#endif
+#if CC_CreatePrimary == YES
+#define TPM_CC_CreatePrimary (TPM_CC)(0x00000131)
+#endif
+#ifndef CC_NV_GlobalWriteLock
+# define CC_NV_GlobalWriteLock NO
+#endif
+#if CC_NV_GlobalWriteLock == YES
+#define TPM_CC_NV_GlobalWriteLock (TPM_CC)(0x00000132)
+#endif
+#ifndef CC_GetCommandAuditDigest
+# define CC_GetCommandAuditDigest NO
+#endif
+#if CC_GetCommandAuditDigest == YES
+#define TPM_CC_GetCommandAuditDigest (TPM_CC)(0x00000133)
+#endif
+#ifndef CC_NV_Increment
+# define CC_NV_Increment NO
+#endif
+#if CC_NV_Increment == YES
+#define TPM_CC_NV_Increment (TPM_CC)(0x00000134)
+#endif
+#ifndef CC_NV_SetBits
+# define CC_NV_SetBits NO
+#endif
+#if CC_NV_SetBits == YES
+#define TPM_CC_NV_SetBits (TPM_CC)(0x00000135)
+#endif
+#ifndef CC_NV_Extend
+# define CC_NV_Extend NO
+#endif
+#if CC_NV_Extend == YES
+#define TPM_CC_NV_Extend (TPM_CC)(0x00000136)
+#endif
+#ifndef CC_NV_Write
+# define CC_NV_Write NO
+#endif
+#if CC_NV_Write == YES
+#define TPM_CC_NV_Write (TPM_CC)(0x00000137)
+#endif
+#ifndef CC_NV_WriteLock
+# define CC_NV_WriteLock NO
+#endif
+#if CC_NV_WriteLock == YES
+#define TPM_CC_NV_WriteLock (TPM_CC)(0x00000138)
+#endif
+#ifndef CC_DictionaryAttackLockReset
+# define CC_DictionaryAttackLockReset NO
+#endif
+#if CC_DictionaryAttackLockReset == YES
+#define TPM_CC_DictionaryAttackLockReset (TPM_CC)(0x00000139)
+#endif
+#ifndef CC_DictionaryAttackParameters
+# define CC_DictionaryAttackParameters NO
+#endif
+#if CC_DictionaryAttackParameters == YES
+#define TPM_CC_DictionaryAttackParameters (TPM_CC)(0x0000013a)
+#endif
+#ifndef CC_NV_ChangeAuth
+# define CC_NV_ChangeAuth NO
+#endif
+#if CC_NV_ChangeAuth == YES
+#define TPM_CC_NV_ChangeAuth (TPM_CC)(0x0000013b)
+#endif
+#ifndef CC_PCR_Event
+# define CC_PCR_Event NO
+#endif
+#if CC_PCR_Event == YES
+#define TPM_CC_PCR_Event (TPM_CC)(0x0000013c)
+#endif
+#ifndef CC_PCR_Reset
+# define CC_PCR_Reset NO
+#endif
+#if CC_PCR_Reset == YES
+#define TPM_CC_PCR_Reset (TPM_CC)(0x0000013d)
+#endif
+#ifndef CC_SequenceComplete
+# define CC_SequenceComplete NO
+#endif
+#if CC_SequenceComplete == YES
+#define TPM_CC_SequenceComplete (TPM_CC)(0x0000013e)
+#endif
+#ifndef CC_SetAlgorithmSet
+# define CC_SetAlgorithmSet NO
+#endif
+#if CC_SetAlgorithmSet == YES
+#define TPM_CC_SetAlgorithmSet (TPM_CC)(0x0000013f)
+#endif
+#ifndef CC_SetCommandCodeAuditStatus
+# define CC_SetCommandCodeAuditStatus NO
+#endif
+#if CC_SetCommandCodeAuditStatus == YES
+#define TPM_CC_SetCommandCodeAuditStatus (TPM_CC)(0x00000140)
+#endif
+#ifndef CC_FieldUpgradeData
+# define CC_FieldUpgradeData NO
+#endif
+#if CC_FieldUpgradeData == YES
+#define TPM_CC_FieldUpgradeData (TPM_CC)(0x00000141)
+#endif
+#ifndef CC_IncrementalSelfTest
+# define CC_IncrementalSelfTest NO
+#endif
+#if CC_IncrementalSelfTest == YES
+#define TPM_CC_IncrementalSelfTest (TPM_CC)(0x00000142)
+#endif
+#ifndef CC_SelfTest
+# define CC_SelfTest NO
+#endif
+#if CC_SelfTest == YES
+#define TPM_CC_SelfTest (TPM_CC)(0x00000143)
+#endif
+#ifndef CC_Startup
+# define CC_Startup NO
+#endif
+#if CC_Startup == YES
+#define TPM_CC_Startup (TPM_CC)(0x00000144)
+#endif
+#ifndef CC_Shutdown
+# define CC_Shutdown NO
+#endif
+#if CC_Shutdown == YES
+#define TPM_CC_Shutdown (TPM_CC)(0x00000145)
+#endif
+#ifndef CC_StirRandom
+# define CC_StirRandom NO
+#endif
+#if CC_StirRandom == YES
+#define TPM_CC_StirRandom (TPM_CC)(0x00000146)
+#endif
+#ifndef CC_ActivateCredential
+# define CC_ActivateCredential NO
+#endif
+#if CC_ActivateCredential == YES
+#define TPM_CC_ActivateCredential (TPM_CC)(0x00000147)
+#endif
+#ifndef CC_Certify
+# define CC_Certify NO
+#endif
+#if CC_Certify == YES
+#define TPM_CC_Certify (TPM_CC)(0x00000148)
+#endif
+#ifndef CC_PolicyNV
+# define CC_PolicyNV NO
+#endif
+#if CC_PolicyNV == YES
+#define TPM_CC_PolicyNV (TPM_CC)(0x00000149)
+#endif
+#ifndef CC_CertifyCreation
+# define CC_CertifyCreation NO
+#endif
+#if CC_CertifyCreation == YES
+#define TPM_CC_CertifyCreation (TPM_CC)(0x0000014a)
+#endif
+#ifndef CC_Duplicate
+# define CC_Duplicate NO
+#endif
+#if CC_Duplicate == YES
+#define TPM_CC_Duplicate (TPM_CC)(0x0000014b)
+#endif
+#ifndef CC_GetTime
+# define CC_GetTime NO
+#endif
+#if CC_GetTime == YES
+#define TPM_CC_GetTime (TPM_CC)(0x0000014c)
+#endif
+#ifndef CC_GetSessionAuditDigest
+# define CC_GetSessionAuditDigest NO
+#endif
+#if CC_GetSessionAuditDigest == YES
+#define TPM_CC_GetSessionAuditDigest (TPM_CC)(0x0000014d)
+#endif
+#ifndef CC_NV_Read
+# define CC_NV_Read NO
+#endif
+#if CC_NV_Read == YES
+#define TPM_CC_NV_Read (TPM_CC)(0x0000014e)
+#endif
+#ifndef CC_NV_ReadLock
+# define CC_NV_ReadLock NO
+#endif
+#if CC_NV_ReadLock == YES
+#define TPM_CC_NV_ReadLock (TPM_CC)(0x0000014f)
+#endif
+#ifndef CC_ObjectChangeAuth
+# define CC_ObjectChangeAuth NO
+#endif
+#if CC_ObjectChangeAuth == YES
+#define TPM_CC_ObjectChangeAuth (TPM_CC)(0x00000150)
+#endif
+#ifndef CC_PolicySecret
+# define CC_PolicySecret NO
+#endif
+#if CC_PolicySecret == YES
+#define TPM_CC_PolicySecret (TPM_CC)(0x00000151)
+#endif
+#ifndef CC_Rewrap
+# define CC_Rewrap NO
+#endif
+#if CC_Rewrap == YES
+#define TPM_CC_Rewrap (TPM_CC)(0x00000152)
+#endif
+#ifndef CC_Create
+# define CC_Create NO
+#endif
+#if CC_Create == YES
+#define TPM_CC_Create (TPM_CC)(0x00000153)
+#endif
+#ifndef CC_ECDH_ZGen
+# define CC_ECDH_ZGen NO
+#endif
+#if CC_ECDH_ZGen == YES
+#define TPM_CC_ECDH_ZGen (TPM_CC)(0x00000154)
+#endif
+#ifndef CC_HMAC
+# define CC_HMAC NO
+#endif
+#if CC_HMAC == YES
+#define TPM_CC_HMAC (TPM_CC)(0x00000155)
+#endif
+#ifndef CC_Import
+# define CC_Import NO
+#endif
+#if CC_Import == YES
+#define TPM_CC_Import (TPM_CC)(0x00000156)
+#endif
+#ifndef CC_Load
+# define CC_Load NO
+#endif
+#if CC_Load == YES
+#define TPM_CC_Load (TPM_CC)(0x00000157)
+#endif
+#ifndef CC_Quote
+# define CC_Quote NO
+#endif
+#if CC_Quote == YES
+#define TPM_CC_Quote (TPM_CC)(0x00000158)
+#endif
+#ifndef CC_RSA_Decrypt
+# define CC_RSA_Decrypt NO
+#endif
+#if CC_RSA_Decrypt == YES
+#define TPM_CC_RSA_Decrypt (TPM_CC)(0x00000159)
+#endif
+#ifndef CC_HMAC_Start
+# define CC_HMAC_Start NO
+#endif
+#if CC_HMAC_Start == YES
+#define TPM_CC_HMAC_Start (TPM_CC)(0x0000015b)
+#endif
+#ifndef CC_SequenceUpdate
+# define CC_SequenceUpdate NO
+#endif
+#if CC_SequenceUpdate == YES
+#define TPM_CC_SequenceUpdate (TPM_CC)(0x0000015c)
+#endif
+#ifndef CC_Sign
+# define CC_Sign NO
+#endif
+#if CC_Sign == YES
+#define TPM_CC_Sign (TPM_CC)(0x0000015d)
+#endif
+#ifndef CC_Unseal
+# define CC_Unseal NO
+#endif
+#if CC_Unseal == YES
+#define TPM_CC_Unseal (TPM_CC)(0x0000015e)
+#endif
+#ifndef CC_PolicySigned
+# define CC_PolicySigned NO
+#endif
+#if CC_PolicySigned == YES
+#define TPM_CC_PolicySigned (TPM_CC)(0x00000160)
+#endif
+#ifndef CC_ContextLoad
+# define CC_ContextLoad NO
+#endif
+#if CC_ContextLoad == YES
+#define TPM_CC_ContextLoad (TPM_CC)(0x00000161)
+#endif
+#ifndef CC_ContextSave
+# define CC_ContextSave NO
+#endif
+#if CC_ContextSave == YES
+#define TPM_CC_ContextSave (TPM_CC)(0x00000162)
+#endif
+#ifndef CC_ECDH_KeyGen
+# define CC_ECDH_KeyGen NO
+#endif
+#if CC_ECDH_KeyGen == YES
+#define TPM_CC_ECDH_KeyGen (TPM_CC)(0x00000163)
+#endif
+#ifndef CC_EncryptDecrypt
+# define CC_EncryptDecrypt NO
+#endif
+#if CC_EncryptDecrypt == YES
+#define TPM_CC_EncryptDecrypt (TPM_CC)(0x00000164)
+#endif
+#ifndef CC_FlushContext
+# define CC_FlushContext NO
+#endif
+#if CC_FlushContext == YES
+#define TPM_CC_FlushContext (TPM_CC)(0x00000165)
+#endif
+#ifndef CC_LoadExternal
+# define CC_LoadExternal NO
+#endif
+#if CC_LoadExternal == YES
+#define TPM_CC_LoadExternal (TPM_CC)(0x00000167)
+#endif
+#ifndef CC_MakeCredential
+# define CC_MakeCredential NO
+#endif
+#if CC_MakeCredential == YES
+#define TPM_CC_MakeCredential (TPM_CC)(0x00000168)
+#endif
+#ifndef CC_NV_ReadPublic
+# define CC_NV_ReadPublic NO
+#endif
+#if CC_NV_ReadPublic == YES
+#define TPM_CC_NV_ReadPublic (TPM_CC)(0x00000169)
+#endif
+#ifndef CC_PolicyAuthorize
+# define CC_PolicyAuthorize NO
+#endif
+#if CC_PolicyAuthorize == YES
+#define TPM_CC_PolicyAuthorize (TPM_CC)(0x0000016a)
+#endif
+#ifndef CC_PolicyAuthValue
+# define CC_PolicyAuthValue NO
+#endif
+#if CC_PolicyAuthValue == YES
+#define TPM_CC_PolicyAuthValue (TPM_CC)(0x0000016b)
+#endif
+#ifndef CC_PolicyCommandCode
+# define CC_PolicyCommandCode NO
+#endif
+#if CC_PolicyCommandCode == YES
+#define TPM_CC_PolicyCommandCode (TPM_CC)(0x0000016c)
+#endif
+#ifndef CC_PolicyCounterTimer
+# define CC_PolicyCounterTimer NO
+#endif
+#if CC_PolicyCounterTimer == YES
+#define TPM_CC_PolicyCounterTimer (TPM_CC)(0x0000016d)
+#endif
+#ifndef CC_PolicyCpHash
+# define CC_PolicyCpHash NO
+#endif
+#if CC_PolicyCpHash == YES
+#define TPM_CC_PolicyCpHash (TPM_CC)(0x0000016e)
+#endif
+#ifndef CC_PolicyLocality
+# define CC_PolicyLocality NO
+#endif
+#if CC_PolicyLocality == YES
+#define TPM_CC_PolicyLocality (TPM_CC)(0x0000016f)
+#endif
+#ifndef CC_PolicyNameHash
+# define CC_PolicyNameHash NO
+#endif
+#if CC_PolicyNameHash == YES
+#define TPM_CC_PolicyNameHash (TPM_CC)(0x00000170)
+#endif
+#ifndef CC_PolicyOR
+# define CC_PolicyOR NO
+#endif
+#if CC_PolicyOR == YES
+#define TPM_CC_PolicyOR (TPM_CC)(0x00000171)
+#endif
+#ifndef CC_PolicyTicket
+# define CC_PolicyTicket NO
+#endif
+#if CC_PolicyTicket == YES
+#define TPM_CC_PolicyTicket (TPM_CC)(0x00000172)
+#endif
+#ifndef CC_ReadPublic
+# define CC_ReadPublic NO
+#endif
+#if CC_ReadPublic == YES
+#define TPM_CC_ReadPublic (TPM_CC)(0x00000173)
+#endif
+#ifndef CC_RSA_Encrypt
+# define CC_RSA_Encrypt NO
+#endif
+#if CC_RSA_Encrypt == YES
+#define TPM_CC_RSA_Encrypt (TPM_CC)(0x00000174)
+#endif
+#ifndef CC_StartAuthSession
+# define CC_StartAuthSession NO
+#endif
+#if CC_StartAuthSession == YES
+#define TPM_CC_StartAuthSession (TPM_CC)(0x00000176)
+#endif
+#ifndef CC_VerifySignature
+# define CC_VerifySignature NO
+#endif
+#if CC_VerifySignature == YES
+#define TPM_CC_VerifySignature (TPM_CC)(0x00000177)
+#endif
+#ifndef CC_ECC_Parameters
+# define CC_ECC_Parameters NO
+#endif
+#if CC_ECC_Parameters == YES
+#define TPM_CC_ECC_Parameters (TPM_CC)(0x00000178)
+#endif
+#ifndef CC_FirmwareRead
+# define CC_FirmwareRead NO
+#endif
+#if CC_FirmwareRead == YES
+#define TPM_CC_FirmwareRead (TPM_CC)(0x00000179)
+#endif
+#ifndef CC_GetCapability
+# define CC_GetCapability NO
+#endif
+#if CC_GetCapability == YES
+#define TPM_CC_GetCapability (TPM_CC)(0x0000017a)
+#endif
+#ifndef CC_GetRandom
+# define CC_GetRandom NO
+#endif
+#if CC_GetRandom == YES
+#define TPM_CC_GetRandom (TPM_CC)(0x0000017b)
+#endif
+#ifndef CC_GetTestResult
+# define CC_GetTestResult NO
+#endif
+#if CC_GetTestResult == YES
+#define TPM_CC_GetTestResult (TPM_CC)(0x0000017c)
+#endif
+#ifndef CC_Hash
+# define CC_Hash NO
+#endif
+#if CC_Hash == YES
+#define TPM_CC_Hash (TPM_CC)(0x0000017d)
+#endif
+#ifndef CC_PCR_Read
+# define CC_PCR_Read NO
+#endif
+#if CC_PCR_Read == YES
+#define TPM_CC_PCR_Read (TPM_CC)(0x0000017e)
+#endif
+#ifndef CC_PolicyPCR
+# define CC_PolicyPCR NO
+#endif
+#if CC_PolicyPCR == YES
+#define TPM_CC_PolicyPCR (TPM_CC)(0x0000017f)
+#endif
+#ifndef CC_PolicyRestart
+# define CC_PolicyRestart NO
+#endif
+#if CC_PolicyRestart == YES
+#define TPM_CC_PolicyRestart (TPM_CC)(0x00000180)
+#endif
+#ifndef CC_ReadClock
+# define CC_ReadClock NO
+#endif
+#if CC_ReadClock == YES
+#define TPM_CC_ReadClock (TPM_CC)(0x00000181)
+#endif
+#ifndef CC_PCR_Extend
+# define CC_PCR_Extend NO
+#endif
+#if CC_PCR_Extend == YES
+#define TPM_CC_PCR_Extend (TPM_CC)(0x00000182)
+#endif
+#ifndef CC_PCR_SetAuthValue
+# define CC_PCR_SetAuthValue NO
+#endif
+#if CC_PCR_SetAuthValue == YES
+#define TPM_CC_PCR_SetAuthValue (TPM_CC)(0x00000183)
+#endif
+#ifndef CC_NV_Certify
+# define CC_NV_Certify NO
+#endif
+#if CC_NV_Certify == YES
+#define TPM_CC_NV_Certify (TPM_CC)(0x00000184)
+#endif
+#ifndef CC_EventSequenceComplete
+# define CC_EventSequenceComplete NO
+#endif
+#if CC_EventSequenceComplete == YES
+#define TPM_CC_EventSequenceComplete (TPM_CC)(0x00000185)
+#endif
+#ifndef CC_HashSequenceStart
+# define CC_HashSequenceStart NO
+#endif
+#if CC_HashSequenceStart == YES
+#define TPM_CC_HashSequenceStart (TPM_CC)(0x00000186)
+#endif
+#ifndef CC_PolicyPhysicalPresence
+# define CC_PolicyPhysicalPresence NO
+#endif
+#if CC_PolicyPhysicalPresence == YES
+#define TPM_CC_PolicyPhysicalPresence (TPM_CC)(0x00000187)
+#endif
+#ifndef CC_PolicyDuplicationSelect
+# define CC_PolicyDuplicationSelect NO
+#endif
+#if CC_PolicyDuplicationSelect == YES
+#define TPM_CC_PolicyDuplicationSelect (TPM_CC)(0x00000188)
+#endif
+#ifndef CC_PolicyGetDigest
+# define CC_PolicyGetDigest NO
+#endif
+#if CC_PolicyGetDigest == YES
+#define TPM_CC_PolicyGetDigest (TPM_CC)(0x00000189)
+#endif
+#ifndef CC_TestParms
+# define CC_TestParms NO
+#endif
+#if CC_TestParms == YES
+#define TPM_CC_TestParms (TPM_CC)(0x0000018a)
+#endif
+#ifndef CC_Commit
+# define CC_Commit NO
+#endif
+#if CC_Commit == YES
+#define TPM_CC_Commit (TPM_CC)(0x0000018b)
+#endif
+#ifndef CC_PolicyPassword
+# define CC_PolicyPassword NO
+#endif
+#if CC_PolicyPassword == YES
+#define TPM_CC_PolicyPassword (TPM_CC)(0x0000018c)
+#endif
+#ifndef CC_ZGen_2Phase
+# define CC_ZGen_2Phase NO
+#endif
+#if CC_ZGen_2Phase == YES
+#define TPM_CC_ZGen_2Phase (TPM_CC)(0x0000018d)
+#endif
+#ifndef CC_EC_Ephemeral
+# define CC_EC_Ephemeral NO
+#endif
+#if CC_EC_Ephemeral == YES
+#define TPM_CC_EC_Ephemeral (TPM_CC)(0x0000018e)
+#endif
+#ifndef CC_PolicyNvWritten
+# define CC_PolicyNvWritten NO
+#endif
+#if CC_PolicyNvWritten == YES
+#define TPM_CC_PolicyNvWritten (TPM_CC)(0x0000018f)
+#endif
+#ifndef CC_PolicyTemplate
+# define CC_PolicyTemplate NO
+#endif
+#if CC_PolicyTemplate == YES
+#define TPM_CC_PolicyTemplate (TPM_CC)(0x00000190)
+#endif
+#ifndef CC_CreateLoaded
+# define CC_CreateLoaded NO
+#endif
+#if CC_CreateLoaded == YES
+#define TPM_CC_CreateLoaded (TPM_CC)(0x00000191)
+#endif
+#ifndef CC_PolicyAuthorizeNV
+# define CC_PolicyAuthorizeNV NO
+#endif
+#if CC_PolicyAuthorizeNV == YES
+#define TPM_CC_PolicyAuthorizeNV (TPM_CC)(0x00000192)
+#endif
+#ifndef CC_EncryptDecrypt2
+# define CC_EncryptDecrypt2 NO
+#endif
+#if CC_EncryptDecrypt2 == YES
+#define TPM_CC_EncryptDecrypt2 (TPM_CC)(0x00000193)
+#endif
+#define TPM_CC_AC_GetCapability (TPM_CC)(0x00000194)
+#define TPM_CC_AC_Send (TPM_CC)(0x00000195)
+#define TPM_CC_Policy_AC_SendSelect (TPM_CC)(0x00000196)
+#ifndef CC_CertifyX509
+# define CC_CertifyX509 NO
+#endif
+#if CC_CertifyX509 == YES
+#define TPM_CC_CertifyX509 (TPM_CC)(0x00000197)
+#endif
+
+/* Compile variable. May increase based on implementation. */
+#define TPM_CC_LAST (TPM_CC)(0x00000197)
+
+#ifndef CC_Vendor_TCG_Test
+# define CC_Vendor_TCG_Test NO
+#endif
+#if CC_Vendor_TCG_Test == YES
+#define TPM_CC_Vendor_TCG_Test (TPM_CC)(0x20000000)
+#endif
+
+#ifndef CC_NTC2_PreConfig
+# define CC_NTC2_PreConfig NO
+#endif
+#if CC_NTC2_PreConfig == YES
+#define NTC2_CC_PreConfig (TPM_CC)(0x20000211)
+#endif
+#ifndef CC_NTC2_LockPreConfig
+# define CC_NTC2_LockPreConfig NO
+#endif
+#if CC_NTC2_LockPreConfig == YES
+#define NTC2_CC_LockPreConfig (TPM_CC)(0x20000212)
+#endif
+#ifndef CC_NTC2_GetConfig
+# define CC_NTC2_GetConfig NO
+#endif
+#if CC_NTC2_GetConfig == YES
+#define NTC2_CC_GetConfig (TPM_CC)(0x20000213)
+#endif
+
+#ifndef COMPRESSED_LISTS
+#define ADD_FILL 1
+#else
+#define ADD_FILL 0
+#endif
+
+// Size the array of library commands based on whether or not the array is packed (only defined
+// commands) or dense (having entries for unimplemented commands)
+
+#define LIBRARY_COMMAND_ARRAY_SIZE (0 \
+ + (ADD_FILL || CC_NV_UndefineSpaceSpecial) /* 0x0000011f */ \
+ + (ADD_FILL || CC_EvictControl) /* 0x00000120 */ \
+ + (ADD_FILL || CC_HierarchyControl) /* 0x00000121 */ \
+ + (ADD_FILL || CC_NV_UndefineSpace) /* 0x00000122 */ \
+ + ADD_FILL /* 0x00000123 */ \
+ + (ADD_FILL || CC_ChangeEPS) /* 0x00000124 */ \
+ + (ADD_FILL || CC_ChangePPS) /* 0x00000125 */ \
+ + (ADD_FILL || CC_Clear) /* 0x00000126 */ \
+ + (ADD_FILL || CC_ClearControl) /* 0x00000127 */ \
+ + (ADD_FILL || CC_ClockSet) /* 0x00000128 */ \
+ + (ADD_FILL || CC_HierarchyChangeAuth) /* 0x00000129 */ \
+ + (ADD_FILL || CC_NV_DefineSpace) /* 0x0000012a */ \
+ + (ADD_FILL || CC_PCR_Allocate) /* 0x0000012b */ \
+ + (ADD_FILL || CC_PCR_SetAuthPolicy) /* 0x0000012c */ \
+ + (ADD_FILL || CC_PP_Commands) /* 0x0000012d */ \
+ + (ADD_FILL || CC_SetPrimaryPolicy) /* 0x0000012e */ \
+ + (ADD_FILL || CC_FieldUpgradeStart) /* 0x0000012f */ \
+ + (ADD_FILL || CC_ClockRateAdjust) /* 0x00000130 */ \
+ + (ADD_FILL || CC_CreatePrimary) /* 0x00000131 */ \
+ + (ADD_FILL || CC_NV_GlobalWriteLock) /* 0x00000132 */ \
+ + (ADD_FILL || CC_GetCommandAuditDigest) /* 0x00000133 */ \
+ + (ADD_FILL || CC_NV_Increment) /* 0x00000134 */ \
+ + (ADD_FILL || CC_NV_SetBits) /* 0x00000135 */ \
+ + (ADD_FILL || CC_NV_Extend) /* 0x00000136 */ \
+ + (ADD_FILL || CC_NV_Write) /* 0x00000137 */ \
+ + (ADD_FILL || CC_NV_WriteLock) /* 0x00000138 */ \
+ + (ADD_FILL || CC_DictionaryAttackLockReset) /* 0x00000139 */ \
+ + (ADD_FILL || CC_DictionaryAttackParameters) /* 0x0000013a */ \
+ + (ADD_FILL || CC_NV_ChangeAuth) /* 0x0000013b */ \
+ + (ADD_FILL || CC_PCR_Event) /* 0x0000013c */ \
+ + (ADD_FILL || CC_PCR_Reset) /* 0x0000013d */ \
+ + (ADD_FILL || CC_SequenceComplete) /* 0x0000013e */ \
+ + (ADD_FILL || CC_SetAlgorithmSet) /* 0x0000013f */ \
+ + (ADD_FILL || CC_SetCommandCodeAuditStatus) /* 0x00000140 */ \
+ + (ADD_FILL || CC_FieldUpgradeData) /* 0x00000141 */ \
+ + (ADD_FILL || CC_IncrementalSelfTest) /* 0x00000142 */ \
+ + (ADD_FILL || CC_SelfTest) /* 0x00000143 */ \
+ + (ADD_FILL || CC_Startup) /* 0x00000144 */ \
+ + (ADD_FILL || CC_Shutdown) /* 0x00000145 */ \
+ + (ADD_FILL || CC_StirRandom) /* 0x00000146 */ \
+ + (ADD_FILL || CC_ActivateCredential) /* 0x00000147 */ \
+ + (ADD_FILL || CC_Certify) /* 0x00000148 */ \
+ + (ADD_FILL || CC_PolicyNV) /* 0x00000149 */ \
+ + (ADD_FILL || CC_CertifyCreation) /* 0x0000014a */ \
+ + (ADD_FILL || CC_Duplicate) /* 0x0000014b */ \
+ + (ADD_FILL || CC_GetTime) /* 0x0000014c */ \
+ + (ADD_FILL || CC_GetSessionAuditDigest) /* 0x0000014d */ \
+ + (ADD_FILL || CC_NV_Read) /* 0x0000014e */ \
+ + (ADD_FILL || CC_NV_ReadLock) /* 0x0000014f */ \
+ + (ADD_FILL || CC_ObjectChangeAuth) /* 0x00000150 */ \
+ + (ADD_FILL || CC_PolicySecret) /* 0x00000151 */ \
+ + (ADD_FILL || CC_Rewrap) /* 0x00000152 */ \
+ + (ADD_FILL || CC_Create) /* 0x00000153 */ \
+ + (ADD_FILL || CC_ECDH_ZGen) /* 0x00000154 */ \
+ + (ADD_FILL || CC_HMAC) /* 0x00000155 */ \
+ + (ADD_FILL || CC_Import) /* 0x00000156 */ \
+ + (ADD_FILL || CC_Load) /* 0x00000157 */ \
+ + (ADD_FILL || CC_Quote) /* 0x00000158 */ \
+ + (ADD_FILL || CC_RSA_Decrypt) /* 0x00000159 */ \
+ + ADD_FILL /* 0x0000015a */ \
+ + (ADD_FILL || CC_HMAC_Start) /* 0x0000015b */ \
+ + (ADD_FILL || CC_SequenceUpdate) /* 0x0000015c */ \
+ + (ADD_FILL || CC_Sign) /* 0x0000015d */ \
+ + (ADD_FILL || CC_Unseal) /* 0x0000015e */ \
+ + ADD_FILL /* 0x0000015f */ \
+ + (ADD_FILL || CC_PolicySigned) /* 0x00000160 */ \
+ + (ADD_FILL || CC_ContextLoad) /* 0x00000161 */ \
+ + (ADD_FILL || CC_ContextSave) /* 0x00000162 */ \
+ + (ADD_FILL || CC_ECDH_KeyGen) /* 0x00000163 */ \
+ + (ADD_FILL || CC_EncryptDecrypt) /* 0x00000164 */ \
+ + (ADD_FILL || CC_FlushContext) /* 0x00000165 */ \
+ + ADD_FILL /* 0x00000166 */ \
+ + (ADD_FILL || CC_LoadExternal) /* 0x00000167 */ \
+ + (ADD_FILL || CC_MakeCredential) /* 0x00000168 */ \
+ + (ADD_FILL || CC_NV_ReadPublic) /* 0x00000169 */ \
+ + (ADD_FILL || CC_PolicyAuthorize) /* 0x0000016a */ \
+ + (ADD_FILL || CC_PolicyAuthValue) /* 0x0000016b */ \
+ + (ADD_FILL || CC_PolicyCommandCode) /* 0x0000016c */ \
+ + (ADD_FILL || CC_PolicyCounterTimer) /* 0x0000016d */ \
+ + (ADD_FILL || CC_PolicyCpHash) /* 0x0000016e */ \
+ + (ADD_FILL || CC_PolicyLocality) /* 0x0000016f */ \
+ + (ADD_FILL || CC_PolicyNameHash) /* 0x00000170 */ \
+ + (ADD_FILL || CC_PolicyOR) /* 0x00000171 */ \
+ + (ADD_FILL || CC_PolicyTicket) /* 0x00000172 */ \
+ + (ADD_FILL || CC_ReadPublic) /* 0x00000173 */ \
+ + (ADD_FILL || CC_RSA_Encrypt) /* 0x00000174 */ \
+ + ADD_FILL /* 0x00000175 */ \
+ + (ADD_FILL || CC_StartAuthSession) /* 0x00000176 */ \
+ + (ADD_FILL || CC_VerifySignature) /* 0x00000177 */ \
+ + (ADD_FILL || CC_ECC_Parameters) /* 0x00000178 */ \
+ + (ADD_FILL || CC_FirmwareRead) /* 0x00000179 */ \
+ + (ADD_FILL || CC_GetCapability) /* 0x0000017a */ \
+ + (ADD_FILL || CC_GetRandom) /* 0x0000017b */ \
+ + (ADD_FILL || CC_GetTestResult) /* 0x0000017c */ \
+ + (ADD_FILL || CC_Hash) /* 0x0000017d */ \
+ + (ADD_FILL || CC_PCR_Read) /* 0x0000017e */ \
+ + (ADD_FILL || CC_PolicyPCR) /* 0x0000017f */ \
+ + (ADD_FILL || CC_PolicyRestart) /* 0x00000180 */ \
+ + (ADD_FILL || CC_ReadClock) /* 0x00000181 */ \
+ + (ADD_FILL || CC_PCR_Extend) /* 0x00000182 */ \
+ + (ADD_FILL || CC_PCR_SetAuthValue) /* 0x00000183 */ \
+ + (ADD_FILL || CC_NV_Certify) /* 0x00000184 */ \
+ + (ADD_FILL || CC_EventSequenceComplete) /* 0x00000185 */ \
+ + (ADD_FILL || CC_HashSequenceStart) /* 0x00000186 */ \
+ + (ADD_FILL || CC_PolicyPhysicalPresence) /* 0x00000187 */ \
+ + (ADD_FILL || CC_PolicyDuplicationSelect) /* 0x00000188 */ \
+ + (ADD_FILL || CC_PolicyGetDigest) /* 0x00000189 */ \
+ + (ADD_FILL || CC_TestParms) /* 0x0000018a */ \
+ + (ADD_FILL || CC_Commit) /* 0x0000018b */ \
+ + (ADD_FILL || CC_PolicyPassword) /* 0x0000018c */ \
+ + (ADD_FILL || CC_ZGen_2Phase) /* 0x0000018d */ \
+ + (ADD_FILL || CC_EC_Ephemeral) /* 0x0000018e */ \
+ + (ADD_FILL || CC_PolicyTemplate) /* 0x00000190 */ \
+ + (ADD_FILL || CC_CreateLoaded) /* 0x00000191 */ \
+ + (ADD_FILL || CC_PolicyAuthorizeNV) /* 0x00000192 */ \
+ + (ADD_FILL || CC_EncryptDecrypt2) /* 0x00000193 */ \
+ + (ADD_FILL || CC_PolicyNvWritten) /* 0x0000018f */ \
+ + (ADD_FILL || CC_CertifyX509) /* 0x00000197 */ \
+ )
+#define VENDOR_COMMAND_ARRAY_SIZE ( 0 \
+ + CC_Vendor_TCG_Test \
+ + CC_NTC2_PreConfig \
+ + CC_NTC2_LockPreConfig \
+ + CC_NTC2_GetConfig \
+ )
+
+#define COMMAND_COUNT \
+ (LIBRARY_COMMAND_ARRAY_SIZE + VENDOR_COMMAND_ARRAY_SIZE)
+
+// Following typedef is for some old code
+
+#ifndef ALG_CAMELLIA
+# define ALG_CAMELLIA NO
+#endif
+
+#ifndef ALG_SM4
+# define ALG_SM4 NO
+#endif
+
+#ifndef ALG_AES
+# define ALG_AES NO
+#endif
+
+#endif // _IMPLEMENTATION_H_
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Import_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Import_fp.h
new file mode 100644
index 000000000..ac46b0b29
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Import_fp.h
@@ -0,0 +1,93 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Import_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef IMPORT_FP_H
+#define IMPORT_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT parentHandle;
+ TPM2B_DATA encryptionKey;
+ TPM2B_PUBLIC objectPublic;
+ TPM2B_PRIVATE duplicate;
+ TPM2B_ENCRYPTED_SECRET inSymSeed;
+ TPMT_SYM_DEF_OBJECT symmetricAlg;
+} Import_In;
+
+#define RC_Import_parentHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Import_encryptionKey (TPM_RC_P + TPM_RC_1)
+#define RC_Import_objectPublic (TPM_RC_P + TPM_RC_2)
+#define RC_Import_duplicate (TPM_RC_P + TPM_RC_3)
+#define RC_Import_inSymSeed (TPM_RC_P + TPM_RC_4)
+#define RC_Import_symmetricAlg (TPM_RC_P + TPM_RC_5)
+
+typedef struct {
+ TPM2B_PRIVATE outPrivate;
+} Import_Out;
+
+TPM_RC
+TPM2_Import(
+ Import_In *in, // IN: input parameter list
+ Import_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/IncrementalSelfTest_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/IncrementalSelfTest_fp.h
new file mode 100644
index 000000000..93275a4bc
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/IncrementalSelfTest_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: IncrementalSelfTest_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef INCREMENTALSELFTEST_FP_H
+#define INCREMENTALSELFTEST_FP_H
+
+typedef struct{
+ TPML_ALG toTest;
+} IncrementalSelfTest_In;
+
+typedef struct{
+ TPML_ALG toDoList;
+} IncrementalSelfTest_Out;
+
+#define RC_IncrementalSelfTest_toTest (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_IncrementalSelfTest(
+ IncrementalSelfTest_In *in, // IN: input parameter list
+ IncrementalSelfTest_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadExternal_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadExternal_fp.h
new file mode 100644
index 000000000..bbf9f8e2d
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadExternal_fp.h
@@ -0,0 +1,87 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: LoadExternal_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef LOADEXTERNAL_FP_H
+#define LOADEXTERNAL_FP_H
+
+typedef struct {
+ TPM2B_SENSITIVE inPrivate;
+ TPM2B_PUBLIC inPublic;
+ TPMI_RH_HIERARCHY hierarchy;
+} LoadExternal_In;
+
+#define RC_LoadExternal_inPrivate (TPM_RC_P + TPM_RC_1)
+#define RC_LoadExternal_inPublic (TPM_RC_P + TPM_RC_2)
+#define RC_LoadExternal_hierarchy (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM_HANDLE objectHandle;
+ TPM2B_NAME name;
+} LoadExternal_Out;
+
+TPM_RC
+TPM2_LoadExternal(
+ LoadExternal_In *in, // IN: input parameter list
+ LoadExternal_Out *out // OUT: output parameter list
+ );
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadKey2_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadKey2_fp.h
new file mode 100644
index 000000000..f8f9fad7e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/LoadKey2_fp.h
@@ -0,0 +1,66 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Load Key 2 */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: LoadKey2_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef LOADKEY2_FP_H
+#define LOADKEY2_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_KEY_HANDLE parentHandle;
+ TPM_KEY12 inKey;
+} LoadKey2_In;
+
+#define RC_LoadKey2_parentHandle (TPM_RC_H + TPM_RC_1)
+#define RC_LoadKey2_inKey (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM_KEY_HANDLE inkeyHandle;
+} LoadKey2_Out;
+
+TPM_RC
+TPM2_Loadkey2(
+ LoadKey2_In *in, // IN: input parameter buffer
+ LoadKey2_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Load_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Load_fp.h
new file mode 100644
index 000000000..20a7232e4
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Load_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Load_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef LOAD_FP_H
+#define LOAD_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT parentHandle;
+ TPM2B_PRIVATE inPrivate;
+ TPM2B_PUBLIC inPublic;
+} Load_In;
+
+#define RC_Load_parentHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Load_inPrivate (TPM_RC_P + TPM_RC_1)
+#define RC_Load_inPublic (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM_HANDLE objectHandle;
+ TPM2B_NAME name;
+} Load_Out;
+
+TPM_RC
+TPM2_Load(
+ Load_In *in, // IN: input parameter list
+ Load_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeCredential_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeCredential_fp.h
new file mode 100644
index 000000000..d6e5fb3ac
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeCredential_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: MakeCredential_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef MAKECREDENTIAL_FP_H
+#define MAKECREDENTIAL_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT handle;
+ TPM2B_DIGEST credential;
+ TPM2B_NAME objectName;
+} MakeCredential_In;
+
+#define RC_MakeCredential_handle (TPM_RC_H + TPM_RC_1)
+#define RC_MakeCredential_credential (TPM_RC_P + TPM_RC_1)
+#define RC_MakeCredential_objectName (TPM_RC_P + TPM_RC_2)
+
+
+typedef struct {
+ TPM2B_ID_OBJECT credentialBlob;
+ TPM2B_ENCRYPTED_SECRET secret;
+} MakeCredential_Out;
+
+TPM_RC
+TPM2_MakeCredential(
+ MakeCredential_In *in, // IN: input parameter list
+ MakeCredential_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeIdentity_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeIdentity_fp.h
new file mode 100644
index 000000000..19dc3d45f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/MakeIdentity_fp.h
@@ -0,0 +1,66 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 MakeIdentity */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: MakeIdentity_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef MAKEIDENTITY_FP_H
+#define MAKEIDENTITY_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_ENCAUTH identityAuth;
+ TPM_CHOSENID_HASH labelPrivCADigest;
+ TPM_KEY12 idKeyParams;
+} MakeIdentity_In;
+
+typedef struct {
+ TPM_KEY12 idKey;
+ UINT32 identityBindingSize;
+ BYTE identityBinding[MAX_RSA_KEY_BYTES];
+} MakeIdentity_Out;
+
+TPM_RC
+TPM2_MakeIdentity(
+ MakeIdentity_In *in, // IN: input parameter buffer
+ MakeIdentity_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NTC_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NTC_fp.h
new file mode 100644
index 000000000..7cf353b53
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NTC_fp.h
@@ -0,0 +1,52 @@
+/********************************************************************************/
+/* */
+/* Nuvoton Commands */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2017 */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef NTC_FP_H
+#define NTC_FP_H
+
+typedef struct {
+ NTC2_CFG_STRUCT preConfig;
+} NTC2_PreConfig_In;
+
+typedef struct {
+ NTC2_CFG_STRUCT preConfig;
+} NTC2_GetConfig_Out;
+
+#define RC_NTC2_PreConfig_preConfig (TPM_RC_P + TPM_RC_1)
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Certify_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Certify_fp.h
new file mode 100644
index 000000000..d5f2913f2
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Certify_fp.h
@@ -0,0 +1,98 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_Certify_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_CERTIFY_FP_H
+#define NV_CERTIFY_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT signHandle;
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ TPM2B_DATA qualifyingData;
+ TPMT_SIG_SCHEME inScheme;
+ UINT16 size;
+ UINT16 offset;
+} NV_Certify_In;
+
+#define RC_NV_Certify_signHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_Certify_authHandle (TPM_RC_H + TPM_RC_2)
+#define RC_NV_Certify_nvIndex (TPM_RC_H + TPM_RC_3)
+#define RC_NV_Certify_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_NV_Certify_inScheme (TPM_RC_P + TPM_RC_2)
+#define RC_NV_Certify_size (TPM_RC_P + TPM_RC_3)
+#define RC_NV_Certify_offset (TPM_RC_P + TPM_RC_4)
+
+
+typedef struct {
+ TPM2B_ATTEST certifyInfo;
+ TPMT_SIGNATURE signature;
+} NV_Certify_Out;
+
+TPM_RC
+TPM2_NV_Certify(
+ NV_Certify_In *in, // IN: input parameter list
+ NV_Certify_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ChangeAuth_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ChangeAuth_fp.h
new file mode 100644
index 000000000..ed211bb05
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ChangeAuth_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_ChangeAuth_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_CHANGEAUTH_FP_H
+#define NV_CHANGEAUTH_FP_H
+
+typedef struct {
+ TPMI_RH_NV_INDEX nvIndex;
+ TPM2B_AUTH newAuth;
+} NV_ChangeAuth_In;
+
+#define RC_NV_ChangeAuth_nvIndex (TPM_RC_H + TPM_RC_1)
+#define RC_NV_ChangeAuth_newAuth (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_NV_ChangeAuth(
+ NV_ChangeAuth_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace12_fp.h
new file mode 100644
index 000000000..8d6bc64de
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace12_fp.h
@@ -0,0 +1,52 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 NV_DefineSpace */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef NVDEFINESPACE12_FP_H
+#define NVDEFINESPACE12_FP_H
+
+typedef struct {
+ TPM_NV_DATA_PUBLIC pubInfo;
+ TPM_ENCAUTH encAuth;
+} NV_DefineSpace12_In;
+
+TPM_RC
+TPM_NV_DefineSpace12(
+ NV_DefineSpace12_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace_fp.h
new file mode 100644
index 000000000..17699311d
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_DefineSpace_fp.h
@@ -0,0 +1,83 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_DefineSpace_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_DEFINESPACE_FP_H
+#define NV_DEFINESPACE_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION authHandle;
+ TPM2B_AUTH auth;
+ TPM2B_NV_PUBLIC publicInfo;
+} NV_DefineSpace_In;
+
+#define RC_NV_DefineSpace_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_DefineSpace_auth (TPM_RC_P + TPM_RC_1)
+#define RC_NV_DefineSpace_publicInfo (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_DefineSpace(
+ NV_DefineSpace_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Extend_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Extend_fp.h
new file mode 100644
index 000000000..7fc9cf2e8
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Extend_fp.h
@@ -0,0 +1,83 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_Extend_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_EXTEND_FP_H
+#define NV_EXTEND_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ TPM2B_MAX_NV_BUFFER data;
+} NV_Extend_In;
+
+#define RC_NV_Extend_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_Extend_nvIndex (TPM_RC_H + TPM_RC_2)
+#define RC_NV_Extend_data (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_NV_Extend(
+ NV_Extend_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_GlobalWriteLock_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_GlobalWriteLock_fp.h
new file mode 100644
index 000000000..20b637724
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_GlobalWriteLock_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_GlobalWriteLock_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_GLOBALWRITELOCK_FP_H
+#define NV_GLOBALWRITELOCK_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION authHandle;
+} NV_GlobalWriteLock_In;
+
+#define RC_NV_GlobalWriteLock_authHandle (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_NV_GlobalWriteLock(
+ NV_GlobalWriteLock_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Increment_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Increment_fp.h
new file mode 100644
index 000000000..e6529cfe3
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Increment_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_Increment_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_INCREMENT_FP_H
+#define NV_INCREMENT_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+} NV_Increment_In;;
+
+#define RC_NV_Increment_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_Increment_nvIndex (TPM_RC_H + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_Increment(
+ NV_Increment_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadLock_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadLock_fp.h
new file mode 100644
index 000000000..9f92915de
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadLock_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_ReadLock_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_READLOCK_FP_H
+#define NV_READLOCK_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+} NV_ReadLock_In;
+
+#define RC_NV_ReadLock_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_ReadLock_nvIndex (TPM_RC_H + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_ReadLock(
+ NV_ReadLock_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadPublic_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadPublic_fp.h
new file mode 100644
index 000000000..35137e7ea
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadPublic_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_ReadPublic_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_READPUBLIC_FP_H
+#define NV_READPUBLIC_FP_H
+
+typedef struct {
+ TPMI_RH_NV_INDEX nvIndex;
+} NV_ReadPublic_In;
+
+#define RC_NV_ReadPublic_nvIndex (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM2B_NV_PUBLIC nvPublic;
+ TPM2B_NAME nvName;
+} NV_ReadPublic_Out;
+
+TPM_RC
+TPM2_NV_ReadPublic(
+ NV_ReadPublic_In *in, // IN: input parameter list
+ NV_ReadPublic_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValueAuth_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValueAuth_fp.h
new file mode 100644
index 000000000..efc4ea186
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValueAuth_fp.h
@@ -0,0 +1,65 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 NV_ReadValueAuth */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_ReadValueAuth_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef NVREADVALUEAUTH_FP_H
+#define NVREADVALUEAUTH_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM12_NV_INDEX nvIndex;
+ UINT32 offset;
+ UINT32 dataSize;
+} NV_ReadValueAuth_In;
+
+typedef struct {
+ UINT32 dataSize;
+ BYTE data[MAX_NV_BUFFER_SIZE];
+} NV_ReadValueAuth_Out;
+
+TPM_RC
+TPM2_NV_ReadValueAuth(
+ NV_ReadValueAuth_In *in, // IN: input parameter buffer
+ NV_ReadValueAuth_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValue_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValue_fp.h
new file mode 100644
index 000000000..8546a6fee
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_ReadValue_fp.h
@@ -0,0 +1,65 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 NV_ReadValue */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_ReadValue_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef NVREADVALUE_FP_H
+#define NVREADVALUE_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM12_NV_INDEX nvIndex;
+ UINT32 offset;
+ UINT32 dataSize;
+} NV_ReadValue_In;
+
+typedef struct {
+ UINT32 dataSize;
+ BYTE data[MAX_NV_BUFFER_SIZE];
+} NV_ReadValue_Out;
+
+TPM_RC
+TPM2_NV_ReadValue(
+ NV_ReadValue_In *in, // IN: input parameter buffer
+ NV_ReadValue_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Read_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Read_fp.h
new file mode 100644
index 000000000..636fe819a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Read_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_Read_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_READ_FP_H
+#define NV_READ_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ UINT16 size;
+ UINT16 offset;
+} NV_Read_In;
+
+#define RC_NV_Read_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_Read_nvIndex (TPM_RC_H + TPM_RC_2)
+#define RC_NV_Read_size (TPM_RC_P + TPM_RC_1)
+#define RC_NV_Read_offset (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPM2B_MAX_NV_BUFFER data;
+} NV_Read_Out;
+
+TPM_RC
+TPM2_NV_Read(
+ NV_Read_In *in, // IN: input parameter list
+ NV_Read_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_SetBits_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_SetBits_fp.h
new file mode 100644
index 000000000..4b1c1a009
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_SetBits_fp.h
@@ -0,0 +1,83 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_SetBits_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_SETBITS_FP_H
+#define NV_SETBITS_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ UINT64 bits;
+} NV_SetBits_In;
+
+#define RC_NV_SetBits_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_SetBits_nvIndex (TPM_RC_H + TPM_RC_2)
+#define RC_NV_SetBits_bits (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_NV_SetBits(
+ NV_SetBits_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpaceSpecial_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpaceSpecial_fp.h
new file mode 100644
index 000000000..f58713c83
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpaceSpecial_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_UndefineSpaceSpecial_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_UNDEFINESPACESPECIAL_FP_H
+#define NV_UNDEFINESPACESPECIAL_FP_H
+
+typedef struct {
+ TPMI_RH_NV_INDEX nvIndex;
+ TPMI_RH_PLATFORM platform;
+} NV_UndefineSpaceSpecial_In;
+
+#define RC_NV_UndefineSpaceSpecial_nvIndex (TPM_RC_H + TPM_RC_1)
+#define RC_NV_UndefineSpaceSpecial_platform (TPM_RC_H + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_UndefineSpaceSpecial(
+ NV_UndefineSpaceSpecial_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpace_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpace_fp.h
new file mode 100644
index 000000000..6b9ca92db
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_UndefineSpace_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_UndefineSpace_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_UNDEFINESPACE_FP_H
+#define NV_UNDEFINESPACE_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+} NV_UndefineSpace_In;
+
+#define RC_NV_UndefineSpace_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_UndefineSpace_nvIndex (TPM_RC_H + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_UndefineSpace(
+ NV_UndefineSpace_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteLock_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteLock_fp.h
new file mode 100644
index 000000000..471e1c9b7
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteLock_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_WriteLock_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_WRITELOCK_FP_H
+#define NV_WRITELOCK_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+} NV_WriteLock_In;
+
+#define RC_NV_WriteLock_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_WriteLock_nvIndex (TPM_RC_H + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_WriteLock(
+ NV_WriteLock_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValueAuth_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValueAuth_fp.h
new file mode 100644
index 000000000..60b4bca5f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValueAuth_fp.h
@@ -0,0 +1,57 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 NV_WriteValueAuth */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_WriteValueAuth_fp.h 1294 2018-08-09 19:08:34Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef NVWRITEVALUEAUTH_FP_H
+#define NVWRITEVALUEAUTH_FP_H
+
+typedef struct {
+ TPM12_NV_INDEX nvIndex;
+ UINT32 offset;
+ UINT32 dataSize;
+ BYTE data[MAX_NV_BUFFER_SIZE];
+} NV_WriteValueAuth_In;
+
+TPM_RC
+TPM_NV_WriteValueAuth(
+ NV_WriteValueAuth_In *in // IN: input parameter list
+ );
+
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValue_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValue_fp.h
new file mode 100644
index 000000000..489aa1dc0
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_WriteValue_fp.h
@@ -0,0 +1,55 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 NV_WriteValue */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_WriteValue_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef NVWRITEVALUE_FP_H
+#define NVWRITEVALUE_FP_H
+
+typedef struct {
+ TPM12_NV_INDEX nvIndex;
+ UINT32 offset;
+ UINT32 dataSize;
+ BYTE data[MAX_NV_BUFFER_SIZE];
+} NV_WriteValue_In;
+
+TPM_RC
+TPM_NV_WriteValue(
+ NV_WriteValue_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Write_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Write_fp.h
new file mode 100644
index 000000000..56b9a9801
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/NV_Write_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: NV_Write_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef NV_WRITE_FP_H
+#define NV_WRITE_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ TPM2B_MAX_NV_BUFFER data;
+ UINT16 offset;
+} NV_Write_In;
+
+#define RC_NV_Write_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_NV_Write_nvIndex (TPM_RC_H + TPM_RC_2)
+#define RC_NV_Write_data (TPM_RC_P + TPM_RC_1)
+#define RC_NV_Write_offset (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_NV_Write(
+ NV_Write_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OIAP_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OIAP_fp.h
new file mode 100644
index 000000000..644b6329b
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OIAP_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: OIAP_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2018 */
+/* */
+/********************************************************************************/
+
+#ifndef OIAP_FP_H
+#define OIAP_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+typedef struct {
+ TPM_AUTHHANDLE authHandle;
+ TPM_NONCE nonceEven;
+} OIAP_Out;
+
+TPM_RC
+TPM2_OIAP(
+ OIAP_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OSAP_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OSAP_fp.h
new file mode 100644
index 000000000..1a6ee4815
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OSAP_fp.h
@@ -0,0 +1,60 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 OSAP */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef OSAP_FP_H
+#define OSAP_FP_H
+
+typedef struct {
+ TPM_ENTITY_TYPE entityType;
+ UINT32 entityValue;
+ TPM_NONCE nonceOddOSAP;
+} OSAP_In;
+
+typedef struct {
+ TPM_AUTHHANDLE authHandle;
+ TPM_NONCE nonceEven;
+ TPM_NONCE nonceEvenOSAP;
+} OSAP_Out;
+
+TPM_RC
+TPM2_OSAP(
+ OSAP_In *in, // IN: input parameter buffer
+ OSAP_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ObjectChangeAuth_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ObjectChangeAuth_fp.h
new file mode 100644
index 000000000..1987da4b3
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ObjectChangeAuth_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ObjectChangeAuth_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef OBJECTCHANGEAUTH_FP_H
+#define OBJECTCHANGEAUTH_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT objectHandle;
+ TPMI_DH_OBJECT parentHandle;
+ TPM2B_AUTH newAuth;
+} ObjectChangeAuth_In;
+
+#define RC_ObjectChangeAuth_objectHandle (TPM_RC_H + TPM_RC_1)
+#define RC_ObjectChangeAuth_parentHandle (TPM_RC_H + TPM_RC_2)
+#define RC_ObjectChangeAuth_newAuth (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM2B_PRIVATE outPrivate;
+} ObjectChangeAuth_Out;
+
+
+TPM_RC
+TPM2_ObjectChangeAuth(
+ ObjectChangeAuth_In *in, // IN: input parameter list
+ ObjectChangeAuth_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerReadInternalPub_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerReadInternalPub_fp.h
new file mode 100644
index 000000000..d1f74cfd1
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerReadInternalPub_fp.h
@@ -0,0 +1,62 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 OwnerReadInternalPub */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: OwnerReadInternalPub_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef OWNERREADINTERNALPUB_FP_H
+#define OWNERREADINTERNALPUB_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_KEY_HANDLE keyHandle;
+} OwnerReadInternalPub_In;
+
+typedef struct {
+ TPM_PUBKEY publicPortion;
+} OwnerReadInternalPub_Out;
+
+TPM_RC
+TPM2_OwnerReadInternalPub(
+ OwnerReadInternalPub_In *in, // IN: input parameter buffer
+ OwnerReadInternalPub_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerSetDisable_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerSetDisable_fp.h
new file mode 100644
index 000000000..f257f20aa
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/OwnerSetDisable_fp.h
@@ -0,0 +1,50 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: OwnerSetDisable_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018 */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef OWNERSETDISABLE_FP_H
+#define OWNERSETDISABLE_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+
+typedef struct {
+ uint8_t disableState;
+} OwnerSetDisable_In;
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Allocate_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Allocate_fp.h
new file mode 100644
index 000000000..509d7c098
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Allocate_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_Allocate_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_ALLOCATE_FP_H
+#define PCR_ALLOCATE_FP_H
+
+typedef struct {
+ TPMI_RH_PLATFORM authHandle;
+ TPML_PCR_SELECTION pcrAllocation;
+} PCR_Allocate_In;
+
+#define RC_PCR_Allocate_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PCR_Allocate_pcrAllocation (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPMI_YES_NO allocationSuccess;
+ UINT32 maxPCR;
+ UINT32 sizeNeeded;
+ UINT32 sizeAvailable;
+} PCR_Allocate_Out;
+
+TPM_RC
+TPM2_PCR_Allocate(
+ PCR_Allocate_In *in, // IN: input parameter list
+ PCR_Allocate_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Event_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Event_fp.h
new file mode 100644
index 000000000..2ccb82a32
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Event_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_Event_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_EVENT_FP_H
+#define PCR_EVENT_FP_H
+
+typedef struct {
+ TPMI_DH_PCR pcrHandle;
+ TPM2B_EVENT eventData;
+} PCR_Event_In;
+
+#define RC_PCR_Event_pcrHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PCR_Event_eventData (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPML_DIGEST_VALUES digests;
+} PCR_Event_Out;
+
+TPM_RC
+TPM2_PCR_Event(
+ PCR_Event_In *in, // IN: input parameter list
+ PCR_Event_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Extend_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Extend_fp.h
new file mode 100644
index 000000000..fc201a8dc
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Extend_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_Extend_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_EXTEND_FP_H
+#define PCR_EXTEND_FP_H
+
+typedef struct {
+ TPMI_DH_PCR pcrHandle;
+ TPML_DIGEST_VALUES digests;
+} PCR_Extend_In;
+
+#define RC_PCR_Extend_pcrHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PCR_Extend_digests (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PCR_Extend(
+ PCR_Extend_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Read_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Read_fp.h
new file mode 100644
index 000000000..4c38d3e52
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Read_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_Read_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_READ_FP_H
+#define PCR_READ_FP_H
+
+typedef struct {
+ TPML_PCR_SELECTION pcrSelectionIn;
+} PCR_Read_In;
+
+#define RC_PCR_Read_pcrSelectionIn (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ UINT32 pcrUpdateCounter;
+ TPML_PCR_SELECTION pcrSelectionOut;
+ TPML_DIGEST pcrValues;
+} PCR_Read_Out;
+
+TPM_RC
+TPM2_PCR_Read(
+ PCR_Read_In *in, // IN: input parameter list
+ PCR_Read_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset12_fp.h
new file mode 100644
index 000000000..995a1baef
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset12_fp.h
@@ -0,0 +1,51 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 PCR_Reset */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef PCRRESET12_FP_H
+#define PCRRESET12_FP_H
+
+typedef struct {
+ TPM_PCR_SELECTION pcrSelection;
+} PCR_Reset12_In;
+
+TPM_RC
+TPM_PCR_Reset12(
+ PCR_Reset12_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset_fp.h
new file mode 100644
index 000000000..9825fc93d
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_Reset_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_Reset_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_RESET_FP_H
+#define PCR_RESET_FP_H
+
+typedef struct {
+ TPMI_DH_PCR pcrHandle;
+} PCR_Reset_In;
+
+#define RC_PCR_Reset__pcrHandle (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_PCR_Reset(
+ PCR_Reset_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthPolicy_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthPolicy_fp.h
new file mode 100644
index 000000000..3146b5b65
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthPolicy_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_SetAuthPolicy_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_SETAUTHPOLICY_FP_H
+#define PCR_SETAUTHPOLICY_FP_H
+
+typedef struct {
+ TPMI_RH_PLATFORM authHandle;
+ TPM2B_DIGEST authPolicy;
+ TPMI_ALG_HASH hashAlg;
+ TPMI_DH_PCR pcrNum;
+} PCR_SetAuthPolicy_In;
+
+#define RC_PCR_SetAuthPolicy_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PCR_SetAuthPolicy_authPolicy (TPM_RC_P + TPM_RC_1)
+#define RC_PCR_SetAuthPolicy_hashAlg (TPM_RC_P + TPM_RC_2)
+#define RC_PCR_SetAuthPolicy_pcrNum (TPM_RC_P + TPM_RC_3)
+
+TPM_RC
+TPM2_PCR_SetAuthPolicy(
+ PCR_SetAuthPolicy_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthValue_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthValue_fp.h
new file mode 100644
index 000000000..83515784b
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PCR_SetAuthValue_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PCR_SetAuthValue_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef PCR_SETAUTHVALUE_FP_H
+#define PCR_SETAUTHVALUE_FP_H
+
+typedef struct {
+ TPMI_DH_PCR pcrHandle;
+ TPM2B_DIGEST auth;
+} PCR_SetAuthValue_In;
+
+#define RC_PCR_SetAuthValue_pcrHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PCR_SetAuthValue_auth (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PCR_SetAuthValue(
+ PCR_SetAuthValue_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PP_Commands_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PP_Commands_fp.h
new file mode 100644
index 000000000..f042b5a13
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PP_Commands_fp.h
@@ -0,0 +1,80 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PP_Commands_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2016 */
+/* */
+/********************************************************************************/
+
+#ifndef PP_COMMANDS_FP_H
+#define PP_COMMANDS_FP_H
+
+typedef struct {
+ TPMI_RH_PLATFORM auth;
+ TPML_CC setList;
+ TPML_CC clearList;
+} PP_Commands_In;
+
+#define RC_PP_Commands_auth (TPM_RC_H + TPM_RC_1)
+#define RC_PP_Commands_setList (TPM_RC_P + TPM_RC_1)
+#define RC_PP_Commands_clearList (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_PP_Commands(
+ PP_Commands_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters.h
new file mode 100644
index 000000000..98a04ffcb
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters.h
@@ -0,0 +1,386 @@
+/********************************************************************************/
+/* */
+/* Command and Response Parameter Structures */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2019 */
+/* */
+/********************************************************************************/
+
+/* TPM and TSS share thses structures */
+
+#ifndef PARAMETERS_H
+#define PARAMETERS_H
+
+#include "TPM_Types.h"
+
+#include "ActivateCredential_fp.h"
+#include "CertifyCreation_fp.h"
+#include "Certify_fp.h"
+#include "CertifyX509_fp.h"
+#include "ChangeEPS_fp.h"
+#include "ChangePPS_fp.h"
+#include "ClearControl_fp.h"
+#include "Clear_fp.h"
+#include "ClockRateAdjust_fp.h"
+#include "ClockSet_fp.h"
+#include "Commit_fp.h"
+#include "ContextLoad_fp.h"
+#include "ContextSave_fp.h"
+#include "CreatePrimary_fp.h"
+#include "Create_fp.h"
+#include "CreateLoaded_fp.h"
+#include "DictionaryAttackLockReset_fp.h"
+#include "DictionaryAttackParameters_fp.h"
+#include "Duplicate_fp.h"
+#include "ECC_Parameters_fp.h"
+#include "ECDH_KeyGen_fp.h"
+#include "ECDH_ZGen_fp.h"
+#include "EC_Ephemeral_fp.h"
+#include "EncryptDecrypt_fp.h"
+#include "EncryptDecrypt2_fp.h"
+#include "EventSequenceComplete_fp.h"
+#include "EvictControl_fp.h"
+#include "FlushContext_fp.h"
+#include "GetCapability_fp.h"
+#include "GetCommandAuditDigest_fp.h"
+#include "GetRandom_fp.h"
+#include "GetSessionAuditDigest_fp.h"
+#include "GetTestResult_fp.h"
+#include "GetTime_fp.h"
+#include "HMAC_Start_fp.h"
+#include "HMAC_fp.h"
+#include "HashSequenceStart_fp.h"
+#include "Hash_fp.h"
+#include "HierarchyChangeAuth_fp.h"
+#include "HierarchyControl_fp.h"
+#include "Import_fp.h"
+#include "IncrementalSelfTest_fp.h"
+#include "LoadExternal_fp.h"
+#include "Load_fp.h"
+#include "MakeCredential_fp.h"
+#include "NV_Certify_fp.h"
+#include "NV_ChangeAuth_fp.h"
+#include "NV_DefineSpace_fp.h"
+#include "NV_Extend_fp.h"
+#include "NV_GlobalWriteLock_fp.h"
+#include "NV_Increment_fp.h"
+#include "NV_ReadLock_fp.h"
+#include "NV_ReadPublic_fp.h"
+#include "NV_Read_fp.h"
+#include "NV_SetBits_fp.h"
+#include "NV_UndefineSpaceSpecial_fp.h"
+#include "NV_UndefineSpace_fp.h"
+#include "NV_WriteLock_fp.h"
+#include "NV_Write_fp.h"
+#include "ObjectChangeAuth_fp.h"
+#include "PCR_Allocate_fp.h"
+#include "PCR_Event_fp.h"
+#include "PCR_Extend_fp.h"
+#include "PCR_Read_fp.h"
+#include "PCR_Reset_fp.h"
+#include "PCR_SetAuthPolicy_fp.h"
+#include "PCR_SetAuthValue_fp.h"
+#include "PP_Commands_fp.h"
+#include "PolicyAuthValue_fp.h"
+#include "PolicyAuthorize_fp.h"
+#include "PolicyCommandCode_fp.h"
+#include "PolicyCounterTimer_fp.h"
+#include "PolicyCpHash_fp.h"
+#include "PolicyDuplicationSelect_fp.h"
+#include "PolicyGetDigest_fp.h"
+#include "PolicyLocality_fp.h"
+#include "PolicyNV_fp.h"
+#include "PolicyAuthorizeNV_fp.h"
+#include "PolicyNvWritten_fp.h"
+#include "PolicyNameHash_fp.h"
+#include "PolicyOR_fp.h"
+#include "PolicyPCR_fp.h"
+#include "PolicyPassword_fp.h"
+#include "PolicyPhysicalPresence_fp.h"
+#include "PolicyRestart_fp.h"
+#include "PolicySecret_fp.h"
+#include "PolicySigned_fp.h"
+#include "PolicyTemplate_fp.h"
+#include "PolicyTicket_fp.h"
+#include "Quote_fp.h"
+#include "RSA_Decrypt_fp.h"
+#include "RSA_Encrypt_fp.h"
+#include "ReadClock_fp.h"
+#include "ReadPublic_fp.h"
+#include "Rewrap_fp.h"
+#include "SelfTest_fp.h"
+#include "SequenceComplete_fp.h"
+#include "SequenceUpdate_fp.h"
+#include "SetAlgorithmSet_fp.h"
+#include "SetCommandCodeAuditStatus_fp.h"
+#include "SetPrimaryPolicy_fp.h"
+#include "Shutdown_fp.h"
+#include "Sign_fp.h"
+#include "StartAuthSession_fp.h"
+#include "Startup_fp.h"
+#include "StirRandom_fp.h"
+#include "TestParms_fp.h"
+#include "Unseal_fp.h"
+#include "VerifySignature_fp.h"
+#include "ZGen_2Phase_fp.h"
+#include "NTC_fp.h"
+
+#include <ibmtss/Parameters12.h>
+
+typedef union {
+ ActivateCredential_In ActivateCredential;
+ CertifyCreation_In CertifyCreation;
+ Certify_In Certify;
+ ChangeEPS_In ChangeEPS;
+ ChangePPS_In ChangePPS;
+ ClearControl_In ClearControl;
+ Clear_In Clear;
+ ClockRateAdjust_In ClockRateAdjust;
+ ClockSet_In ClockSet;
+ Commit_In Commit;
+ ContextLoad_In ContextLoad;
+ ContextSave_In ContextSave;
+ CreatePrimary_In CreatePrimary;
+ Create_In Create;
+ DictionaryAttackLockReset_In DictionaryAttackLockReset;
+ DictionaryAttackParameters_In DictionaryAttackParameters;
+ Duplicate_In Duplicate;
+ ECC_Parameters_In ECC_Parameters;
+ ECDH_KeyGen_In ECDH_KeyGen;
+ ECDH_ZGen_In ECDH_ZGen;
+ EC_Ephemeral_In EC_Ephemeral;
+ EncryptDecrypt_In EncryptDecrypt;
+ EventSequenceComplete_In EventSequenceComplete;
+ EvictControl_In EvictControl;
+ FlushContext_In FlushContext;
+ GetCapability_In GetCapability;
+ GetCommandAuditDigest_In GetCommandAuditDigest;
+ GetRandom_In GetRandom;
+ GetSessionAuditDigest_In GetSessionAuditDigest;
+ GetTime_In GetTime;
+ HMAC_In HMAC;
+ HMAC_Start_In HMAC_Start;
+ HashSequenceStart_In HashSequenceStart;
+ Hash_In Hash;
+ HierarchyChangeAuth_In HierarchyChangeAuth;
+ HierarchyControl_In HierarchyControl;
+ Import_In Import;
+ IncrementalSelfTest_In IncrementalSelfTest;
+ LoadExternal_In LoadExternal;
+ Load_In Load;
+ MakeCredential_In MakeCredential;
+ NV_Certify_In NV_Certify;
+ NV_ChangeAuth_In NV_ChangeAuth;
+ NV_DefineSpace_In NV_DefineSpace;
+ NV_Extend_In NV_Extend;
+ NV_GlobalWriteLock_In NV_GlobalWriteLock;
+ NV_Increment_In NV_Increment;
+ NV_ReadLock_In NV_ReadLock;
+ NV_ReadPublic_In NV_ReadPublic;
+ NV_Read_In NV_Read;
+ NV_SetBits_In NV_SetBits;
+ NV_UndefineSpaceSpecial_In NV_UndefineSpaceSpecial;
+ NV_UndefineSpace_In NV_UndefineSpace;
+ NV_WriteLock_In NV_WriteLock;
+ NV_Write_In NV_Write;
+ ObjectChangeAuth_In ObjectChangeAuth;
+ PCR_Allocate_In PCR_Allocate;
+ PCR_Event_In PCR_Event;
+ PCR_Extend_In PCR_Extend;
+ PCR_Read_In PCR_Read;
+ PCR_Reset_In PCR_Reset;
+ PCR_SetAuthPolicy_In PCR_SetAuthPolicy;
+ PCR_SetAuthValue_In PCR_SetAuthValue;
+ PP_Commands_In PP_Commands;
+ PolicyAuthValue_In PolicyAuthValue;
+ PolicyAuthorize_In PolicyAuthorize;
+ PolicyCommandCode_In PolicyCommandCode;
+ PolicyCounterTimer_In PolicyCounterTimer;
+ PolicyCpHash_In PolicyCpHash;
+ PolicyDuplicationSelect_In PolicyDuplicationSelect;
+ PolicyGetDigest_In PolicyGetDigest;
+ PolicyLocality_In PolicyLocality;
+ PolicyNV_In PolicyNV;
+ PolicyAuthorizeNV_In PolicyAuthorizeNV;
+ PolicyNameHash_In PolicyNameHash;
+ PolicyOR_In PolicyOR;
+ PolicyPCR_In PolicyPCR;
+ PolicyPassword_In PolicyPassword;
+ PolicyPhysicalPresence_In PolicyPhysicalPresence;
+ PolicyRestart_In PolicyRestart;
+ PolicySecret_In PolicySecret;
+ PolicySigned_In PolicySigned;
+ PolicyTicket_In PolicyTicket;
+ Quote_In Quote;
+ RSA_Decrypt_In RSA_Decrypt;
+ RSA_Encrypt_In RSA_Encrypt;
+ ReadPublic_In ReadPublic;
+ Rewrap_In Rewrap;
+ SelfTest_In SelfTest;
+ SequenceComplete_In SequenceComplete;
+ SequenceUpdate_In SequenceUpdate;
+ SetAlgorithmSet_In SetAlgorithmSet;
+ SetCommandCodeAuditStatus_In SetCommandCodeAuditStatus;
+ SetPrimaryPolicy_In SetPrimaryPolicy;
+ Shutdown_In Shutdown;
+ Sign_In Sign;
+ StartAuthSession_In StartAuthSession;
+ Startup_In Startup;
+ StirRandom_In StirRandom;
+ TestParms_In TestParms;
+ Unseal_In Unseal;
+ VerifySignature_In VerifySignature;
+ ZGen_2Phase_In ZGen_2Phase;
+
+ ActivateIdentity_In ActivateIdentity;
+ CreateWrapKey_In CreateWrapKey;
+ CreateEndorsementKeyPair_In CreateEndorsementKeyPair;
+ Extend_In Extend;
+ FlushSpecific_In FlushSpecific;
+ GetCapability12_In GetCapability12;
+ MakeIdentity_In MakeIdentity;
+ NV_DefineSpace12_In NV_DefineSpace12;
+ NV_ReadValue_In NV_ReadValue;
+ NV_ReadValueAuth_In NV_ReadValueAuth;
+ NV_WriteValue_In NV_WriteValue;
+ NV_WriteValueAuth_In NV_WriteValueAuth;
+ OSAP_In OSAP;
+ OwnerReadInternalPub_In OwnerReadInternalPub;
+ OwnerSetDisable_In OwnerSetDisable;
+ LoadKey2_In LoadKey2;
+ PcrRead12_In PcrRead12;
+ PCR_Reset12_In PCR_Reset12;
+ Quote2_In Quote2;
+ ReadPubek_In ReadPubek;
+ Sign12_In Sign12;
+ Startup12_In Startup12;
+ TakeOwnership_In TakeOwnership;
+} COMMAND_PARAMETERS;
+
+typedef union
+{
+ ActivateCredential_Out ActivateCredential;
+ CertifyCreation_Out CertifyCreation;
+ Certify_Out Certify;
+ Commit_Out Commit;
+ ContextLoad_Out ContextLoad;
+ ContextSave_Out ContextSave;
+ CreatePrimary_Out CreatePrimary;
+ Create_Out Create;
+ Duplicate_Out Duplicate;
+ ECC_Parameters_Out ECC_Parameters;
+ ECDH_KeyGen_Out ECDH_KeyGen;
+ ECDH_ZGen_Out ECDH_ZGen;
+ EC_Ephemeral_Out EC_Ephemeral;
+ EncryptDecrypt_Out EncryptDecrypt;
+ EventSequenceComplete_Out EventSequenceComplete;
+ GetCapability_Out GetCapability;
+ GetCommandAuditDigest_Out GetCommandAuditDigest;
+ GetRandom_Out GetRandom;
+ GetSessionAuditDigest_Out GetSessionAuditDigest;
+ GetTestResult_Out GetTestResult;
+ GetTime_Out GetTime;
+ HMAC_Out HMAC;
+ HMAC_Start_Out HMAC_Start;
+ HashSequenceStart_Out HashSequenceStart;
+ Hash_Out Hash;
+ Import_Out Import;
+ IncrementalSelfTest_Out IncrementalSelfTest;
+ LoadExternal_Out LoadExternal;
+ Load_Out Load;
+ MakeCredential_Out MakeCredential;
+ NV_Certify_Out NV_Certify;
+ NV_ReadPublic_Out NV_ReadPublic;
+ NV_Read_Out NV_Read;
+ ObjectChangeAuth_Out ObjectChangeAuth;
+ PCR_Allocate_Out PCR_Allocate;
+ PCR_Event_Out PCR_Event;
+ PCR_Read_Out PCR_Read;
+ PolicyGetDigest_Out PolicyGetDigest;
+ PolicySecret_Out PolicySecret;
+ PolicySigned_Out PolicySigned;
+ Quote_Out Quote;
+ RSA_Decrypt_Out RSA_Decrypt;
+ RSA_Encrypt_Out RSA_Encrypt;
+ ReadClock_Out ReadClock;
+ ReadPublic_Out ReadPublic;
+ Rewrap_Out Rewrap;
+ SequenceComplete_Out SequenceComplete;
+ Sign_Out Sign;
+ StartAuthSession_Out StartAuthSession;
+ Unseal_Out Unseal;
+ VerifySignature_Out VerifySignature;
+ ZGen_2Phase_Out ZGen_2Phase;
+
+ ActivateIdentity_Out ActivateIdentity;
+ CreateWrapKey_Out CreateWrapKey;
+ CreateEndorsementKeyPair_Out CreateEndorsementKeyPair;
+ Extend_Out Extend;
+ GetCapability12_Out GetCapability12;
+ MakeIdentity_Out MakeIdentity;
+ NV_ReadValue_Out NV_ReadValue;
+ NV_ReadValueAuth_Out NV_ReadValueAuth;
+ OIAP_Out OIAP;
+ OSAP_Out OSAP;
+ OwnerReadInternalPub_Out OwnerReadInternalPub;
+ LoadKey2_Out LoadKey2;
+ PcrRead12_Out PcrRead12;
+ Quote2_Out Quote2;
+ ReadPubek_Out ReadPubek;
+ Sign12_Out Sign12;
+ TakeOwnership_Out TakeOwnership;
+} RESPONSE_PARAMETERS;
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters12.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters12.h
new file mode 100644
index 000000000..90c9fa847
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Parameters12.h
@@ -0,0 +1,68 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Parameters12.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef PARAMETERS12_H
+#define PARAMETERS12_H
+
+#include <ibmtss/ActivateIdentity_fp.h>
+#include <ibmtss/CreateWrapKey_fp.h>
+#include <ibmtss/CreateEndorsementKeyPair_fp.h>
+#include <ibmtss/Extend_fp.h>
+#include <ibmtss/FlushSpecific_fp.h>
+#include <ibmtss/GetCapability12_fp.h>
+#include <ibmtss/MakeIdentity_fp.h>
+#include <ibmtss/NV_DefineSpace12_fp.h>
+#include <ibmtss/NV_ReadValue_fp.h>
+#include <ibmtss/NV_ReadValueAuth_fp.h>
+#include <ibmtss/NV_WriteValue_fp.h>
+#include <ibmtss/NV_WriteValueAuth_fp.h>
+#include <ibmtss/OIAP_fp.h>
+#include <ibmtss/OSAP_fp.h>
+#include <ibmtss/OwnerReadInternalPub_fp.h>
+#include <ibmtss/OwnerSetDisable_fp.h>
+#include <ibmtss/LoadKey2_fp.h>
+#include <ibmtss/PcrRead12_fp.h>
+#include <ibmtss/PCR_Reset12_fp.h>
+#include <ibmtss/Quote2_fp.h>
+#include <ibmtss/ReadPubek_fp.h>
+#include <ibmtss/Sign12_fp.h>
+#include <ibmtss/Startup12_fp.h>
+#include <ibmtss/TakeOwnership_fp.h>
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PcrRead12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PcrRead12_fp.h
new file mode 100644
index 000000000..dcb22783c
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PcrRead12_fp.h
@@ -0,0 +1,56 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 PcrRead */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef PCRREAD12_FP_H
+#define PCRREAD12_FP_H
+
+typedef struct {
+ TPM_PCRINDEX pcrIndex;
+} PcrRead12_In;
+
+typedef struct {
+ TPM_PCRVALUE outDigest;
+} PcrRead12_Out;
+
+TPM_RC
+TPM_PcrRead12(
+ PcrRead12_In *in, // IN: input parameter list
+ PcrRead12_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthValue_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthValue_fp.h
new file mode 100644
index 000000000..c09a57bda
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthValue_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyAuthValue_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYAUTHVALUE_FP_H
+#define POLICYAUTHVALUE_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+} PolicyAuthValue_In;
+
+#define RC_PolicyAuthValue_policySession (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyAuthValue(
+ PolicyAuthValue_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorizeNV_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorizeNV_fp.h
new file mode 100644
index 000000000..9b70b5c6f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorizeNV_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* PolicyAuthorizeNV */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015, 2016 */
+/* */
+/********************************************************************************/
+
+/* rev 136 */
+
+#ifndef POLICYAUTHORIZENV_FP_H
+#define POLICYAUTHORIZENV_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ TPMI_SH_POLICY policySession;
+} PolicyAuthorizeNV_In;
+
+#define RC_PolicyAuthorizeNV_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyAuthorizeNV_nvIndex (TPM_RC_H + TPM_RC_2)
+#define RC_PolicyAuthorizeNV_policySession (TPM_RC_H + TPM_RC_3)
+
+TPM_RC
+TPM2_PolicyAuthorizeNV(
+ PolicyAuthorizeNV_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorize_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorize_fp.h
new file mode 100644
index 000000000..da1ddd723
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyAuthorize_fp.h
@@ -0,0 +1,86 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyAuthorize_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYAUTHORIZE_FP_H
+#define POLICYAUTHORIZE_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_DIGEST approvedPolicy;
+ TPM2B_NONCE policyRef;
+ TPM2B_NAME keySign;
+ TPMT_TK_VERIFIED checkTicket;
+} PolicyAuthorize_In;
+
+#define RC_PolicyAuthorize_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyAuthorize_approvedPolicy (TPM_RC_P + TPM_RC_1)
+#define RC_PolicyAuthorize_policyRef (TPM_RC_P + TPM_RC_2)
+#define RC_PolicyAuthorize_keySign (TPM_RC_P + TPM_RC_3)
+#define RC_PolicyAuthorize_checkTicket (TPM_RC_P + TPM_RC_4)
+
+TPM_RC
+TPM2_PolicyAuthorize(
+ PolicyAuthorize_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCommandCode_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCommandCode_fp.h
new file mode 100644
index 000000000..bc74c58a4
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCommandCode_fp.h
@@ -0,0 +1,80 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyCommandCode_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYCOMMANDCODE_FP_H
+#define POLICYCOMMANDCODE_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM_CC code;
+} PolicyCommandCode_In;
+
+#define RC_PolicyCommandCode_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyCommandCode_code (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyCommandCode(
+ PolicyCommandCode_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCounterTimer_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCounterTimer_fp.h
new file mode 100644
index 000000000..605de794e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCounterTimer_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyCounterTimer_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYCOUNTERTIMER_FP_H
+#define POLICYCOUNTERTIMER_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_OPERAND operandB;
+ UINT16 offset;
+ TPM_EO operation;
+} PolicyCounterTimer_In;
+
+#define RC_PolicyCounterTimer_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyCounterTimer_operandB (TPM_RC_P + TPM_RC_1)
+#define RC_PolicyCounterTimer_offset (TPM_RC_P + TPM_RC_2)
+#define RC_PolicyCounterTimer_operation (TPM_RC_P + TPM_RC_3)
+
+TPM_RC
+TPM2_PolicyCounterTimer(
+ PolicyCounterTimer_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCpHash_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCpHash_fp.h
new file mode 100644
index 000000000..f2395513a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyCpHash_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyCpHash_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYCPHASH_FP_H
+#define POLICYCPHASH_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_DIGEST cpHashA;
+} PolicyCpHash_In;
+
+#define RC_PolicyCpHash_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyCpHash_cpHashA (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyCpHash(
+ PolicyCpHash_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyDuplicationSelect_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyDuplicationSelect_fp.h
new file mode 100644
index 000000000..12a5d3304
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyDuplicationSelect_fp.h
@@ -0,0 +1,85 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyDuplicationSelect_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYDUPLICATIONSELECT_FP_H
+#define POLICYDUPLICATIONSELECT_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_NAME objectName;
+ TPM2B_NAME newParentName;
+ TPMI_YES_NO includeObject;
+} PolicyDuplicationSelect_In;
+
+#define RC_PolicyDuplicationSelect_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyDuplicationSelect_objectName (TPM_RC_P + TPM_RC_1)
+#define RC_PolicyDuplicationSelect_newParentName (TPM_RC_P + TPM_RC_2)
+#define RC_PolicyDuplicationSelect_includeObject (TPM_RC_P + TPM_RC_3)
+
+TPM_RC
+TPM2_PolicyDuplicationSelect(
+ PolicyDuplicationSelect_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyGetDigest_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyGetDigest_fp.h
new file mode 100644
index 000000000..0283ee17a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyGetDigest_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyGetDigest_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYGETDIGEST_FP_H
+#define POLICYGETDIGEST_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+} PolicyGetDigest_In;
+
+#define RC_PolicyGetDigest_policySession (TPM_RC_P + TPM_RC_1)
+
+typedef struct {
+ TPM2B_DIGEST policyDigest;
+} PolicyGetDigest_Out;
+
+TPM_RC
+TPM2_PolicyGetDigest(
+ PolicyGetDigest_In *in, // IN: input parameter list
+ PolicyGetDigest_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyLocality_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyLocality_fp.h
new file mode 100644
index 000000000..f41fa654a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyLocality_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyLocality_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYLOCALITY_FP_H
+#define POLICYLOCALITY_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPMA_LOCALITY locality;
+} PolicyLocality_In;
+
+#define RC_PolicyLocality_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyLocality_locality (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyLocality(
+ PolicyLocality_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNV_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNV_fp.h
new file mode 100644
index 000000000..580eefffc
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNV_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyNV_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYNV_FP_H
+#define POLICYNV_FP_H
+
+typedef struct {
+ TPMI_RH_NV_AUTH authHandle;
+ TPMI_RH_NV_INDEX nvIndex;
+ TPMI_SH_POLICY policySession;
+ TPM2B_OPERAND operandB;
+ UINT16 offset;
+ TPM_EO operation;
+} PolicyNV_In;
+
+#define RC_PolicyNV_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyNV_nvIndex (TPM_RC_H + TPM_RC_2)
+#define RC_PolicyNV_policySession (TPM_RC_H + TPM_RC_3)
+#define RC_PolicyNV_operandB (TPM_RC_P + TPM_RC_1)
+#define RC_PolicyNV_offset (TPM_RC_P + TPM_RC_2)
+#define RC_PolicyNV_operation (TPM_RC_P + TPM_RC_3)
+
+TPM_RC
+TPM2_PolicyNV(
+ PolicyNV_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNameHash_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNameHash_fp.h
new file mode 100644
index 000000000..39c73ee85
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNameHash_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyNameHash_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYNAMEHASH_FP_H
+#define POLICYNAMEHASH_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_DIGEST nameHash;
+} PolicyNameHash_In;
+
+#define RC_PolicyNameHash_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyNameHash_nameHash (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyNameHash(
+ PolicyNameHash_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNvWritten_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNvWritten_fp.h
new file mode 100644
index 000000000..afe514f8a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyNvWritten_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyNvWritten_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYNVWRITTEN_FP_H
+#define POLICYNVWRITTEN_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPMI_YES_NO writtenSet;
+} PolicyNvWritten_In;
+
+#define RC_PolicyNvWritten_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyNvWritten_writtenSet (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyNvWritten(
+ PolicyNvWritten_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyOR_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyOR_fp.h
new file mode 100644
index 000000000..cc1024a72
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyOR_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyOR_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYOR_FP_H
+#define POLICYOR_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPML_DIGEST pHashList;
+} PolicyOR_In;
+
+#define RC_PolicyOR_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyOR_pHashList (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyOR(
+ PolicyOR_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPCR_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPCR_fp.h
new file mode 100644
index 000000000..6d9f715c6
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPCR_fp.h
@@ -0,0 +1,82 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyPCR_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYPCR_FP_H
+#define POLICYPCR_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_DIGEST pcrDigest;
+ TPML_PCR_SELECTION pcrs;
+} PolicyPCR_In;
+
+#define RC_PolicyPCR_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyPCR_pcrDigest (TPM_RC_P + TPM_RC_1)
+#define RC_PolicyPCR_pcrs (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_PolicyPCR(
+ PolicyPCR_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPassword_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPassword_fp.h
new file mode 100644
index 000000000..033578bf1
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPassword_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyPassword_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYPASSWORD_FP_H
+#define POLICYPASSWORD_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+} PolicyPassword_In;
+
+#define RC_PolicyPassword_policySession (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyPassword(
+ PolicyPassword_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPhysicalPresence_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPhysicalPresence_fp.h
new file mode 100644
index 000000000..1386259c8
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyPhysicalPresence_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyPhysicalPresence_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYPHYSICALPRESENCE_FP_H
+#define POLICYPHYSICALPRESENCE_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+} PolicyPhysicalPresence_In;
+
+#define RC_PolicyPhysicalPresence_policySession (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyPhysicalPresence(
+ PolicyPhysicalPresence_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyRestart_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyRestart_fp.h
new file mode 100644
index 000000000..615d87fe1
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyRestart_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyRestart_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYRESTART_FP_H
+#define POLICYRESTART_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY sessionHandle;
+} PolicyRestart_In;
+
+#define RC_PolicyRestart_sessionHandle (TPM_RC_H + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyRestart(
+ PolicyRestart_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySecret_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySecret_fp.h
new file mode 100644
index 000000000..f90378a6c
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySecret_fp.h
@@ -0,0 +1,95 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicySecret_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 124 */
+
+#ifndef POLICYSECRET_FP_H
+#define POLICYSECRET_FP_H
+
+typedef struct {
+ TPMI_DH_ENTITY authHandle;
+ TPMI_SH_POLICY policySession;
+ TPM2B_NONCE nonceTPM;
+ TPM2B_DIGEST cpHashA;
+ TPM2B_NONCE policyRef;
+ INT32 expiration;
+} PolicySecret_In;
+
+#define RC_PolicySecret_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_PolicySecret_policySession (TPM_RC_H + TPM_RC_2)
+#define RC_PolicySecret_nonceTPM (TPM_RC_P + TPM_RC_1)
+#define RC_PolicySecret_cpHashA (TPM_RC_P + TPM_RC_2)
+#define RC_PolicySecret_policyRef (TPM_RC_P + TPM_RC_3)
+#define RC_PolicySecret_expiration (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM2B_TIMEOUT timeout;
+ TPMT_TK_AUTH policyTicket;
+} PolicySecret_Out;
+
+TPM_RC
+TPM2_PolicySecret(
+ PolicySecret_In *in, // IN: input parameter list
+ PolicySecret_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySigned_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySigned_fp.h
new file mode 100644
index 000000000..d51f7bc6e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicySigned_fp.h
@@ -0,0 +1,96 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicySigned_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYSIGNED_FP_H
+#define POLICYSIGNED_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT authObject;
+ TPMI_SH_POLICY policySession;
+ TPM2B_NONCE nonceTPM;
+ TPM2B_DIGEST cpHashA;
+ TPM2B_NONCE policyRef;
+ INT32 expiration;
+ TPMT_SIGNATURE auth;
+} PolicySigned_In;
+
+#define RC_PolicySigned_authObject (TPM_RC_H + TPM_RC_1)
+#define RC_PolicySigned_policySession (TPM_RC_H + TPM_RC_2)
+#define RC_PolicySigned_nonceTPM (TPM_RC_P + TPM_RC_1)
+#define RC_PolicySigned_cpHashA (TPM_RC_P + TPM_RC_2)
+#define RC_PolicySigned_policyRef (TPM_RC_P + TPM_RC_3)
+#define RC_PolicySigned_expiration (TPM_RC_P + TPM_RC_4)
+#define RC_PolicySigned_auth (TPM_RC_P + TPM_RC_5)
+
+typedef struct {
+ TPM2B_TIMEOUT timeout;
+ TPMT_TK_AUTH policyTicket;
+} PolicySigned_Out;
+
+TPM_RC
+TPM2_PolicySigned(
+ PolicySigned_In *in, // IN: input parameter list
+ PolicySigned_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTemplate_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTemplate_fp.h
new file mode 100644
index 000000000..23e40f44b
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTemplate_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyTemplate_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015, 2016 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYTEMPLATE_FP_H
+#define POLICYTEMPLATE_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_DIGEST templateHash;
+} PolicyTemplate_In;
+
+#define RC_PolicyTemplate_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyTemplate_templateHash (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_PolicyTemplate(
+ PolicyTemplate_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTicket_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTicket_fp.h
new file mode 100644
index 000000000..7c680a0f6
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/PolicyTicket_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: PolicyTicket_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef POLICYTICKET_FP_H
+#define POLICYTICKET_FP_H
+
+typedef struct {
+ TPMI_SH_POLICY policySession;
+ TPM2B_TIMEOUT timeout;
+ TPM2B_DIGEST cpHashA;
+ TPM2B_NONCE policyRef;
+ TPM2B_NAME authName;
+ TPMT_TK_AUTH ticket;
+} PolicyTicket_In;
+
+#define RC_PolicyTicket_policySession (TPM_RC_H + TPM_RC_1)
+#define RC_PolicyTicket_timeout (TPM_RC_P + TPM_RC_1)
+#define RC_PolicyTicket_cpHashA (TPM_RC_P + TPM_RC_2)
+#define RC_PolicyTicket_policyRef (TPM_RC_P + TPM_RC_3)
+#define RC_PolicyTicket_authName (TPM_RC_P + TPM_RC_4)
+#define RC_PolicyTicket_ticket (TPM_RC_P + TPM_RC_5)
+
+TPM_RC
+TPM2_PolicyTicket(
+ PolicyTicket_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote2_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote2_fp.h
new file mode 100644
index 000000000..14e717579
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote2_fp.h
@@ -0,0 +1,69 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Quote2 */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Quote2_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef QUOTE2_FP_H
+#define QUOTE2_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_KEY_HANDLE keyHandle;
+ TPM_NONCE externalData;
+ TPM_PCR_SELECTION targetPCR;
+ TPM_BOOL addVersion;
+} Quote2_In;
+
+typedef struct {
+ TPM_PCR_INFO_SHORT pcrData;
+ UINT32 versionInfoSize;
+ TPM_CAP_VERSION_INFO versionInfo;
+ UINT32 sigSize;
+ BYTE sig[MAX_RSA_KEY_BYTES];
+} Quote2_Out;
+
+TPM_RC
+TPM2_Quote2(
+ Quote2_In *in, // IN: input parameter buffer
+ Quote2_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote_fp.h
new file mode 100644
index 000000000..75fcaa760
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Quote_fp.h
@@ -0,0 +1,91 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Quote_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef QUOTE_FP_H
+#define QUOTE_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT signHandle;
+ TPM2B_DATA qualifyingData;
+ TPMT_SIG_SCHEME inScheme;
+ TPML_PCR_SELECTION PCRselect;
+} Quote_In;
+
+#define RC_Quote_signHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Quote_qualifyingData (TPM_RC_P + TPM_RC_1)
+#define RC_Quote_inScheme (TPM_RC_P + TPM_RC_2)
+#define RC_Quote_PCRselect (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_ATTEST quoted;
+ TPMT_SIGNATURE signature;
+} Quote_Out;
+
+TPM_RC
+TPM2_Quote(
+ Quote_In *in, // IN: input parameter list
+ Quote_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Decrypt_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Decrypt_fp.h
new file mode 100644
index 000000000..2c8a41f8e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Decrypt_fp.h
@@ -0,0 +1,90 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: RSA_Decrypt_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef RSA_DECRYPT_FP_H
+#define RSA_DECRYPT_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_PUBLIC_KEY_RSA cipherText;
+ TPMT_RSA_DECRYPT inScheme;
+ TPM2B_DATA label;
+} RSA_Decrypt_In;
+
+#define RC_RSA_Decrypt_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_RSA_Decrypt_cipherText (TPM_RC_P + TPM_RC_1)
+#define RC_RSA_Decrypt_inScheme (TPM_RC_P + TPM_RC_2)
+#define RC_RSA_Decrypt_label (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_PUBLIC_KEY_RSA message;
+} RSA_Decrypt_Out;
+
+TPM_RC
+TPM2_RSA_Decrypt(
+ RSA_Decrypt_In *in, // IN: input parameter list
+ RSA_Decrypt_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Encrypt_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Encrypt_fp.h
new file mode 100644
index 000000000..d7be59099
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/RSA_Encrypt_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: RSA_Encrypt_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef RSA_ENCRYPT_FP_H
+#define RSA_ENCRYPT_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_PUBLIC_KEY_RSA message;
+ TPMT_RSA_DECRYPT inScheme;
+ TPM2B_DATA label;
+} RSA_Encrypt_In;
+
+#define RC_RSA_Encrypt_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_RSA_Encrypt_message (TPM_RC_P + TPM_RC_1)
+#define RC_RSA_Encrypt_inScheme (TPM_RC_P + TPM_RC_2)
+#define RC_RSA_Encrypt_label (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_PUBLIC_KEY_RSA outData;
+} RSA_Encrypt_Out;
+
+TPM_RC
+TPM2_RSA_Encrypt(
+ RSA_Encrypt_In *in, // IN: input parameter list
+ RSA_Encrypt_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadClock_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadClock_fp.h
new file mode 100644
index 000000000..b0d7a68f7
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadClock_fp.h
@@ -0,0 +1,77 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ReadClock_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef READCLOCK_FP_H
+#define READCLOCK_FP_H
+
+typedef struct {
+ TPMS_TIME_INFO currentTime;
+} ReadClock_Out;
+
+TPM_RC
+TPM2_ReadClock(
+ ReadClock_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPubek_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPubek_fp.h
new file mode 100644
index 000000000..440fbefe9
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPubek_fp.h
@@ -0,0 +1,63 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 ReadPubek */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ReadPubek_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef READPUBEK_FP_H
+#define READPUBEK_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_NONCE antiReplay;
+} ReadPubek_In;
+
+typedef struct {
+ TPM_PUBKEY pubEndorsementKey;
+ TPM_DIGEST checksum;
+} ReadPubek_Out;
+
+TPM_RC
+TPM2_ReadPubek(
+ ReadPubek_In *in, // IN: input parameter buffer
+ ReadPubek_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPublic_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPublic_fp.h
new file mode 100644
index 000000000..ad3fc2c70
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ReadPublic_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ReadPublic_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef READPUBLIC_FP_H
+#define READPUBLIC_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT objectHandle;
+} ReadPublic_In;
+
+#define RC_ReadPublic_objectHandle (TPM_RC_H + TPM_RC_1)
+
+typedef struct {
+ TPM2B_PUBLIC outPublic;
+ TPM2B_NAME name;
+ TPM2B_NAME qualifiedName;
+} ReadPublic_Out;
+
+TPM_RC
+TPM2_ReadPublic(
+ ReadPublic_In *in, // IN: input parameter list
+ ReadPublic_Out *out // OUT: output parameter list
+ );
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Rewrap_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Rewrap_fp.h
new file mode 100644
index 000000000..83b4b627c
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Rewrap_fp.h
@@ -0,0 +1,92 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Rewrap_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef REWRAP_FP_H
+#define REWRAP_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT oldParent;
+ TPMI_DH_OBJECT newParent;
+ TPM2B_PRIVATE inDuplicate;
+ TPM2B_NAME name;
+ TPM2B_ENCRYPTED_SECRET inSymSeed;
+} Rewrap_In;
+
+#define RC_Rewrap_oldParent (TPM_RC_H + TPM_RC_1)
+#define RC_Rewrap_newParent (TPM_RC_H + TPM_RC_2)
+#define RC_Rewrap_inDuplicate (TPM_RC_P + TPM_RC_1)
+#define RC_Rewrap_name (TPM_RC_P + TPM_RC_2)
+#define RC_Rewrap_inSymSeed (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPM2B_PRIVATE outDuplicate;
+ TPM2B_ENCRYPTED_SECRET outSymSeed;
+} Rewrap_Out;
+
+TPM_RC
+TPM2_Rewrap(
+ Rewrap_In *in, // IN: input parameter list
+ Rewrap_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SelfTest_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SelfTest_fp.h
new file mode 100644
index 000000000..33d4c6bdb
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SelfTest_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: SelfTest_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SELFTEST_FP_H
+#define SELFTEST_FP_H
+
+typedef struct{
+ TPMI_YES_NO fullTest;
+} SelfTest_In;
+
+#define RC_SelfTest_fullTest (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_SelfTest(
+ SelfTest_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceComplete_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceComplete_fp.h
new file mode 100644
index 000000000..9064c96a4
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceComplete_fp.h
@@ -0,0 +1,92 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: SequenceComplete_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SEQUENCECOMPLETE_FP_H
+#define SEQUENCECOMPLETE_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT sequenceHandle;
+ TPM2B_MAX_BUFFER buffer;
+ TPMI_RH_HIERARCHY hierarchy;
+} SequenceComplete_In;
+
+#define RC_SequenceComplete_sequenceHandle (TPM_RC_H + TPM_RC_1)
+#define RC_SequenceComplete_buffer (TPM_RC_P + TPM_RC_1)
+#define RC_SequenceComplete_hierarchy (TPM_RC_P + TPM_RC_2)
+
+
+typedef struct {
+ TPM2B_DIGEST result;
+ TPMT_TK_HASHCHECK validation;
+} SequenceComplete_Out;
+
+
+
+TPM_RC
+TPM2_SequenceComplete(
+ SequenceComplete_In *in, // IN: input parameter list
+ SequenceComplete_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceUpdate_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceUpdate_fp.h
new file mode 100644
index 000000000..dd094178a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SequenceUpdate_fp.h
@@ -0,0 +1,82 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: SequenceUpdate_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SEQUENCEUPDATE_FP_H
+#define SEQUENCEUPDATE_FP_H
+
+
+typedef struct {
+ TPMI_DH_OBJECT sequenceHandle;
+ TPM2B_MAX_BUFFER buffer;
+} SequenceUpdate_In;
+
+#define RC_SequenceUpdate_sequenceHandle (TPM_RC_P + TPM_RC_1)
+#define RC_SequenceUpdate_buffer (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_SequenceUpdate(
+ SequenceUpdate_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetAlgorithmSet_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetAlgorithmSet_fp.h
new file mode 100644
index 000000000..c352f4d74
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetAlgorithmSet_fp.h
@@ -0,0 +1,81 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: SetAlgorithmSet_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SETALGORITHMSET_FP_H
+#define SETALGORITHMSET_FP_H
+
+typedef struct {
+ TPMI_RH_PLATFORM authHandle;
+ UINT32 algorithmSet;
+} SetAlgorithmSet_In;
+
+#define RC_SetAlgorithmSet_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_SetAlgorithmSet_algorithmSet (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_SetAlgorithmSet(
+ SetAlgorithmSet_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetCommandCodeAuditStatus_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetCommandCodeAuditStatus_fp.h
new file mode 100644
index 000000000..1ddb50fbb
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetCommandCodeAuditStatus_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: SetCommandCodeAuditStatus_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SETCOMMANDCODEAUDITSTATUS_FP_H
+#define SETCOMMANDCODEAUDITSTATUS_FP_H
+
+typedef struct {
+ TPMI_RH_PROVISION auth;
+ TPMI_ALG_HASH auditAlg;
+ TPML_CC setList;
+ TPML_CC clearList;
+} SetCommandCodeAuditStatus_In;
+
+#define RC_SetCommandCodeAuditStatus_auth (TPM_RC_H + TPM_RC_1)
+#define RC_SetCommandCodeAuditStatus_auditAlg (TPM_RC_P + TPM_RC_1)
+#define RC_SetCommandCodeAuditStatus_setList (TPM_RC_P + TPM_RC_2)
+#define RC_SetCommandCodeAuditStatus_clearList (TPM_RC_P + TPM_RC_3)
+
+TPM_RC
+TPM2_SetCommandCodeAuditStatus(
+ SetCommandCodeAuditStatus_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetPrimaryPolicy_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetPrimaryPolicy_fp.h
new file mode 100644
index 000000000..ea7ce050f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/SetPrimaryPolicy_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* TPM2_SetPrimaryPolicy Command Header */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012 - 2019 */
+/* */
+/********************************************************************************/
+
+#ifndef SETPRIMARYPOLICY_FP_H
+#define SETPRIMARYPOLICY_FP_H
+
+typedef struct {
+ TPMI_RH_HIERARCHY_POLICY authHandle;
+ TPM2B_DIGEST authPolicy;
+ TPMI_ALG_HASH hashAlg;
+} SetPrimaryPolicy_In;
+
+#define RC_SetPrimaryPolicy_authHandle (TPM_RC_H + TPM_RC_1)
+#define RC_SetPrimaryPolicy_authPolicy (TPM_RC_P + TPM_RC_1)
+#define RC_SetPrimaryPolicy_hashAlg (TPM_RC_P + TPM_RC_2)
+
+TPM_RC
+TPM2_SetPrimaryPolicy(
+ SetPrimaryPolicy_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Shutdown_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Shutdown_fp.h
new file mode 100644
index 000000000..51c6bc35f
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Shutdown_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Shutdown_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SHUTDOWN_FP_H
+#define SHUTDOWN_FP_H
+
+typedef struct{
+ TPM_SU shutdownType;
+} Shutdown_In;
+
+#define RC_Shutdown_shutdownType (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_Shutdown(
+ Shutdown_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign12_fp.h
new file mode 100644
index 000000000..dfaa238bf
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign12_fp.h
@@ -0,0 +1,65 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Sign12 */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Sign12_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef SIGN12_FP_H
+#define SIGN12_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_KEY_HANDLE keyHandle;
+ UINT32 areaToSignSize;
+ BYTE areaToSign[MAX_COMMAND_SIZE];
+} Sign12_In;
+
+typedef struct {
+ UINT32 sigSize;
+ BYTE sig[MAX_RSA_KEY_BYTES];
+} Sign12_Out;
+
+TPM_RC
+TPM2_Sign12(
+ Sign12_In *in, // IN: input parameter buffer
+ Sign12_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign_fp.h
new file mode 100644
index 000000000..41feb75d3
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Sign_fp.h
@@ -0,0 +1,89 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Sign_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef SIGN_FP_H
+#define SIGN_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_DIGEST digest;
+ TPMT_SIG_SCHEME inScheme;
+ TPMT_TK_HASHCHECK validation;
+} Sign_In;
+
+#define RC_Sign_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_Sign_digest (TPM_RC_P + TPM_RC_1)
+#define RC_Sign_inScheme (TPM_RC_P + TPM_RC_2)
+#define RC_Sign_validation (TPM_RC_P + TPM_RC_3)
+
+typedef struct {
+ TPMT_SIGNATURE signature;
+} Sign_Out;
+
+TPM_RC
+TPM2_Sign(
+ Sign_In *in, // IN: input parameter list
+ Sign_Out *out // OUT: output parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StartAuthSession_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StartAuthSession_fp.h
new file mode 100644
index 000000000..03e8bb02e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StartAuthSession_fp.h
@@ -0,0 +1,97 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: StartAuthSession_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef STARTAUTHSESSION_FP_H
+#define STARTAUTHSESSION_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT tpmKey;
+ TPMI_DH_ENTITY bind;
+ TPM2B_NONCE nonceCaller;
+ TPM2B_ENCRYPTED_SECRET encryptedSalt;
+ TPM_SE sessionType;
+ TPMT_SYM_DEF symmetric;
+ TPMI_ALG_HASH authHash;
+} StartAuthSession_In;
+
+typedef struct {
+ TPMI_SH_AUTH_SESSION sessionHandle;
+ TPM2B_NONCE nonceTPM;
+} StartAuthSession_Out;
+
+#define RC_StartAuthSession_tpmKey (TPM_RC_H + TPM_RC_1)
+#define RC_StartAuthSession_bind (TPM_RC_H + TPM_RC_2)
+#define RC_StartAuthSession_nonceCaller (TPM_RC_P + TPM_RC_1)
+#define RC_StartAuthSession_encryptedSalt (TPM_RC_P + TPM_RC_2)
+#define RC_StartAuthSession_sessionType (TPM_RC_P + TPM_RC_3)
+#define RC_StartAuthSession_symmetric (TPM_RC_P + TPM_RC_4)
+#define RC_StartAuthSession_authHash (TPM_RC_P + TPM_RC_5)
+
+TPM_RC
+TPM2_StartAuthSession(
+ StartAuthSession_In *in, // IN: input parameter buffer
+ StartAuthSession_Out *out // OUT: output parameter buffer
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup12_fp.h
new file mode 100644
index 000000000..4247810f9
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup12_fp.h
@@ -0,0 +1,50 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Startup12_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018 */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef STARTUP12_FP_H
+#define STARTUP12_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+
+typedef struct {
+ TPM_STARTUP_TYPE startupType;
+} Startup12_In;
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup_fp.h
new file mode 100644
index 000000000..c5e409fef
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Startup_fp.h
@@ -0,0 +1,84 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Startup_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef STARTUP_FP_H
+#define STARTUP_FP_H
+
+void
+_TPM_Init(
+ void
+ );
+
+
+typedef struct {
+ TPM_SU startupType;
+} Startup_In;
+
+#define RC_Startup_startupType (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_Startup(
+ Startup_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StirRandom_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StirRandom_fp.h
new file mode 100644
index 000000000..bbfc411ae
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/StirRandom_fp.h
@@ -0,0 +1,78 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: StirRandom_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef STIRRANDOM_FP_H
+#define STIRRANDOM_FP_H
+
+typedef struct {
+ TPM2B_SENSITIVE_DATA inData;
+} StirRandom_In;
+
+#define RC_StirRandom_inData (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_StirRandom(
+ StirRandom_In *in // IN: input parameter list
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPMB.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPMB.h
new file mode 100644
index 000000000..ff1539004
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPMB.h
@@ -0,0 +1,104 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: TPMB.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2016 */
+/* */
+/********************************************************************************/
+
+#ifndef TPMB_H
+#define TPMB_H
+
+/* 5.20 TPMB.h */
+/* This file contains extra TPM2B structures */
+#ifndef _TPMB_H
+#define _TPMB_H
+/* TPM2B Types */
+typedef struct {
+ UINT16 size;
+ BYTE buffer[1];
+} TPM2B, *P2B;
+typedef const TPM2B *PC2B;
+/* This macro helps avoid having to type in the structure in order to create a new TPM2B type that
+ is used in a function. */
+#define TPM2B_TYPE(name, bytes) \
+ typedef union { \
+ struct { \
+ UINT16 size; \
+ BYTE buffer[(bytes)]; \
+ } t; \
+ TPM2B b; \
+ } TPM2B_##name
+/* This macro defines a TPM2B with a constant character value. This macro sets the size of the
+ string to the size minus the terminating zero byte. This lets the user of the label add their
+ terminating 0. This method is chosen so that existing code that provides a label will continue to
+ work correctly. */
+#define TPM2B_STRING(name, value) \
+ static const union { \
+ struct { \
+ UINT16 size; \
+ BYTE buffer[sizeof(value)]; \
+ } t; \
+ TPM2B b; \
+ } name##_ = {{sizeof(value), {value}}}; \
+ const TPM2B *name = &name##_.b
+/* Macro to to instance and initialize a TPM2B value */
+#define TPM2B_INIT(TYPE, name) \
+ TPM2B_##TYPE name = {sizeof(name.t.buffer), {0}}
+#define TPM2B_BYTE_VALUE(bytes) TPM2B_TYPE(bytes##_BYTE_VALUE, bytes)
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPM_Types.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPM_Types.h
new file mode 100644
index 000000000..855a3cd66
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TPM_Types.h
@@ -0,0 +1,2825 @@
+/********************************************************************************/
+/* */
+/* Headers from Part 2 */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012 - 2019 */
+/* */
+/********************************************************************************/
+
+/* rev 124 */
+
+#ifndef _TPM_TYPES_H
+#define _TPM_TYPES_H
+
+#include <stdint.h>
+
+#include <ibmtss/Implementation.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ The C bit field is non-portable, but the TPM specification reference implementation uses them.
+
+ These two macros attempt to define the TPM specification bit fields for little and big endian
+ machines. There is no guarantee that either will work with a specific compiler or tool chain. If
+ not, the developer must create a custom structure.
+
+ TPM_BITFIELD_LE - little endian
+ TPM_BITFIELD_BE - big endian
+
+ To access the structures as uint's for marshaling and unmarshaling, each bit field is a union with
+ an integral field called 'val'.
+
+ Yes, I know that this uses anonymous structs, but the alternative yields another level of
+ deferencing, and will likely break more code. I hope your compiler supports this recent addition
+ to the standard.
+
+ For portable code:
+
+ If neither macro is defined, this header defines the structures as uint32_t. It defines constants
+ for the various bits, and can be used as:
+
+ variable & CONSTANT (test for set)
+ !(variable & CONSTANT) (test for clear)
+ variable &= CONSTANT (to set)
+ variable |= ~CONSTANT (to clear)
+
+ Although the portable structures are all uint32_t, some only use the least significant 8 bits and
+ are marshalled as a uint_8t.
+*/
+
+/* Table 3 - Definition of Base Types */
+/* In BaseTypes.h */
+
+/* Table 4 - Defines for Logic Values */
+// In Table 39 (Yes, NO)
+/* In bool.h (TRUE, FALSE) */
+#define SET 1
+#define CLEAR 0
+
+/* Part 4 5.5 Capabilities.h */
+
+#define MAX_CAP_DATA (MAX_CAP_BUFFER-sizeof(TPM_CAP)-sizeof(UINT32))
+#define MAX_CAP_ALGS (MAX_CAP_DATA/sizeof(TPMS_ALG_PROPERTY))
+#define MAX_CAP_HANDLES (MAX_CAP_DATA/sizeof(TPM_HANDLE))
+#define MAX_CAP_CC (MAX_CAP_DATA/sizeof(TPM_CC))
+#define MAX_TPM_PROPERTIES (MAX_CAP_DATA/sizeof(TPMS_TAGGED_PROPERTY))
+#define MAX_PCR_PROPERTIES (MAX_CAP_DATA/sizeof(TPMS_TAGGED_PCR_SELECT))
+#define MAX_ECC_CURVES (MAX_CAP_DATA/sizeof(TPM_ECC_CURVE))
+#define MAX_TAGGED_POLICIES (MAX_CAP_DATA/sizeof(TPMS_TAGGED_POLICY))
+
+/* Table 5 - Definition of Types for Documentation Clarity */
+
+typedef UINT32 TPM_ALGORITHM_ID; /* this is the 1.2 compatible form of the TPM_ALG_ID */
+typedef UINT32 TPM_MODIFIER_INDICATOR;
+typedef UINT32 TPM_AUTHORIZATION_SIZE; /* the authorizationSize parameter in a command */
+typedef UINT32 TPM_PARAMETER_SIZE; /* the parameterSizeset parameter in a command */
+typedef UINT16 TPM_KEY_SIZE; /* a key size in octets */
+typedef UINT16 TPM_KEY_BITS; /* a key size in bits */
+
+/* Table 6 - Definition of (UINT32) TPM_SPEC Constants <> */
+
+typedef UINT32 TPM_SPEC;
+
+#define TPM_SPEC_FAMILY 0x322E3000 /* ASCII "2.0" with null terminator */
+#define TPM_SPEC_LEVEL 00 /* the level number for the specification */
+#define TPM_SPEC_VERSION 124 /* the version number of the spec (01.21 * 100) */
+#define TPM_SPEC_YEAR 2015 /* the year of the version */
+#define TPM_SPEC_DAY_OF_YEAR 191 /* the day of the year */
+
+
+/* Table 7 - Definition of (UINT32) TPM_GENERATED Constants <O> */
+
+typedef UINT32 TPM_GENERATED;
+
+#define TPM_GENERATED_VALUE 0xff544347 /* 0xFF 'TCG' (FF 54 43 47) */
+
+/* Table 9 - Definition of (UINT16) TPM_ALG_ID Constants <IN/OUT, S> */
+
+typedef UINT16 TPM_ALG_ID;
+
+/* Table 10 - Definition of (UINT16) {ECC} TPM_ECC_CURVE Constants <IN/OUT, S> */
+
+typedef UINT16 TPM_ECC_CURVE;
+
+/* Table 16 - Definition of (UINT32) TPM_RC Constants (Actions) <OUT> */
+
+typedef UINT32 TPM_RC;
+
+#define TPM_RC_SUCCESS 0x000
+#define TPM_RC_BAD_TAG 0x01E /* defined for compatibility with TPM 1.2 */
+
+#define RC_VER1 0x100 /* set for all format 0 response codes */
+
+#define TPM_RC_INITIALIZE (RC_VER1 + 0x000) /* TPM not initialized by TPM2_Startup or already initialized */
+#define TPM_RC_FAILURE (RC_VER1 + 0x001) /* commands not being accepted because of a TPM failure */
+#define TPM_RC_SEQUENCE (RC_VER1 + 0x003) /* improper use of a sequence handle */
+#define TPM_RC_PRIVATE (RC_VER1 + 0x00B) /* not currently used */
+#define TPM_RC_HMAC (RC_VER1 + 0x019) /* not currently used */
+#define TPM_RC_DISABLED (RC_VER1 + 0x020) /* the command is disabled */
+#define TPM_RC_EXCLUSIVE (RC_VER1 + 0x021) /* command failed because audit sequence required exclusivity */
+#define TPM_RC_AUTH_TYPE (RC_VER1 + 0x024) /* authorization handle is not correct for command */
+#define TPM_RC_AUTH_MISSING (RC_VER1 + 0x025) /* command requires an authorization session
+ for handle and it is not present. */
+#define TPM_RC_POLICY (RC_VER1 + 0x026) /* policy failure in math Operation or an invalid authPolicy value */
+#define TPM_RC_PCR (RC_VER1 + 0x027) /* PCR check fail */
+#define TPM_RC_PCR_CHANGED (RC_VER1 + 0x028) /* PCR have changed since checked. */
+#define TPM_RC_UPGRADE (RC_VER1 + 0x02D) /* for all commands other than
+ TPM2_FieldUpgradeData(), this code
+ indicates that the TPM is in field
+ upgrade mode */
+#define TPM_RC_TOO_MANY_CONTEXTS (RC_VER1 + 0x02E) /* context ID counter is at maximum. */
+#define TPM_RC_AUTH_UNAVAILABLE (RC_VER1 + 0x02F) /* authValue or authPolicy is not available for selected entity. */
+#define TPM_RC_REBOOT (RC_VER1 + 0x030) /* a _TPM_Init and Startup(CLEAR) is
+ required before the TPM can resume
+ operation. */
+#define TPM_RC_UNBALANCED (RC_VER1 + 0x031) /* the protection algorithms (hash and
+ symmetric) are not reasonably balanced */
+#define TPM_RC_COMMAND_SIZE (RC_VER1 + 0x042) /* command commandSize value is inconsistent
+ with contents of the command buffer */
+#define TPM_RC_COMMAND_CODE (RC_VER1 + 0x043) /* command code not supported */
+#define TPM_RC_AUTHSIZE (RC_VER1 + 0x044) /* the value of authorizationSize is out of range */
+#define TPM_RC_AUTH_CONTEXT (RC_VER1 + 0x045) /* use of an authorization session with a
+ context command or another command that
+ cannot have an authorization session.*/
+#define TPM_RC_NV_RANGE (RC_VER1 + 0x046) /* NV offset+size is out of range. */
+#define TPM_RC_NV_SIZE (RC_VER1 + 0x047) /* Requested allocation size is larger than allowed. */
+#define TPM_RC_NV_LOCKED (RC_VER1 + 0x048) /* NV access locked. */
+#define TPM_RC_NV_AUTHORIZATION (RC_VER1 + 0x049) /* NV access authorization fails in command
+ actions (this failure does not affect
+ lockout.action) */
+#define TPM_RC_NV_UNINITIALIZED (RC_VER1 + 0x04A) /* an NV Index is used before being
+ initialized or the state saved by
+ TPM2_Shutdown(STATE) could not be
+ restored */
+#define TPM_RC_NV_SPACE (RC_VER1 + 0x04B) /* insufficient space for NV allocation */
+#define TPM_RC_NV_DEFINED (RC_VER1 + 0x04C) /* NV Index or persistent object already defined */
+#define TPM_RC_BAD_CONTEXT (RC_VER1 + 0x050) /* context in TPM2_ContextLoad() is not valid */
+#define TPM_RC_CPHASH (RC_VER1 + 0x051) /* cpHash value already set or not correct for use */
+#define TPM_RC_PARENT (RC_VER1 + 0x052) /* handle for parent is not a valid parent */
+#define TPM_RC_NEEDS_TEST (RC_VER1 + 0x053) /* some function needs testing. */
+#define TPM_RC_NO_RESULT (RC_VER1 + 0x054) /* returned when an internal function cannot
+ process a request due to an unspecified
+ problem. */
+#define TPM_RC_SENSITIVE (RC_VER1 + 0x055) /* the sensitive area did not unmarshal correctly after decryption */
+#define RC_MAX_FM0 (RC_VER1 + 0x07F) /* largest version 1 code that is not a warning */
+
+/* The codes in this group may have a value added to them to indicate the handle, session, or
+ parameter to which they apply. */
+
+#define RC_FMT1 0x080 /* This bit is SET in all format 1 response codes */
+
+#define TPM_RC_ASYMMETRIC (RC_FMT1 + 0x001) /* asymmetric algorithm not supported or not correct */
+#define TPM_RC_ATTRIBUTES (RC_FMT1 + 0x002) /* inconsistent attributes */
+#define TPM_RC_HASH (RC_FMT1 + 0x003) /* hash algorithm not supported or not appropriate */
+#define TPM_RC_VALUE (RC_FMT1 + 0x004) /* value is out of range or is not correct for the context */
+#define TPM_RC_HIERARCHY (RC_FMT1 + 0x005) /* hierarchy is not enabled or is not correct for the use */
+#define TPM_RC_KEY_SIZE (RC_FMT1 + 0x007) /* key size is not supported */
+#define TPM_RC_MGF (RC_FMT1 + 0x008) /* mask generation function not supported */
+#define TPM_RC_MODE (RC_FMT1 + 0x009) /* mode of operation not supported */
+#define TPM_RC_TYPE (RC_FMT1 + 0x00A) /* the type of the value is not appropriate for the use */
+#define TPM_RC_HANDLE (RC_FMT1 + 0x00B) /* the handle is not correct for the use */
+#define TPM_RC_KDF (RC_FMT1 + 0x00C) /* unsupported key derivation function or
+ function not appropriate for use */
+#define TPM_RC_RANGE (RC_FMT1 + 0x00D) /* value was out of allowed range. */
+#define TPM_RC_AUTH_FAIL (RC_FMT1 + 0x00E) /* the authorization HMAC check failed and DA counter incremented */
+#define TPM_RC_NONCE (RC_FMT1 + 0x00F) /* invalid nonce size or nonce value mismatch */
+#define TPM_RC_PP (RC_FMT1 + 0x010) /* authorization requires assertion of PP */
+#define TPM_RC_SCHEME (RC_FMT1 + 0x012) /* unsupported or incompatible scheme */
+#define TPM_RC_SIZE (RC_FMT1 + 0x015) /* structure is the wrong size */
+#define TPM_RC_SYMMETRIC (RC_FMT1 + 0x016) /* unsupported symmetric algorithm or key
+ size, or not appropriate for instance */
+#define TPM_RC_TAG (RC_FMT1 + 0x017) /* incorrect structure tag */
+#define TPM_RC_SELECTOR (RC_FMT1 + 0x018) /* union selector is incorrect */
+#define TPM_RC_INSUFFICIENT (RC_FMT1 + 0x01A) /* the TPM was unable to unmarshal a value
+ because there were not enough octets in
+ the input buffer */
+#define TPM_RC_SIGNATURE (RC_FMT1 + 0x01B) /* the signature is not valid */
+#define TPM_RC_KEY (RC_FMT1 + 0x01C) /* key fields are not compatible with the selected use */
+#define TPM_RC_POLICY_FAIL (RC_FMT1 + 0x01D) /* a policy check failed */
+#define TPM_RC_INTEGRITY (RC_FMT1 + 0x01F) /* integrity check failed */
+#define TPM_RC_TICKET (RC_FMT1 + 0x020) /* invalid ticket */
+#define TPM_RC_RESERVED_BITS (RC_FMT1 + 0x021) /* reserved bits not set to zero as required */
+#define TPM_RC_BAD_AUTH (RC_FMT1 + 0x022) /* authorization failure without DA implications */
+#define TPM_RC_EXPIRED (RC_FMT1 + 0x023) /* the policy has expired */
+#define TPM_RC_POLICY_CC (RC_FMT1 + 0x024) /* the commandCode in the policy is not the
+ commandCode of the command */
+#define TPM_RC_BINDING (RC_FMT1 + 0x025) /* public and sensitive portions of an
+ object are not cryptographically bound */
+#define TPM_RC_CURVE (RC_FMT1 + 0x026) /* curve not supported */
+#define TPM_RC_ECC_POINT (RC_FMT1 + 0x027) /* point is not on the required curve. */
+
+/* aliases for FMT1 commands when parameter number can be added */
+
+#define TPM_RCS_VALUE TPM_RC_VALUE
+#define TPM_RCS_TYPE TPM_RC_TYPE
+#define TPM_RCS_HANDLE TPM_RC_HANDLE
+#define TPM_RCS_SIZE TPM_RC_SIZE
+#define TPM_RCS_ATTRIBUTES TPM_RC_ATTRIBUTES
+#define TPM_RCS_NONCE TPM_RC_NONCE
+#define TPM_RCS_SYMMETRIC TPM_RC_SYMMETRIC
+#define TPM_RCS_MODE TPM_RC_MODE
+#define TPM_RCS_SCHEME TPM_RC_SCHEME
+#define TPM_RCS_KEY TPM_RC_KEY
+#define TPM_RCS_ECC_POINT TPM_RC_ECC_POINT
+#define TPM_RCS_HASH TPM_RC_HASH
+#define TPM_RCS_HIERARCHY TPM_RC_HIERARCHY
+#define TPM_RCS_TICKET TPM_RC_TICKET
+#define TPM_RCS_RANGE TPM_RC_RANGE
+#define TPM_RCS_INTEGRITY TPM_RC_INTEGRITY
+#define TPM_RCS_POLICY_CC TPM_RC_POLICY_CC
+#define TPM_RCS_EXPIRED TPM_RC_EXPIRED
+
+#define RC_WARN 0x900 /* set for warning response codes */
+
+#define TPM_RC_CONTEXT_GAP (RC_WARN + 0x001) /* gap for context ID is too large */
+#define TPM_RC_OBJECT_MEMORY (RC_WARN + 0x002) /* out of memory for object contexts */
+#define TPM_RC_SESSION_MEMORY (RC_WARN + 0x003) /* out of memory for session contexts */
+#define TPM_RC_MEMORY (RC_WARN + 0x004) /* out of shared object/session memory or
+ need space for internal operations */
+#define TPM_RC_SESSION_HANDLES (RC_WARN + 0x005) /* out of session handles - a session must
+ be flushed before a new session may be
+ created */
+#define TPM_RC_OBJECT_HANDLES (RC_WARN + 0x006) /* out of object handles - the handle space
+ for objects is depleted and a reboot is
+ required */
+#define TPM_RC_LOCALITY (RC_WARN + 0x007) /* bad locality */
+#define TPM_RC_YIELDED (RC_WARN + 0x008) /* the TPM has suspended operation on the
+ command; forward progress was made and
+ the command may be retried. */
+#define TPM_RC_CANCELED (RC_WARN + 0x009) /* the command was canceled */
+#define TPM_RC_CANCELLED TPM_RC_CANCELED
+#define TPM_RC_TESTING (RC_WARN + 0x00A) /* TPM is performing self-tests */
+#define TPM_RC_REFERENCE_H0 (RC_WARN + 0x010) /* the 1st handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_H1 (RC_WARN + 0x011) /* the 2nd handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_H2 (RC_WARN + 0x012) /* the 3rd handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_H3 (RC_WARN + 0x013) /* the 4th handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_H4 (RC_WARN + 0x014) /* the 5th handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_H5 (RC_WARN + 0x015) /* the 6th handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_H6 (RC_WARN + 0x016) /* the 7th handle in the handle area
+ references a transient object or session
+ that is not loaded */
+#define TPM_RC_REFERENCE_S0 (RC_WARN + 0x018) /* the 1st authorization session handle
+ references a session that is not
+ loaded */
+#define TPM_RC_REFERENCE_S1 (RC_WARN + 0x019) /* the 2nd authorization session handle
+ references a session that is not
+ loaded */
+#define TPM_RC_REFERENCE_S2 (RC_WARN + 0x01A) /* the 3rd authorization session handle
+ references a session that is not
+ loaded */
+#define TPM_RC_REFERENCE_S3 (RC_WARN + 0x01B) /* the 4th authorization session handle
+ references a session that is not
+ loaded */
+#define TPM_RC_REFERENCE_S4 (RC_WARN + 0x01C) /* the 5th session handle references a
+ session that is not loaded */
+#define TPM_RC_REFERENCE_S5 (RC_WARN + 0x01D) /* the 6th session handle references a session that is not loaded */
+#define TPM_RC_REFERENCE_S6 (RC_WARN + 0x01E) /* the 7th authorization session handle
+ references a session that is not
+ loaded */
+#define TPM_RC_NV_RATE (RC_WARN + 0x020) /* the TPM is rate-limiting accesses to prevent wearout of NV */
+#define TPM_RC_LOCKOUT (RC_WARN + 0x021) /* authorizations for objects subject to DA
+ protection are not allowed at this time
+ because the TPM is in DA lockout mode */
+#define TPM_RC_RETRY (RC_WARN + 0x022) /* the TPM was not able to start the command */
+#define TPM_RC_NV_UNAVAILABLE (RC_WARN + 0x023) /* the command may require writing of NV and
+ NV is not current accessible */
+#define TPM_RC_NOT_USED (RC_WARN + 0x07F) /* this value is reserved and shall not be returned by the TPM */
+
+#define TPM_RC_H 0x000 /* add to a handle-related error */
+#define TPM_RC_P 0x040 /* add to a parameter-related error */
+#define TPM_RC_S 0x800 /* add to a session-related error */
+#define TPM_RC_1 0x100 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_2 0x200 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_3 0x300 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_4 0x400 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_5 0x500 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_6 0x600 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_7 0x700 /* add to a parameter-, handle-, or session-related error */
+#define TPM_RC_8 0x800 /* add to a parameter-related error */
+#define TPM_RC_9 0x900 /* add to a parameter-related error */
+#define TPM_RC_A 0xA00 /* add to a parameter-related error */
+#define TPM_RC_B 0xB00 /* add to a parameter-related error */
+#define TPM_RC_C 0xC00 /* add to a parameter-related error */
+#define TPM_RC_D 0xD00 /* add to a parameter-related error */
+#define TPM_RC_E 0xE00 /* add to a parameter-related error */
+#define TPM_RC_F 0xF00 /* add to a parameter-related error */
+#define TPM_RC_N_MASK 0xF00 /* number mask */
+
+/* Table 17 - Definition of (INT8) TPM_CLOCK_ADJUST Constants <IN> */
+
+typedef INT8 TPM_CLOCK_ADJUST;
+
+#define TPM_CLOCK_COARSE_SLOWER -3 /* Slow the Clock update rate by one coarse adjustment step. */
+#define TPM_CLOCK_MEDIUM_SLOWER -2 /* Slow the Clock update rate by one medium adjustment step. */
+#define TPM_CLOCK_FINE_SLOWER -1 /* Slow the Clock update rate by one fine adjustment step. */
+#define TPM_CLOCK_NO_CHANGE 0 /* No change to the Clock update rate. */
+#define TPM_CLOCK_FINE_FASTER 1 /* Speed the Clock update rate by one fine adjustment step. */
+#define TPM_CLOCK_MEDIUM_FASTER 2 /* Speed the Clock update rate by one medium adjustment step. */
+#define TPM_CLOCK_COARSE_FASTER 3 /* Speed the Clock update rate by one coarse adjustment step. */
+
+/* Table 18 - Definition of (UINT16) TPM_EO Constants <IN/OUT> */
+
+typedef UINT16 TPM_EO;
+
+#define TPM_EO_EQ 0x0000 /* A = B */
+#define TPM_EO_NEQ 0x0001 /* A != B */
+#define TPM_EO_SIGNED_GT 0x0002 /* A > B signed */
+#define TPM_EO_UNSIGNED_GT 0x0003 /* A > B unsigned */
+#define TPM_EO_SIGNED_LT 0x0004 /* A < B signed */
+#define TPM_EO_UNSIGNED_LT 0x0005 /* A < B unsigned */
+#define TPM_EO_SIGNED_GE 0x0006 /* A = B signed */
+#define TPM_EO_UNSIGNED_GE 0x0007 /* A = B unsigned */
+#define TPM_EO_SIGNED_LE 0x0008 /* A = B signed */
+#define TPM_EO_UNSIGNED_LE 0x0009 /* A = B unsigned */
+#define TPM_EO_BITSET 0x000A /* All bits SET in B are SET in A. ((A&B)=B) */
+#define TPM_EO_BITCLEAR 0x000B /* All bits SET in B are CLEAR in A. ((A&B)=0) */
+
+/* Table 19 - Definition of (UINT16) TPM_ST Constants <IN/OUT, S> */
+
+typedef UINT16 TPM_ST;
+
+#define TPM_ST_RSP_COMMAND 0x00C4 /* tag value for a response */
+#define TPM_ST_NULL 0X8000 /* no structure type specified */
+#define TPM_ST_NO_SESSIONS 0x8001 /* command/response has no attached sessions*/
+#define TPM_ST_SESSIONS 0x8002 /* command/response has one or more attached sessions*/
+#define TPM_ST_ATTEST_NV 0x8014 /* tag for an attestation structure */
+#define TPM_ST_ATTEST_COMMAND_AUDIT 0x8015 /* tag for an attestation structure */
+#define TPM_ST_ATTEST_SESSION_AUDIT 0x8016 /* tag for an attestation structure */
+#define TPM_ST_ATTEST_CERTIFY 0x8017 /* tag for an attestation structure */
+#define TPM_ST_ATTEST_QUOTE 0x8018 /* tag for an attestation structure */
+#define TPM_ST_ATTEST_TIME 0x8019 /* tag for an attestation structure */
+#define TPM_ST_ATTEST_CREATION 0x801A /* tag for an attestation structure */
+#define TPM_ST_ATTEST_NV_DIGEST 0x801C /* tag for an attestation structure */
+#define TPM_ST_CREATION 0x8021 /* tag for a ticket type */
+#define TPM_ST_VERIFIED 0x8022 /* tag for a ticket type */
+#define TPM_ST_AUTH_SECRET 0x8023 /* tag for a ticket type */
+#define TPM_ST_HASHCHECK 0x8024 /* tag for a ticket type */
+#define TPM_ST_AUTH_SIGNED 0x8025 /* tag for a ticket type */
+#define TPM_ST_FU_MANIFEST 0x8029 /* tag for a structure describing a Field Upgrade Policy */
+
+/* Table 20 - Definition of (UINT16) TPM_SU Constants <IN> */
+
+typedef UINT16 TPM_SU;
+
+#define TPM_SU_CLEAR 0x0000 /* on TPM2_Startup(), indicates that the TPM should perform TPM Reset or TPM Restart */
+#define TPM_SU_STATE 0x0001 /* on TPM2_Startup(), indicates that the TPM should restore the
+ state saved by TPM2_Shutdown(TPM_SU_STATE) */
+/* Table 21 - Definition of (UINT8) TPM_SE Constants <IN> */
+
+typedef UINT8 TPM_SE;
+
+#define TPM_SE_HMAC 0x00
+#define TPM_SE_POLICY 0x01
+#define TPM_SE_TRIAL 0x03
+
+/* Table 22 - Definition of (UINT32) TPM_CAP Constants */
+
+typedef UINT32 TPM_CAP;
+
+#define TPM_CAP_FIRST 0x00000000 /* */
+#define TPM_CAP_ALGS 0x00000000 /* TPM_ALG_ID(1) TPML_ALG_PROPERTY */
+#define TPM_CAP_HANDLES 0x00000001 /* TPM_HANDLE TPML_HANDLE */
+#define TPM_CAP_COMMANDS 0x00000002 /* TPM_CC TPML_CCA */
+#define TPM_CAP_PP_COMMANDS 0x00000003 /* TPM_CC TPML_CC */
+#define TPM_CAP_AUDIT_COMMANDS 0x00000004 /* TPM_CC TPML_CC */
+#define TPM_CAP_PCRS 0x00000005 /* reserved TPML_PCR_SELECTION */
+#define TPM_CAP_TPM_PROPERTIES 0x00000006 /* TPM_PT TPML_TAGGED_TPM_PROPERTY */
+#define TPM_CAP_PCR_PROPERTIES 0x00000007 /* TPM_PT_PCR TPML_TAGGED_PCR_PROPERTY */
+#define TPM_CAP_ECC_CURVES 0x00000008 /* TPM_ECC_CURVE(1) TPML_ECC_CURVE */
+#define TPM_CAP_AUTH_POLICIES 0x00000009 /* TPML_TAGGED_POLICY */
+#define TPM_CAP_LAST 0x00000009 /* */
+#define TPM_CAP_VENDOR_PROPERTY 0x00000100 /* manufacturer specific manufacturer-specific values */
+
+/* Table 23 - Definition of (UINT32) TPM_PT Constants <IN/OUT, S> */
+
+typedef UINT32 TPM_PT;
+
+#define TPM_PT_NONE 0x00000000 /* indicates no property type */
+#define PT_GROUP 0x00000100 /* The number of properties in each group. */
+#define PT_FIXED (PT_GROUP * 1) /* the group of fixed properties returned as TPMS_TAGGED_PROPERTY */
+
+/* The values in this group are only changed due to a firmware change in the TPM. */
+
+#define TPM_PT_FAMILY_INDICATOR (PT_FIXED + 0) /* a 4-octet character string containing the
+ TPM Family value (TPM_SPEC_FAMILY) */
+#define TPM_PT_LEVEL (PT_FIXED + 1) /* the level of the specification */
+#define TPM_PT_REVISION (PT_FIXED + 2) /* the specification Revision times 100 */
+#define TPM_PT_DAY_OF_YEAR (PT_FIXED + 3) /* the specification day of year using TCG calendar */
+#define TPM_PT_YEAR (PT_FIXED + 4) /* the specification year using the CE */
+#define TPM_PT_MANUFACTURER (PT_FIXED + 5) /* the vendor ID unique to each TPM manufacturer */
+#define TPM_PT_VENDOR_STRING_1 (PT_FIXED + 6) /* the first four characters of the vendor ID string */
+#define TPM_PT_VENDOR_STRING_2 (PT_FIXED + 7) /* the second four characters of the vendor ID string */
+#define TPM_PT_VENDOR_STRING_3 (PT_FIXED + 8) /* the third four characters of the vendor ID string */
+#define TPM_PT_VENDOR_STRING_4 (PT_FIXED + 9) /* the fourth four characters of the vendor ID sting */
+#define TPM_PT_VENDOR_TPM_TYPE (PT_FIXED + 10) /* vendor-defined value indicating the TPM model */
+#define TPM_PT_FIRMWARE_VERSION_1 (PT_FIXED + 11) /* the most-significant 32 bits of a TPM
+ vendor-specific value indicating the
+ version number of the firmware */
+#define TPM_PT_FIRMWARE_VERSION_2 (PT_FIXED + 12) /* the least-significant 32 bits of a TPM
+ vendor-specific value indicating the
+ version number of the firmware */
+#define TPM_PT_INPUT_BUFFER (PT_FIXED + 13) /* the maximum size of a parameter
+ (typically, a TPM2B_MAX_BUFFER) */
+#define TPM_PT_HR_TRANSIENT_MIN (PT_FIXED + 14) /* the minimum number of transient objects
+ that can be held in TPM RAM */
+#define TPM_PT_HR_PERSISTENT_MIN (PT_FIXED + 15) /* the minimum number of persistent objects
+ that can be held in TPM NV memory */
+#define TPM_PT_HR_LOADED_MIN (PT_FIXED + 16) /* the minimum number of authorization
+ sessions that can be held in TPM RAM */
+#define TPM_PT_ACTIVE_SESSIONS_MAX (PT_FIXED + 17) /* the number of authorization sessions that
+ may be active at a time */
+#define TPM_PT_PCR_COUNT (PT_FIXED + 18) /* the number of PCR implemented */
+#define TPM_PT_PCR_SELECT_MIN (PT_FIXED + 19) /* the minimum number of octets in a
+ TPMS_PCR_SELECT.sizeOfSelect */
+#define TPM_PT_CONTEXT_GAP_MAX (PT_FIXED + 20) /* the maximum allowed difference (unsigned)
+ between the contextID values of two saved
+ session contexts */
+#define TPM_PT_NV_COUNTERS_MAX (PT_FIXED + 22) /* the maximum number of NV Indexes that are
+ allowed to have TPM_NV_COUNTER attribute SET */
+#define TPM_PT_NV_INDEX_MAX (PT_FIXED + 23) /* the maximum size of an NV Index data area */
+#define TPM_PT_MEMORY (PT_FIXED + 24) /* a TPMA_MEMORY indicating the memory
+ management method for the TPM */
+#define TPM_PT_CLOCK_UPDATE (PT_FIXED + 25) /* interval, in milliseconds, between
+ updates to the copy of
+ TPMS_CLOCK_INFO.clock in NV */
+#define TPM_PT_CONTEXT_HASH (PT_FIXED + 26) /* the algorithm used for the integrity HMAC
+ on saved contexts and for hashing the
+ fuData of TPM2_FirmwareRead() */
+#define TPM_PT_CONTEXT_SYM (PT_FIXED + 27) /* TPM_ALG_ID, the algorithm used for
+ encryption of saved contexts */
+#define TPM_PT_CONTEXT_SYM_SIZE (PT_FIXED + 28) /* TPM_KEY_BITS, the size of the key used
+ for encryption of saved contexts */
+#define TPM_PT_ORDERLY_COUNT (PT_FIXED + 29) /* the modulus - 1 of the count for NV
+ update of an orderly counter */
+#define TPM_PT_MAX_COMMAND_SIZE (PT_FIXED + 30) /* the maximum value for commandSize in a command */
+#define TPM_PT_MAX_RESPONSE_SIZE (PT_FIXED + 31) /* the maximum value for responseSize in a response */
+#define TPM_PT_MAX_DIGEST (PT_FIXED + 32) /* the maximum size of a digest that can be
+ produced by the TPM */
+#define TPM_PT_MAX_OBJECT_CONTEXT (PT_FIXED + 33) /* the maximum size of an object context
+ that will be returned by
+ TPM2_ContextSave */
+#define TPM_PT_MAX_SESSION_CONTEXT (PT_FIXED + 34) /* the maximum size of a session context
+ that will be returned by
+ TPM2_ContextSave */
+#define TPM_PT_PS_FAMILY_INDICATOR (PT_FIXED + 35) /* platform-specific family (a TPM_PS
+ value)(see Table 26) */
+#define TPM_PT_PS_LEVEL (PT_FIXED + 36) /* the level of the platform-specific specification */
+#define TPM_PT_PS_REVISION (PT_FIXED + 37) /* the specification Revision times 100 for
+ the platform-specific specification */
+#define TPM_PT_PS_DAY_OF_YEAR (PT_FIXED + 38) /* the platform-specific specification day
+ of year using TCG calendar */
+#define TPM_PT_PS_YEAR (PT_FIXED + 39) /* the platform-specific specification year
+ using the CE */
+#define TPM_PT_SPLIT_MAX (PT_FIXED + 40) /* the number of split signing operations
+ supported by the TPM */
+#define TPM_PT_TOTAL_COMMANDS (PT_FIXED + 41) /* total number of commands implemented in the TPM */
+#define TPM_PT_LIBRARY_COMMANDS (PT_FIXED + 42) /* number of commands from the TPM library
+ that are implemented */
+#define TPM_PT_VENDOR_COMMANDS (PT_FIXED + 43) /* number of vendor commands that are implemented */
+#define TPM_PT_NV_BUFFER_MAX (PT_FIXED + 44) /* the maximum data size in one NV write command */
+#define TPM_PT_MODES (PT_FIXED + 45) /* a TPMA_MODES value, indicating that the
+ TPM is designed for these modes. */
+#define TPM_PT_MAX_CAP_BUFFER (PT_FIXED + 46) /* the maximum size of a
+ TPMS_CAPABILITY_DATA structure returned
+ in TPM2_GetCapability(). */
+#define PT_VAR (PT_GROUP * 2) /* the group of variable properties returned
+ as TPMS_TAGGED_PROPERTY */
+
+/* The properties in this group change because of a Protected Capability other than a firmware
+ update. The values are not necessarily persistent across all power transitions. */
+
+#define TPM_PT_PERMANENT (PT_VAR + 0) /* TPMA_PERMANENT */
+#define TPM_PT_STARTUP_CLEAR (PT_VAR + 1) /* TPMA_STARTUP_CLEAR */
+#define TPM_PT_HR_NV_INDEX (PT_VAR + 2) /* the number of NV Indexes currently defined */
+#define TPM_PT_HR_LOADED (PT_VAR + 3) /* the number of authorization sessions
+ currently loaded into TPM RAM */
+#define TPM_PT_HR_LOADED_AVAIL (PT_VAR + 4) /* the number of additional authorization
+ sessions, of any type, that could be
+ loaded into TPM RAM */
+#define TPM_PT_HR_ACTIVE (PT_VAR + 5) /* the number of active authorization
+ sessions currently being tracked by the
+ TPM */
+#define TPM_PT_HR_ACTIVE_AVAIL (PT_VAR + 6) /* the number of additional authorization
+ sessions, of any type, that could be
+ created */
+#define TPM_PT_HR_TRANSIENT_AVAIL (PT_VAR + 7) /* estimate of the number of additional
+ transient objects that could be loaded
+ into TPM RAM */
+#define TPM_PT_HR_PERSISTENT (PT_VAR + 8) /* the number of persistent objects
+ currently loaded into TPM NV memory */
+#define TPM_PT_HR_PERSISTENT_AVAIL (PT_VAR + 9) /* the number of additional persistent
+ objects that could be loaded into NV
+ memory */
+#define TPM_PT_NV_COUNTERS (PT_VAR + 10) /* the number of defined NV Indexes that
+ have the NV TPM_NV_COUNTER attribute SET */
+#define TPM_PT_NV_COUNTERS_AVAIL (PT_VAR + 11) /* the number of additional NV Indexes that
+ can be defined with their TPM_NT of TPM_NV_COUNTER
+ and the TPM_NV_ORDERLY attribute SET */
+#define TPM_PT_ALGORITHM_SET (PT_VAR + 12) /* code that limits the algorithms that may
+ be used with the TPM */
+#define TPM_PT_LOADED_CURVES (PT_VAR + 13) /* the number of loaded ECC curves */
+#define TPM_PT_LOCKOUT_COUNTER (PT_VAR + 14) /* the current value of the lockout counter (failedTries) */
+#define TPM_PT_MAX_AUTH_FAIL (PT_VAR + 15) /* the number of authorization failures
+ before DA lockout is invoked */
+#define TPM_PT_LOCKOUT_INTERVAL (PT_VAR + 16) /* the number of seconds before the value
+ reported by TPM_PT_LOCKOUT_COUNTER is
+ decremented */
+#define TPM_PT_LOCKOUT_RECOVERY (PT_VAR + 17) /* the number of seconds after a lockoutAuth
+ failure before use of lockoutAuth may be
+ attempted again */
+#define TPM_PT_NV_WRITE_RECOVERY (PT_VAR + 18) /* number of milliseconds before the TPM
+ will accept another command that will
+ modify NV */
+#define TPM_PT_AUDIT_COUNTER_0 (PT_VAR + 19) /* the high-order 32 bits of the command audit counter */
+#define TPM_PT_AUDIT_COUNTER_1 (PT_VAR + 20) /* the low-order 32 bits of the command audit counter */
+
+/* Table 24 - Definition of (UINT32) TPM_PT_PCR Constants <IN/OUT, S> */
+
+typedef UINT32 TPM_PT_PCR;
+
+#define TPM_PT_PCR_FIRST 0x00000000 /* bottom of the range of TPM_PT_PCR properties */
+#define TPM_PT_PCR_SAVE 0x00000000 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR is saved and restored by TPM_SU_STATE */
+#define TPM_PT_PCR_EXTEND_L0 0x00000001 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be extended from locality 0 */
+#define TPM_PT_PCR_RESET_L0 0x00000002 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be reset by TPM2_PCR_Reset() from
+ locality 0 */
+#define TPM_PT_PCR_EXTEND_L1 0x00000003 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be extended from locality 1 */
+#define TPM_PT_PCR_RESET_L1 0x00000004 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be reset by TPM2_PCR_Reset() from
+ locality 1 */
+#define TPM_PT_PCR_EXTEND_L2 0x00000005 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be extended from locality 2 */
+#define TPM_PT_PCR_RESET_L2 0x00000006 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be reset by TPM2_PCR_Reset() from
+ locality 2 */
+#define TPM_PT_PCR_EXTEND_L3 0x00000007 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be extended from locality 3 */
+#define TPM_PT_PCR_RESET_L3 0x00000008 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be reset by TPM2_PCR_Reset() from
+ locality 3 */
+#define TPM_PT_PCR_EXTEND_L4 0x00000009 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be extended from locality 4 */
+#define TPM_PT_PCR_RESET_L4 0x0000000A /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be reset by TPM2_PCR_Reset() from
+ locality 4 */
+#define TPM_PT_PCR_NO_INCREMENT 0x00000011 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ modifications to this PCR (reset or Extend) will
+ not increment the pcrUpdateCounter */
+#define TPM_PT_PCR_RESET_L4 0x0000000A /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR may be reset by TPM2_PCR_Reset() from
+ locality 4 */
+#define TPM_PT_PCR_DRTM_RESET 0x00000012 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR is reset by a DRTM event */
+#define TPM_PT_PCR_POLICY 0x00000013 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR is controlled by policy */
+#define TPM_PT_PCR_AUTH 0x00000014 /* a SET bit in the TPMS_PCR_SELECT indicates that
+ the PCR is controlled by an authorization
+ value */
+#define TPM_PT_PCR_LAST 0x00000014 /* top of the range of TPM_PT_PCR properties of the
+ implementation */
+
+/* Table 25 - Definition of (UINT32) TPM_PS Constants <OUT> */
+
+typedef UINT32 TPM_PS;
+
+#define TPM_PS_MAIN 0x00000000 /* not platform specific */
+#define TPM_PS_PC 0x00000001 /* PC Client */
+#define TPM_PS_PDA 0x00000002 /* PDA (includes all mobile devices that are not
+ specifically cell phones) */
+#define TPM_PS_CELL_PHONE 0x00000003 /* Cell Phone */
+#define TPM_PS_SERVER 0x00000004 /* Server WG */
+#define TPM_PS_PERIPHERAL 0x00000005 /* Peripheral WG */
+#define TPM_PS_TSS 0x00000006 /* TSS WG */
+#define TPM_PS_STORAGE 0x00000007 /* Storage WG */
+#define TPM_PS_AUTHENTICATION 0x00000008 /* Authentication WG */
+#define TPM_PS_EMBEDDED 0x00000009 /* Embedded WG */
+#define TPM_PS_HARDCOPY 0x0000000A /* Hardcopy WG */
+#define TPM_PS_INFRASTRUCTURE 0x0000000B /* Infrastructure WG */
+#define TPM_PS_VIRTUALIZATION 0x0000000C /* Virtualization WG */
+#define TPM_PS_TNC 0x0000000D /* Trusted Network Connect WG */
+#define TPM_PS_MULTI_TENANT 0x0000000E /* Multi-tenant WG */
+#define TPM_PS_TC 0x0000000F /* Technical Committee*/
+
+/* Table 26 - Definition of Types for Handles */
+
+typedef UINT32 TPM_HANDLE; /* Handles may refer to objects (keys or data blobs), authorization
+ sessions (HMAC and policy), NV Indexes, permanent TPM locations,
+ and PCR. */
+
+/* Table 27 - Definition of (UINT8) TPM_HT Constants <S> */
+
+typedef UINT8 TPM_HT;
+
+#define TPM_HT_PCR 0x00 /* PCR - consecutive numbers, starting at 0, that reference the PCR registers */
+#define TPM_HT_NV_INDEX 0x01 /* NV Index - assigned by the caller */
+#define TPM_HT_HMAC_SESSION 0x02 /* HMAC Authorization Session - assigned by the TPM when the session is created */
+#define TPM_HT_LOADED_SESSION 0x02 /* Loaded Authorization Session - used only in the context of TPM2_GetCapability */
+#define TPM_HT_POLICY_SESSION 0x03 /* Policy Authorization Session - assigned by the TPM when the session is created */
+#define TPM_HT_SAVED_SESSION 0x03 /* Saved Authorization Session - used only in the context of TPM2_GetCapability */
+#define TPM_HT_PERMANENT 0x40 /* Permanent Values - assigned by this specification in Table 27 */
+#define TPM_HT_TRANSIENT 0x80 /* Transient Objects - assigned by the TPM when an object is
+ loaded into transient-object memory or when a persistent
+ object is converted to a transient object */
+#define TPM_HT_PERSISTENT 0x81 /* Persistent Objects - assigned by the TPM when a loaded
+ transient object is made persistent */
+
+/* Table 28 - Definition of (TPM_HANDLE) TPM_RH Constants <S> */
+
+typedef TPM_HANDLE TPM_RH;
+
+#define TPM_RH_FIRST 0x40000000 /* R */
+#define TPM_RH_SRK 0x40000000 /* R not used1 */
+#define TPM_RH_OWNER 0x40000001 /* K, A, P handle references the Storage Primary
+ Seed (SPS), the ownerAuth, and the ownerPolicy */
+#define TPM_RH_REVOKE 0x40000002 /* R not used1 */
+#define TPM_RH_TRANSPORT 0x40000003 /* R not used1 */
+#define TPM_RH_OPERATOR 0x40000004 /* R not used1 */
+#define TPM_RH_ADMIN 0x40000005 /* R not used1 */
+#define TPM_RH_EK 0x40000006 /* R not used1 */
+#define TPM_RH_NULL 0x40000007 /* K, A, P a handle associated with the null
+ hierarchy, an EmptyAuth authValue, and an Empty
+ Policy authPolicy. */
+#define TPM_RH_UNASSIGNED 0x40000008 /* R value reserved to the TPM to indicate a handle
+ location that has not been initialized or
+ assigned */
+#define TPM_RS_PW 0x40000009 /* S authorization value used to indicate a password
+ authorization session */
+#define TPM_RH_LOCKOUT 0x4000000A /* A references the authorization associated with
+ the dictionary attack lockout reset */
+#define TPM_RH_ENDORSEMENT 0x4000000B /* K, A, P references the Endorsement Primary Seed
+ (EPS), endorsementAuth, and endorsementPolicy */
+#define TPM_RH_PLATFORM 0x4000000C /* K, A, P references the Platform Primary Seed
+ (PPS), platformAuth, and platformPolicy */
+#define TPM_RH_PLATFORM_NV 0x4000000D /* C for phEnableNV */
+#define TPM_RH_AUTH_00 0x40000010 /* A Start of a range of authorization values that
+ are vendor-specific. A TPM may support any of
+ the values in this range as are needed for
+ vendor-specific purposes. Disabled if ehEnable is CLEAR. */
+#define TPM_RH_AUTH_FF 0x4000010F /* A End of the range of vendor-specific
+ authorization values. */
+#define TPM_RH_LAST 0x4000010F /* R the top of the reserved handle area */
+
+/* Table 29 - Definition of (TPM_HANDLE) TPM_HC Constants <S> */
+
+typedef TPM_HANDLE TPM_HC;
+#define HR_HANDLE_MASK 0x00FFFFFF /* to mask off the HR */
+#define HR_RANGE_MASK 0xFF000000 /* to mask off the variable part */
+#define HR_SHIFT 24
+#define HR_PCR ((TPM_HT_PCR) << HR_SHIFT)
+#define HR_HMAC_SESSION (TPM_HT_HMAC_SESSION << HR_SHIFT)
+#define HR_POLICY_SESSION (TPM_HT_POLICY_SESSION << HR_SHIFT)
+#define HR_TRANSIENT (TPM_HC)((((UINT32)TPM_HT_TRANSIENT) << HR_SHIFT))
+#define HR_PERSISTENT (TPM_HC)((((UINT32)TPM_HT_PERSISTENT) << HR_SHIFT))
+#define HR_NV_INDEX (TPM_HT_NV_INDEX << HR_SHIFT)
+#define HR_PERMANENT (TPM_HT_PERMANENT << HR_SHIFT)
+#define PCR_FIRST (HR_PCR + 0) /* first PCR */
+#define PCR_LAST (HR_PCR | HR_HANDLE_MASK) /* last PCR in range */
+#define HMAC_SESSION_FIRST (HR_HMAC_SESSION + 0) /* first HMAC session */
+#define HMAC_SESSION_LAST (HMAC_SESSION_FIRST | HR_HANDLE_MASK) /* last HMAC session */
+#define LOADED_SESSION_FIRST HMAC_SESSION_FIRST /* used in GetCapability */
+#define LOADED_SESSION_LAST HMAC_SESSION_LAST /* used in GetCapability */
+#define POLICY_SESSION_FIRST (HR_POLICY_SESSION + 0) /* first policy session */
+#define POLICY_SESSION_LAST (POLICY_SESSION_FIRST | HR_HANDLE_MASK) /* last policy session */
+#define TRANSIENT_FIRST ((UINT32)(HR_TRANSIENT + 0)) /* first transient object */
+#define ACTIVE_SESSION_FIRST POLICY_SESSION_FIRST /* used in GetCapability */
+#define ACTIVE_SESSION_LAST POLICY_SESSION_LAST /* used in GetCapability */
+#define TRANSIENT_LAST ((UINT32)(TRANSIENT_FIRST | HR_HANDLE_MASK)) /* last transient object */
+#define PERSISTENT_FIRST ((UINT32)(HR_PERSISTENT + 0)) /* first persistent object */
+#define PERSISTENT_LAST ((UINT32)(PERSISTENT_FIRST | HR_HANDLE_MASK)) /* last persistent object */
+#define PLATFORM_PERSISTENT (PERSISTENT_FIRST + 0x00800000) /* first platform persistent object */
+#define NV_INDEX_FIRST (HR_NV_INDEX + 0) /* first allowed NV Index */
+#define NV_INDEX_LAST (NV_INDEX_FIRST | HR_HANDLE_MASK) /* last allowed NV Index */
+#define PERMANENT_FIRST TPM_RH_FIRST
+#define PERMANENT_LAST TPM_RH_LAST
+
+/* Table 30 - Definition of (UINT32) TPMA_ALGORITHM Bits */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int asymmetric : 1; /* 0 an asymmetric algorithm with public and private portions */
+ unsigned int symmetric : 1; /* 1 a symmetric block cipher */
+ unsigned int hash : 1; /* a hash algorithm */
+ unsigned int object : 1; /* an algorithm that may be used as an object type */
+ unsigned int Reserved1 : 4; /* 7:4 */
+ unsigned int signing : 1; /* 8 a signing algorithm */
+ unsigned int encrypting : 1; /* 9 an encryption/decryption algorithm */
+ unsigned int method : 1; /* 10 a method such as a key derivative function (KDF) */
+ unsigned int Reserved2 : 21; /* 31:11 */
+ };
+ UINT32 val;
+} TPMA_ALGORITHM;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Reserved2 : 21; /* 31:11 */
+ unsigned int method : 1; /* 10 a method such as a key derivative function (KDF) */
+ unsigned int encrypting : 1; /* 9 an encryption/decryption algorithm */
+ unsigned int signing : 1; /* 8 a signing algorithm */
+ unsigned int Reserved1 : 4; /* 7:4 */
+ unsigned int object : 1; /* an algorithm that may be used as an object type */
+ unsigned int hash : 1; /* a hash algorithm */
+ unsigned int symmetric : 1; /* 1 a symmetric block cipher */
+ unsigned int asymmetric : 1; /* 0 an asymmetric algorithm with public and private portions */
+ };
+ UINT32 val;
+} TPMA_ALGORITHM;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPMA_ALGORITHM;
+
+#endif
+
+#define TPMA_ALGORITHM_ASYMMETRIC 0x00000001
+#define TPMA_ALGORITHM_SYMMETRIC 0x00000002
+#define TPMA_ALGORITHM_HASH 0x00000004
+#define TPMA_ALGORITHM_OBJECT 0x00000008
+#define TPMA_ALGORITHM_RESERVED1 0x000000f0
+#define TPMA_ALGORITHM_SIGNING 0x00000100
+#define TPMA_ALGORITHM_ENCRYPTING 0x00000200
+#define TPMA_ALGORITHM_METHOD 0x00000400
+#define TPMA_ALGORITHM_RESERVED2 0xfffff800
+
+#define TPMA_ALGORITHM_RESERVED ( \
+ TPMA_ALGORITHM_RESERVED1 | \
+ TPMA_ALGORITHM_RESERVED2 )
+
+/* Table 31 - Definition of (UINT32) TPMA_OBJECT Bits */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int Reserved1 : 1; /* 0 shall be zero */
+ unsigned int fixedTPM : 1; /* 1 The hierarchy of the object, as indicated by its Qualified Name, may not change. */
+ unsigned int stClear : 1; /* 2 Previously saved contexts of this object may not be loaded after Startup(CLEAR). */
+ unsigned int Reserved2 : 1; /* 3 shall be zero */
+ unsigned int fixedParent : 1; /* 4 The parent of the object may not change. */
+ unsigned int sensitiveDataOrigin : 1; /* 5 the TPM generated all of the sensitive data other than the authValue. */
+ unsigned int userWithAuth : 1; /* 6 HMAC session or with a password */
+ unsigned int adminWithPolicy : 1; /* 7 policy session. */
+ unsigned int Reserved3 : 2; /* 9:8 shall be zero */
+ unsigned int noDA : 1; /* 10 The object is not subject to dictionary attack protections. */
+ unsigned int encryptedDuplication : 1; /* 11 */
+ unsigned int Reserved4 : 4; /* 15:12 shall be zero */
+ unsigned int restricted : 1; /* 16 Key usage is restricted to manipulate structures of known format */
+ unsigned int decrypt : 1; /* 17 The private portion of the key may be used to decrypt. */
+ unsigned int sign : 1; /* 18 For a symmetric cipher object, the private
+ portion of the key may be used to encrypt. For
+ other objects, the private portion of the key may
+ be used to sign. */
+ unsigned int Reserved5 : 13; /* 31:19 shall be zero */
+ };
+ UINT32 val;
+} TPMA_OBJECT;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Reserved5 : 13; /* 31:19 shall be zero */
+ unsigned int sign : 1; /* 18 For a symmetric cipher object, the private
+ portion of the key may be used to encrypt. For
+ other objects, the private portion of the key may
+ be used to sign. */
+ unsigned int decrypt : 1; /* 17 The private portion of the key may be used to decrypt. */
+ unsigned int restricted : 1; /* 16 Key usage is restricted to manipulate structures of known format */
+ unsigned int Reserved4 : 4; /* 15:12 shall be zero */
+ unsigned int encryptedDuplication : 1; /* 11 */
+ unsigned int noDA : 1; /* 10 The object is not subject to dictionary attack protections. */
+ unsigned int Reserved3 : 2; /* 9:8 shall be zero */
+ unsigned int adminWithPolicy : 1; /* 7 policy session. */
+ unsigned int userWithAuth : 1; /* 6 HMAC session or with a password */
+ unsigned int sensitiveDataOrigin : 1; /* 5 the TPM generated all of the sensitive data other than the authValue. */
+ unsigned int fixedParent : 1; /* 4 The parent of the object may not change. */
+ unsigned int Reserved2 : 1; /* 3 shall be zero */
+ unsigned int stClear : 1; /* 2 Previously saved contexts of this object may not be loaded after Startup(CLEAR). */
+ unsigned int fixedTPM : 1; /* 1 The hierarchy of the object, as indicated by its Qualified Name, may not change. */
+ unsigned int Reserved1 : 1; /* 0 shall be zero */
+ };
+ UINT32 val;
+} TPMA_OBJECT;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPMA_OBJECT;
+
+#endif
+
+#define TPMA_OBJECT_RESERVED1 0x00000001
+#define TPMA_OBJECT_FIXEDTPM 0x00000002
+#define TPMA_OBJECT_STCLEAR 0x00000004
+#define TPMA_OBJECT_RESERVED2 0x00000008
+#define TPMA_OBJECT_FIXEDPARENT 0x00000010
+#define TPMA_OBJECT_SENSITIVEDATAORIGIN 0x00000020
+#define TPMA_OBJECT_USERWITHAUTH 0x00000040
+#define TPMA_OBJECT_ADMINWITHPOLICY 0x00000080
+#define TPMA_OBJECT_RESERVED3 0x00000300
+#define TPMA_OBJECT_NODA 0x00000400
+#define TPMA_OBJECT_ENCRYPTEDDUPLICATION 0x00000800
+#define TPMA_OBJECT_RESERVED4 0x0000f000
+#define TPMA_OBJECT_RESTRICTED 0x00010000
+#define TPMA_OBJECT_DECRYPT 0x00020000
+#define TPMA_OBJECT_SIGN 0x00040000
+#define TPMA_OBJECT_RESERVED5 0xfff80000
+
+#define TPMA_OBJECT_RESERVED ( \
+ TPMA_OBJECT_RESERVED1 | \
+ TPMA_OBJECT_RESERVED2 | \
+ TPMA_OBJECT_RESERVED3 | \
+ TPMA_OBJECT_RESERVED4 | \
+ TPMA_OBJECT_RESERVED5 )
+
+/* Table 32 - Definition of (UINT8) TPMA_SESSION Bits <IN/OUT> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int continueSession : 1; /* 0 the session is to remain active after successful completion of the command */
+ unsigned int auditExclusive : 1; /* 1 executed if the session is exclusive at the start of the command */
+ unsigned int auditReset : 1; /* 2 audit digest of the session should be initialized */
+ unsigned int Reserved : 2; /* 4:3 shall be CLEAR */
+ unsigned int decrypt : 1; /* 5 first parameter in the command is symmetrically encrypted */
+ unsigned int encrypt : 1; /* 6 TPM should use this session to encrypt the first parameter in the response */
+ unsigned int audit : 1; /* 7 session is for audit */
+ };
+ UINT8 val;
+} TPMA_SESSION;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int audit : 1; /* 7 session is for audit */
+ unsigned int encrypt : 1; /* 6 TPM should use this session to encrypt the first parameter in the response */
+ unsigned int decrypt : 1; /* 5 first parameter in the command is symmetrically encrypted */
+ unsigned int Reserved : 2; /* 4:3 shall be CLEAR */
+ unsigned int auditReset : 1; /* 2 audit digest of the session should be initialized */
+ unsigned int auditExclusive : 1; /* 1 executed if the session is exclusive at the start of the command */
+ unsigned int continueSession : 1; /* 0 the session is to remain active after successful completion of the command */
+ };
+ UINT8 val;
+} TPMA_SESSION;
+
+#else
+
+typedef struct {
+ UINT8 val;
+} TPMA_SESSION;
+
+#endif
+
+#define TPMA_SESSION_CONTINUESESSION 0x01
+#define TPMA_SESSION_AUDITEXCLUSIVE 0x02
+#define TPMA_SESSION_AUDITRESET 0x04
+#define TPMA_SESSION_DECRYPT 0x20
+#define TPMA_SESSION_ENCRYPT 0x40
+#define TPMA_SESSION_AUDIT 0x80
+
+#define TPMA_SESSION_RESERVED 0x18
+
+/* Table 33 - Definition of (UINT8) TPMA_LOCALITY Bits <IN/OUT> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int TPM_LOC_ZERO : 1; /* 0 */
+ unsigned int TPM_LOC_ONE : 1; /* 1 */
+ unsigned int TPM_LOC_TWO : 1; /* 2 */
+ unsigned int TPM_LOC_THREE : 1; /* 3 */
+ unsigned int TPM_LOC_FOUR : 1; /* 4 */
+ unsigned int Extended : 3; /* 7:5 */
+ };
+ UINT8 val;
+} TPMA_LOCALITY;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Extended : 3; /* 7:5 */
+ unsigned int TPM_LOC_FOUR : 1; /* 4 */
+ unsigned int TPM_LOC_THREE : 1; /* 3 */
+ unsigned int TPM_LOC_TWO : 1; /* 2 */
+ unsigned int TPM_LOC_ONE : 1; /* 1 */
+ unsigned int TPM_LOC_ZERO : 1; /* 0 */
+ };
+ UINT8 val;
+} TPMA_LOCALITY;
+
+#else
+
+typedef struct {
+ UINT8 val;
+} TPMA_LOCALITY;
+
+#endif
+
+#define TPMA_LOCALITY_ZERO 0x01
+#define TPMA_LOCALITY_ONE 0x02
+#define TPMA_LOCALITY_TWO 0x04
+#define TPMA_LOCALITY_THREE 0x08
+#define TPMA_LOCALITY_FOUR 0x10
+#define TPMA_LOCALITY_EXTENDED 0xe0
+
+/* Table 34 - Definition of (UINT32) TPMA_PERMANENT Bits <OUT> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int ownerAuthSet : 1; /* 0 TPM2_HierarchyChangeAuth() with ownerAuth has been executed since the last TPM2_Clear(). */
+ unsigned int endorsementAuthSet : 1; /* 1 TPM2_HierarchyChangeAuth() with endorsementAuth has been executed since the last TPM2_Clear(). */
+ unsigned int lockoutAuthSet : 1; /* 2 TPM2_HierarchyChangeAuth() with lockoutAuth has been executed since the last TPM2_Clear(). */
+ unsigned int Reserved1 : 5; /* 7:3 */
+ unsigned int disableClear : 1; /* 8 TPM2_Clear() is disabled. */
+ unsigned int inLockout : 1; /* 9 The TPM is in lockout and commands that require authorization
+ with other than Platform Authorization or Lockout Authorization will not succeed. */
+ unsigned int tpmGeneratedEPS : 1; /* 10 The EPS was created by the TPM. */
+ unsigned int Reserved2 : 21; /* 31:11 */
+ };
+ UINT32 val;
+} TPMA_PERMANENT;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Reserved2 : 21; /* 31:11 */
+ unsigned int tpmGeneratedEPS : 1; /* 10 The EPS was created by the TPM. */
+ unsigned int inLockout : 1; /* 9 The TPM is in lockout and commands that require authorization with other than Platform Authorization will not succeed. */
+ unsigned int disableClear : 1; /* 8 TPM2_Clear() is disabled. */
+ unsigned int Reserved1 : 5; /* 7:3 */
+ unsigned int lockoutAuthSet : 1; /* 2 TPM2_HierarchyChangeAuth() with lockoutAuth has been executed since the last TPM2_Clear(). */
+ unsigned int endorsementAuthSet : 1; /* 1 TPM2_HierarchyChangeAuth() with endorsementAuth has been executed since the last TPM2_Clear(). */
+ unsigned int ownerAuthSet : 1; /* 0 TPM2_HierarchyChangeAuth() with ownerAuth has been executed since the last TPM2_Clear(). */
+ };
+ UINT32 val;
+} TPMA_PERMANENT;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPMA_PERMANENT;
+
+#endif
+
+#define TPMA_PERMANENT_OWNERAUTHSET 0x00000001
+#define TPMA_PERMANENT_ENDORSEMENTAUTHSET 0x00000002
+#define TPMA_PERMANENT_LOCKOUTAUTHSET 0x00000004
+#define TPMA_PERMANENT_RESERVED1 0x000000f8
+#define TPMA_PERMANENT_DISABLECLEAR 0x00000100
+#define TPMA_PERMANENT_INLOCKOUT 0x00000200
+#define TPMA_PERMANENT_TPMGENERATEDEPS 0x00000400
+#define TPMA_PERMANENT_RESERVED2 0xfffff800
+
+/* Table 35 - Definition of (UINT32) TPMA_STARTUP_CLEAR Bits <OUT> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int phEnable : 1; /* 0 The platform hierarchy is enabled and platformAuth or platformPolicy may be used for authorization. */
+ unsigned int shEnable : 1; /* 1 The Storage hierarchy is enabled and ownerAuth or ownerPolicy may be used for authorization. */
+ unsigned int ehEnable : 1; /* 2 The EPS hierarchy is enabled and endorsementAuth may be used to authorize commands. */
+ unsigned int phEnableNV : 1; /* 3 NV indices that have TPMA_PLATFORM_CREATE SET may be read or written. */
+ unsigned int Reserved : 27; /* 30:4 shall be zero */
+ unsigned int orderly : 1; /* 31 The TPM received a TPM2_Shutdown() and a matching TPM2_Startup(). */
+ };
+ UINT32 val;
+} TPMA_STARTUP_CLEAR;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int orderly : 1; /* 31 The TPM received a TPM2_Shutdown() and a matching TPM2_Startup(). */
+ unsigned int Reserved : 27; /* 30:4 shall be zero */
+ unsigned int phEnableNV : 1; /* 3 NV indices that have TPMA_PLATFORM_CREATE SET may be read or written. */
+ unsigned int ehEnable : 1; /* 2 The EPS hierarchy is enabled and endorsementAuth may be used to authorize commands. */
+ unsigned int shEnable : 1; /* 1 The Storage hierarchy is enabled and ownerAuth or ownerPolicy may be used for authorization. */
+ unsigned int phEnable : 1; /* 0 The platform hierarchy is enabled and platformAuth or platformPolicy may be used for authorization. */
+ };
+ UINT32 val;
+} TPMA_STARTUP_CLEAR;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPMA_STARTUP_CLEAR;
+
+#endif
+
+#define TPMA_STARTUP_CLEAR_PHENABLE 0x00000001
+#define TPMA_STARTUP_CLEAR_SHENABLE 0x00000002
+#define TPMA_STARTUP_CLEAR_EHENABLE 0x00000004
+#define TPMA_STARTUP_CLEAR_PHENABLENV 0x00000008
+#define TPMA_STARTUP_CLEAR_RESERVED 0x7ffffff0
+#define TPMA_STARTUP_CLEAR_ORDERLY 0x80000000
+
+/* Table 36 - Definition of (UINT32) TPMA_MEMORY Bits <Out> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int sharedRAM : 1; /* 0 RAM memory used for authorization session contexts is shared with the memory used for transient objects */
+ unsigned int sharedNV : 1; /* 1 indicates that the NV memory used for persistent objects is shared with the NV memory used for NV Index values */
+ unsigned int objectCopiedToRam : 1; /* 2 indicates that the TPM copies persistent objects to a transient-object slot in RAM */
+ unsigned int Reserved : 29; /* 31:3 shall be zero */
+ };
+ UINT32 val;
+} TPMA_MEMORY;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Reserved : 29; /* 31:3 shall be zero */
+ unsigned int objectCopiedToRam : 1; /* 2 indicates that the TPM copies persistent objects to a transient-object slot in RAM */
+ unsigned int sharedNV : 1; /* 1 indicates that the NV memory used for persistent objects is shared with the NV memory used for NV Index values */
+ unsigned int sharedRAM : 1; /* 0 RAM memory used for authorization session contexts is shared with the memory used for transient objects */
+ };
+ UINT32 val;
+} TPMA_MEMORY;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPMA_MEMORY;
+
+#endif
+
+#define TPMA_MEMORY_SHAREDRAM 0x00000001
+#define TPMA_MEMORY_SHAREDNV 0x00000002
+#define TPMA_MEMORY_OBJECTCOPIEDTORAM 0x00000004
+#define TPMA_MEMORY_RESERVED 0xfffffff8
+
+/* Table 37 - Definition of (TPM_CC) TPMA_CC Bits <OUT> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int commandIndex : 16; /* 15:0 indicates the command being selected */
+ unsigned int Reserved : 6; /* 21:16 shall be zero */
+ unsigned int nv : 1; /* 22 indicates that the command may write to NV */
+ unsigned int extensive : 1; /* 23 This command could flush any number of loaded contexts. */
+ unsigned int flushed : 1; /* 24 The context associated with any transient handle in the command will be flushed when this command completes. */
+ unsigned int cHandles : 3; /* 27:25 indicates the number of the handles in the handle area for this command */
+ unsigned int rHandle : 1; /* 28 indicates the presence of the handle area in the input */
+ unsigned int V : 1; /* 29 indicates that the command is vendor-specific */
+ unsigned int Res : 2; /* 31:30 allocated for software; shall be zero */
+ };
+ UINT32 val;
+} TPMA_CC;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Res : 2; /* 31:30 allocated for software; shall be zero */
+ unsigned int V : 1; /* 29 indicates that the command is vendor-specific */
+ unsigned int rHandle : 1; /* 28 indicates the presence of the handle area in the input */
+ unsigned int cHandles : 3; /* 27:25 indicates the number of the handles in the handle area for this command */
+ unsigned int flushed : 1; /* 24 The context associated with any transient handle in the command will be flushed when this command completes. */
+ unsigned int extensive : 1; /* 23 This command could flush any number of loaded contexts. */
+ unsigned int nv : 1; /* 22 indicates that the command may write to NV */
+ unsigned int Reserved : 6; /* 21:16 shall be zero */
+ unsigned int commandIndex : 16; /* 15:0 indicates the command being selected */
+ };
+ UINT32 val;
+} TPMA_CC;
+
+#else
+
+typedef union {
+ struct {
+ UINT32 val;
+ };
+} TPMA_CC;
+
+#endif
+
+#define TPMA_CC_COMMANDINDEX 0x0000ffff
+#define TPMA_CC_RESERVED1 0x003f0000
+#define TPMA_CC_NV 0x00400000
+#define TPMA_CC_EXTENSIVE 0x00800000
+#define TPMA_CC_FLUSHED 0x01000000
+#define TPMA_CC_CHANDLES 0x0e000000
+#define TPMA_CC_RHANDLE 0x10000000
+#define TPMA_CC_V 0x20000000
+#define TPMA_CC_RES 0xc0000000
+#define TPMA_CC_RESERVED (0x003f0000 | 0xc0000000)
+
+ /* Table 38 - Definition of (UINT32) TPMA_MODES Bits <Out> */
+
+#if defined TPM_BITFIELD_LE
+
+ typedef union {
+ struct {
+ unsigned int FIPS_140_2 : 1; /* 0 indicates that the TPM is designed to comply with all of the FIPS 140-2 requirements at Level 1 or higher */
+ unsigned int Reserved : 31; /* 31:1 shall be zero */
+ };
+ UINT32 val;
+ } TPMA_MODES;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int Reserved : 31; /* 31:1 shall be zero */
+ unsigned int FIPS_140_2 : 1; /* 0 indicates that the TPM is designed to comply with all of the FIPS 140-2 requirements at Level 1 or higher */
+ };
+ UINT32 val;
+} TPMA_MODES;
+
+#else
+
+ typedef struct {
+ UINT32 val;
+ } TPMA_MODES;
+
+#endif
+
+#define TPMA_MODES_FIPS_140_2 0x00000001
+
+/* Table 38 - Definition of (BYTE) TPMI_YES_NO Type */
+
+typedef BYTE TPMI_YES_NO;
+
+#define NO 0
+#define YES 1
+
+/* Table 39 - Definition of (TPM_HANDLE) TPMI_DH_OBJECT Type */
+
+typedef TPM_HANDLE TPMI_DH_OBJECT;
+
+/* Table 41 - Definition of (TPM_HANDLE) TPMI_DH_PARENT Type */
+
+typedef TPM_HANDLE TPMI_DH_PARENT;
+
+/* Table 40 - Definition of (TPM_HANDLE) TPMI_DH_PERSISTENT Type */
+
+typedef TPM_HANDLE TPMI_DH_PERSISTENT;
+
+/* Table 41 - Definition of (TPM_HANDLE) TPMI_DH_ENTITY Type <IN> */
+
+typedef TPM_HANDLE TPMI_DH_ENTITY;
+
+/* Table 42 - Definition of (TPM_HANDLE) TPMI_DH_PCR Type <IN> */
+
+typedef TPM_HANDLE TPMI_DH_PCR;
+
+/* Table 43 - Definition of (TPM_HANDLE) TPMI_SH_AUTH_SESSION Type <IN/OUT> */
+
+typedef TPM_HANDLE TPMI_SH_AUTH_SESSION;
+
+/* Table 44 - Definition of (TPM_HANDLE) TPMI_SH_HMAC Type <IN/OUT> */
+
+typedef TPM_HANDLE TPMI_SH_HMAC;
+
+/* Table 45 - Definition of (TPM_HANDLE) TPMI_SH_POLICY Type <IN/OUT> */
+
+typedef TPM_HANDLE TPMI_SH_POLICY;
+
+/* Table 46 - Definition of (TPM_HANDLE) TPMI_DH_CONTEXT Type */
+
+typedef TPM_HANDLE TPMI_DH_CONTEXT;
+
+/* Table 49 - Definition of (TPM_HANDLE) TPMI_DH_SAVED Type */
+
+typedef TPM_HANDLE TPMI_DH_SAVED;
+
+/* Table 47 - Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY Type */
+
+typedef TPM_HANDLE TPMI_RH_HIERARCHY;
+
+/* Table 48 - Definition of (TPM_HANDLE) TPMI_RH_ENABLES Type */
+
+typedef TPM_HANDLE TPMI_RH_ENABLES;
+
+/* Table 49 - Definition of (TPM_HANDLE) TPMI_RH_HIERARCHY_AUTH Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
+
+/* Table 2:55 - Definition of TPMI_RH_HIERARCHY_POLICY Type */
+
+typedef TPM_HANDLE TPMI_RH_HIERARCHY_POLICY;
+
+/* Table 50 - Definition of (TPM_HANDLE) TPMI_RH_PLATFORM Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_PLATFORM;
+
+/* Table 51 - Definition of (TPM_HANDLE) TPMI_RH_OWNER Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_OWNER;
+
+/* Table 52 - Definition of (TPM_HANDLE) TPMI_RH_ENDORSEMENT Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_ENDORSEMENT;
+
+/* Table 53 - Definition of (TPM_HANDLE) TPMI_RH_PROVISION Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_PROVISION;
+
+/* Table 54 - Definition of (TPM_HANDLE) TPMI_RH_CLEAR Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_CLEAR;
+
+/* Table 55 - Definition of (TPM_HANDLE) TPMI_RH_NV_AUTH Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_NV_AUTH;
+
+/* Table 56 - Definition of (TPM_HANDLE) TPMI_RH_LOCKOUT Type <IN> */
+
+typedef TPM_HANDLE TPMI_RH_LOCKOUT;
+
+/* Table 57 - Definition of (TPM_HANDLE) TPMI_RH_NV_INDEX Type <IN/OUT> */
+
+typedef TPM_HANDLE TPMI_RH_NV_INDEX;
+
+/* Table 58 - Definition of (TPM_ALG_ID) TPMI_ALG_HASH Type */
+
+typedef TPM_ALG_ID TPMI_ALG_HASH;
+
+/* Table 59 - Definition of (TPM_ALG_ID) TPMI_ALG_ASYM Type */
+
+typedef TPM_ALG_ID TPMI_ALG_ASYM;
+
+/* Table 60 - Definition of (TPM_ALG_ID) TPMI_ALG_SYM Type */
+
+typedef TPM_ALG_ID TPMI_ALG_SYM;
+
+/* Table 61 - Definition of (TPM_ALG_ID) TPMI_ALG_SYM_OBJECT Type */
+
+typedef TPM_ALG_ID TPMI_ALG_SYM_OBJECT;
+
+/* Table 62 - Definition of (TPM_ALG_ID) TPMI_ALG_SYM_MODE Type */
+
+typedef TPM_ALG_ID TPMI_ALG_SYM_MODE;
+
+/* Table 63 - Definition of (TPM_ALG_ID) TPMI_ALG_KDF Type */
+
+typedef TPM_ALG_ID TPMI_ALG_KDF;
+
+/* Table 64 - Definition of (TPM_ALG_ID) TPMI_ALG_SIG_SCHEME Type */
+
+typedef TPM_ALG_ID TPMI_ALG_SIG_SCHEME;
+
+/* Table 65 - Definition of (TPM_ALG_ID) TPMI_ECC_KEY_EXCHANGE Type */
+
+typedef TPM_ALG_ID TPMI_ECC_KEY_EXCHANGE;
+
+/* Table 66 - Definition of (TPM_ST) TPMI_ST_COMMAND_TAG Type */
+
+typedef TPM_ST TPMI_ST_COMMAND_TAG;
+
+/* Table 71 - Definition of (TPM_ALG_ID) TPMI_ALG_MAC_SCHEME Type */
+
+typedef TPM_ALG_ID TPMI_ALG_MAC_SCHEME;
+
+/* Table 72 - Definition of (TPM_ALG_ID) TPMI_ALG_CIPHER_MODE Type */
+
+typedef TPM_ALG_ID TPMI_ALG_CIPHER_MODE;
+
+/* Table 67 - Definition of TPMS_EMPTY Structure <IN/OUT> */
+
+typedef struct {
+ /* a structure with no member */
+ BYTE empty[0];
+} TPMS_EMPTY;
+
+/* Table 68 - Definition of TPMS_ALGORITHM_DESCRIPTION Structure <OUT> */
+typedef struct {
+ TPM_ALG_ID alg; /* an algorithm */
+ TPMA_ALGORITHM attributes; /* the attributes of the algorithm */
+} TPMS_ALGORITHM_DESCRIPTION;
+
+/* Table 69 - Definition of TPMU_HA Union <IN/OUT, S> */
+
+typedef union {
+ BYTE sha1 [SHA1_DIGEST_SIZE]; /* TPM_ALG_SHA1 */
+ BYTE sha256 [SHA256_DIGEST_SIZE]; /* TPM_ALG_SHA256 */
+ BYTE sha384 [SHA384_DIGEST_SIZE]; /* TPM_ALG_SHA384 */
+ BYTE sha512 [SHA512_DIGEST_SIZE]; /* TPM_ALG_SHA512 */
+ BYTE sm3_256 [SM3_256_DIGEST_SIZE]; /* TPM_ALG_SM3_256 */
+ BYTE tssmax [128]; /* to make union size larger */
+
+} TPMU_HA;
+
+/* legacy, better to use (sizeof(TPMU_HA) */
+
+#define MAX_DIGEST_SIZE (sizeof(TPMU_HA))
+
+/* Table 70 - Definition of TPMT_HA Structure <IN/OUT> */
+
+typedef struct {
+ TPMI_ALG_HASH hashAlg; /* selector of the hash contained in the digest that implies the size of the digest */
+ TPMU_HA digest; /* the digest data */
+} TPMT_HA;
+
+/* Table 71 - Definition of TPM2B_DIGEST Structure */
+
+typedef struct {
+ UINT16 size;
+ BYTE buffer[sizeof(TPMU_HA)];
+} DIGEST_2B;
+
+typedef union {
+ DIGEST_2B t;
+ TPM2B b;
+} TPM2B_DIGEST;
+
+/* Table 72 - Definition of TPM2B_DATA Structure */
+
+typedef struct {
+ UINT16 size; /* size in octets of the buffer field; may be 0 */
+ BYTE buffer[sizeof(TPMT_HA)];
+} DATA_2B;
+
+typedef union {
+ DATA_2B t;
+ TPM2B b;
+} TPM2B_DATA;
+
+/* Table 73 - Definition of Types for TPM2B_NONCE */
+
+typedef TPM2B_DIGEST TPM2B_NONCE; /* size limited to the same as the digest structure */
+
+/* Table 74 - Definition of Types for TPM2B_AUTH */
+
+typedef TPM2B_DIGEST TPM2B_AUTH; /* size limited to the same as the digest structure */
+
+/* This is not in Part 2, but the concatenation of two digests to create an HMAC key is used often
+ enough that it's worth putting in a central location.
+
+ In Part 1 19.6.8 sessionKey Creation - authValue || salt.
+ In Part 1 19.6.5 HMAC Computation - sessionKey || authValue
+
+ I think both could be TPMU_HA, but the TPM reference code seems to use TPMT_HA.
+*/
+
+typedef struct {
+ UINT16 size;
+ BYTE buffer[sizeof(TPMU_HA) + /* TPM2B_AUTH authValue */
+ sizeof(TPMT_HA)]; /* salt */
+} KEY_2B;
+
+typedef union {
+ KEY_2B t;
+ TPM2B b;
+} TPM2B_KEY;
+
+/* Table 75 - Definition of Types for TPM2B_OPERAND */
+
+typedef TPM2B_DIGEST TPM2B_OPERAND; /* size limited to the same as the digest structure */
+
+/* Table 76 - Definition of TPM2B_EVENT Structure */
+
+typedef struct {
+ UINT16 size; /* size of the operand */
+ BYTE buffer [1024]; /* the operand */
+} EVENT_2B;
+
+typedef union {
+ EVENT_2B t;
+ TPM2B b;
+} TPM2B_EVENT;
+
+/* Table 77 - Definition of TPM2B_MAX_BUFFER Structure */
+
+/* MAX_DIGEST_BUFFER is TPM-dependent but is required to be at least 1,024. */
+
+typedef struct {
+ UINT16 size; /* size of the buffer */
+ BYTE buffer [MAX_DIGEST_BUFFER]; /* the operand */
+} MAX_BUFFER_2B;
+
+typedef union {
+ MAX_BUFFER_2B t;
+ TPM2B b;
+} TPM2B_MAX_BUFFER;
+
+/* Table 78 - Definition of TPM2B_MAX_NV_BUFFER Structure */
+
+typedef struct {
+ UINT16 size; /* size of the buffer */
+ BYTE buffer [MAX_NV_BUFFER_SIZE]; /* the operand */
+} MAX_NV_BUFFER_2B;
+
+typedef union {
+ MAX_NV_BUFFER_2B t;
+ TPM2B b;
+} TPM2B_MAX_NV_BUFFER;
+
+/* Table 79 - Definition of TPM2B_TIMEOUT Structure <IN/OUT> */
+
+typedef TPM2B_DIGEST TPM2B_TIMEOUT; /* size limited to the same as the digest structure */
+
+/* Table 80 - Definition of TPM2B_IV Structure <IN/OUT> */
+
+typedef struct {
+ UINT16 size; /* size of the IV value */
+ BYTE buffer [MAX_SYM_BLOCK_SIZE]; /* the IV value */
+} IV_2B;
+
+typedef union {
+ IV_2B t;
+ TPM2B b;
+} TPM2B_IV;
+
+/* Table 81 - Definition of TPMU_NAME Union <> */
+
+typedef union {
+ TPMT_HA digest; /* when the Name is a digest */
+ TPM_HANDLE handle; /* when the Name is a handle */
+} TPMU_NAME;
+
+/* Table 82 - Definition of TPM2B_NAME Structure */
+
+typedef struct {
+ UINT16 size; /* size of the Name structure */
+ BYTE name[sizeof(TPMU_NAME)]; /* the Name structure */
+} NAME_2B;
+
+typedef union {
+ NAME_2B t;
+ TPM2B b;
+} TPM2B_NAME;
+
+/* Table 83 - Definition of TPMS_PCR_SELECT Structure */
+
+typedef struct {
+ UINT8 sizeofSelect; /* the size in octets of the pcrSelect array */
+ BYTE pcrSelect [PCR_SELECT_MAX]; /* the bit map of selected PCR */
+} TPMS_PCR_SELECT;
+
+/* Table 84 - Definition of TPMS_PCR_SELECTION Structure */
+
+typedef struct {
+ TPMI_ALG_HASH hash; /* the hash algorithm associated with the selection */
+ UINT8 sizeofSelect; /* the size in octets of the pcrSelect array */
+ BYTE pcrSelect [PCR_SELECT_MAX]; /* the bit map of selected PCR */
+} TPMS_PCR_SELECTION;
+
+/* Table 87 - Definition of TPMT_TK_CREATION Structure */
+
+typedef struct {
+ TPM_ST tag; /* ticket structure tag TPM_ST_CREATION */
+ TPMI_RH_HIERARCHY hierarchy; /* the hierarchy containing name */
+ TPM2B_DIGEST digest; /* This shall be the HMAC produced using a proof value of hierarchy. */
+} TPMT_TK_CREATION;
+
+/* Table 88 - Definition of TPMT_TK_VERIFIED Structure */
+
+typedef struct {
+ TPM_ST tag; /* ticket structure tag TPM_ST_VERIFIED */
+ TPMI_RH_HIERARCHY hierarchy; /* the hierarchy containing keyName */
+ TPM2B_DIGEST digest; /* This shall be the HMAC produced using a proof value of hierarchy. */
+} TPMT_TK_VERIFIED;
+
+/* Table 89 - Definition of TPMT_TK_AUTH Structure */
+
+typedef struct {
+ TPM_ST tag; /* ticket structure tag TPM_ST_AUTH_SIGNED, TPM_ST_AUTH_SECRET */
+ TPMI_RH_HIERARCHY hierarchy; /* the hierarchy of the object used to produce the ticket */
+ TPM2B_DIGEST digest; /* This shall be the HMAC produced using a proof value of hierarchy. */
+} TPMT_TK_AUTH;
+
+/* Table 90 - Definition of TPMT_TK_HASHCHECK Structure */
+
+typedef struct {
+ TPM_ST tag; /* ticket structure tag TPM_ST_HASHCHECK */
+ TPMI_RH_HIERARCHY hierarchy; /* the hierarchy */
+ TPM2B_DIGEST digest; /* This shall be the HMAC produced using a proof value of hierarchy. */
+} TPMT_TK_HASHCHECK;
+
+/* Table 91 - Definition of TPMS_ALG_PROPERTY Structure <OUT> */
+
+typedef struct {
+ TPM_ALG_ID alg; /* an algorithm identifier */
+ TPMA_ALGORITHM algProperties; /* the attributes of the algorithm */
+} TPMS_ALG_PROPERTY;
+
+/* Table 92 - Definition of TPMS_TAGGED_PROPERTY Structure <OUT> */
+
+typedef struct {
+ TPM_PT property; /* a property identifier */
+ UINT32 value; /* the value of the property */
+} TPMS_TAGGED_PROPERTY;
+
+/* Table 93 - Definition of TPMS_TAGGED_PCR_SELECT Structure <OUT> */
+
+typedef struct {
+ TPM_PT_PCR tag; /* the property identifier */
+ UINT8 sizeofSelect; /* the size in octets of the pcrSelect array */
+ BYTE pcrSelect [PCR_SELECT_MAX]; /* the bit map of PCR with the identified property */
+} TPMS_TAGGED_PCR_SELECT;
+
+/* Table 96 - Definition of TPMS_TAGGED_POLICY Structure */
+
+typedef struct {
+ TPM_HANDLE handle;
+ TPMT_HA policyHash;
+} TPMS_TAGGED_POLICY;
+
+/* Table 94 - Definition of TPML_CC Structure */
+
+typedef struct {
+ UINT32 count; /* number of commands in the commandCode list; may be 0 */
+ TPM_CC commandCodes[MAX_CAP_CC]; /* a list of command codes */
+} TPML_CC;
+
+/* Table 95 - Definition of TPML_CCA Structure <OUT> */
+
+typedef struct {
+ UINT32 count; /* number of values in the commandAttributes list; may be 0 */
+ TPMA_CC commandAttributes[MAX_CAP_CC]; /* a list of command codes attributes */
+} TPML_CCA;
+
+/* Table 96 - Definition of TPML_ALG Structure */
+
+typedef struct {
+ UINT32 count; /* number of algorithms in the algorithms list; may be 0 */
+ TPM_ALG_ID algorithms[MAX_ALG_LIST_SIZE]; /* a list of algorithm IDs */
+} TPML_ALG;
+
+/* Table 97 - Definition of TPML_HANDLE Structure <OUT> */
+
+typedef struct {
+ UINT32 count; /* the number of handles in the list may have a value of 0 */
+ TPM_HANDLE handle[MAX_CAP_HANDLES]; /* an array of handles */
+} TPML_HANDLE;
+
+/* Table 98 - Definition of TPML_DIGEST Structure */
+
+typedef struct {
+ UINT32 count; /* number of digests in the list, minimum is two for TPM2_PolicyOR(). */
+ TPM2B_DIGEST digests[8]; /* a list of digests */
+} TPML_DIGEST;
+
+/* Table 99 - Definition of TPML_DIGEST_VALUES Structure */
+
+typedef struct {
+ UINT32 count; /* number of digests in the list */
+ TPMT_HA digests[HASH_COUNT]; /* a list of tagged digests */
+} TPML_DIGEST_VALUES;
+
+/* Table 100 - Definition of TPM2B_DIGEST_VALUES Structure */
+
+typedef struct {
+ UINT16 size; /* size of the operand buffer */
+ BYTE buffer [sizeof(TPML_DIGEST_VALUES)]; /* the operand */
+} TPM2B_DIGEST_VALUES;
+
+/* Table 101 - Definition of TPML_PCR_SELECTION Structure */
+
+typedef struct {
+ UINT32 count; /* number of selection structures A value of zero is allowed. */
+ TPMS_PCR_SELECTION pcrSelections[HASH_COUNT]; /* list of selections */
+} TPML_PCR_SELECTION;
+
+/* Table 102 - Definition of TPML_ALG_PROPERTY Structure <OUT> */
+
+typedef struct {
+ UINT32 count; /* number of algorithm properties structures A value of zero is allowed. */
+ TPMS_ALG_PROPERTY algProperties[MAX_CAP_ALGS]; /* list of properties */
+} TPML_ALG_PROPERTY;
+
+/* Table 103 - Definition of TPML_TAGGED_TPM_PROPERTY Structure <OUT> */
+
+typedef struct {
+ UINT32 count; /* number of properties A value of zero is allowed. */
+ TPMS_TAGGED_PROPERTY tpmProperty[MAX_TPM_PROPERTIES]; /* an array of tagged properties */
+} TPML_TAGGED_TPM_PROPERTY;
+
+/* Table 104 - Definition of TPML_TAGGED_PCR_PROPERTY Structure <OUT> */
+
+typedef struct {
+ UINT32 count; /* number of properties A value of zero is allowed. */
+ TPMS_TAGGED_PCR_SELECT pcrProperty[MAX_PCR_PROPERTIES]; /* a tagged PCR selection */
+} TPML_TAGGED_PCR_PROPERTY;
+
+/* Table 105 - Definition of {ECC} TPML_ECC_CURVE Structure <OUT> */
+
+typedef struct {
+ UINT32 count; /* number of curves A value of zero is allowed. */
+ TPM_ECC_CURVE eccCurves[MAX_ECC_CURVES]; /* array of ECC curve identifiers */
+} TPML_ECC_CURVE ;
+
+/* Table 109 - Definition of TPML_TAGGED_POLICY Structure */
+
+typedef struct {
+ UINT32 count;
+ TPMS_TAGGED_POLICY policies[MAX_TAGGED_POLICIES];
+} TPML_TAGGED_POLICY;
+
+/* Table 106 - Definition of TPMU_CAPABILITIES Union <OUT> */
+
+typedef union {
+ TPML_ALG_PROPERTY algorithms; /* TPM_CAP_ALGS */
+ TPML_HANDLE handles; /* TPM_CAP_HANDLES */
+ TPML_CCA command; /* TPM_CAP_COMMANDS */
+ TPML_CC ppCommands; /* TPM_CAP_PP_COMMANDS */
+ TPML_CC auditCommands; /* TPM_CAP_AUDIT_COMMANDS */
+ TPML_PCR_SELECTION assignedPCR; /* TPM_CAP_PCRS */
+ TPML_TAGGED_TPM_PROPERTY tpmProperties; /* TPM_CAP_TPM_PROPERTIES */
+ TPML_TAGGED_PCR_PROPERTY pcrProperties; /* TPM_CAP_PCR_PROPERTIES */
+ TPML_ECC_CURVE eccCurves; /* TPM_CAP_ECC_CURVES */
+ TPML_TAGGED_POLICY authPolicies; /* TPM_CAP_AUTH_POLICIES */
+} TPMU_CAPABILITIES;
+
+/* Table 107 - Definition of TPMS_CAPABILITY_DATA Structure <OUT> */
+
+typedef struct {
+ TPM_CAP capability; /* the capability */
+ TPMU_CAPABILITIES data; /* the capability data */
+} TPMS_CAPABILITY_DATA;
+
+/* Table 108 - Definition of TPMS_CLOCK_INFO Structure */
+
+typedef struct {
+ UINT64 clock; /* time in milliseconds during which the TPM has been powered */
+ UINT32 resetCount; /* number of occurrences of TPM Reset since the last TPM2_Clear() */
+ UINT32 restartCount; /* number of times that TPM2_Shutdown() or _TPM_Hash_Start have
+ occurred since the last TPM Reset or TPM2_Clear(). */
+ TPMI_YES_NO safe; /* no value of Clock greater than the current value of Clock has
+ been previously reported by the TPM */
+} TPMS_CLOCK_INFO;
+
+/* Table 109 - Definition of TPMS_TIME_INFO Structure */
+
+typedef struct {
+ UINT64 time; /* time in milliseconds since the last _TPM_Init() or TPM2_Startup() */
+ TPMS_CLOCK_INFO clockInfo; /* a structure containing the clock information */
+} TPMS_TIME_INFO;
+
+/* Table 110 - Definition of TPMS_TIME_ATTEST_INFO Structure <OUT> */
+
+typedef struct {
+ TPMS_TIME_INFO time; /* the Time, clock, resetCount, restartCount, and
+ Safe indicator */
+ UINT64 firmwareVersion; /* a TPM vendor-specific value indicating the
+ version number of the firmware */
+} TPMS_TIME_ATTEST_INFO;
+
+/* Table 111 - Definition of TPMS_CERTIFY_INFO Structure <OUT> */
+
+typedef struct {
+ TPM2B_NAME name; /* Name of the certified object */
+ TPM2B_NAME qualifiedName; /* Qualified Name of the certified object */
+} TPMS_CERTIFY_INFO;
+
+/* Table 112 - Definition of TPMS_QUOTE_INFO Structure <OUT> */
+
+typedef struct {
+ TPML_PCR_SELECTION pcrSelect; /* information on algID, PCR selected and digest */
+ TPM2B_DIGEST pcrDigest; /* digest of the selected PCR using the hash of the signing key */
+} TPMS_QUOTE_INFO;
+
+/* Table 113 - Definition of TPMS_COMMAND_AUDIT_INFO Structure <OUT> */
+
+typedef struct {
+ UINT64 auditCounter; /* the monotonic audit counter */
+ TPM_ALG_ID digestAlg; /* hash algorithm used for the command audit */
+ TPM2B_DIGEST auditDigest; /* the current value of the audit digest */
+ TPM2B_DIGEST commandDigest; /* digest of the command codes being audited using digestAlg */
+} TPMS_COMMAND_AUDIT_INFO;
+
+/* Table 114 - Definition of TPMS_SESSION_AUDIT_INFO Structure <OUT> */
+
+typedef struct {
+ TPMI_YES_NO exclusiveSession; /* current exclusive status of the session */
+ TPM2B_DIGEST sessionDigest; /* the current value of the session audit digest */
+} TPMS_SESSION_AUDIT_INFO;
+
+/* Table 115 - Definition of TPMS_CREATION_INFO Structure <OUT> */
+
+typedef struct {
+ TPM2B_NAME objectName; /* Name of the object */
+ TPM2B_DIGEST creationHash; /* creationHash */
+} TPMS_CREATION_INFO;
+
+/* Table 116 - Definition of TPMS_NV_CERTIFY_INFO Structure <OUT> */
+
+typedef struct {
+ TPM2B_NAME indexName; /* Name of the NV Index */
+ UINT16 offset; /* the offset parameter of TPM2_NV_Certify() */
+ TPM2B_MAX_NV_BUFFER nvContents; /* contents of the NV Index */
+} TPMS_NV_CERTIFY_INFO;
+
+/* Table 125 - Definition of TPMS_NV_DIGEST_CERTIFY_INFO Structure <OUT> */
+typedef struct {
+ TPM2B_NAME indexName;
+ TPM2B_DIGEST nvDigest;
+} TPMS_NV_DIGEST_CERTIFY_INFO;
+
+typedef TPM_ST TPMI_ST_ATTEST;
+
+/* Table 118 - Definition of TPMU_ATTEST Union <OUT> */
+
+typedef union {
+ TPMS_CERTIFY_INFO certify; /* TPM_ST_ATTEST_CERTIFY */
+ TPMS_CREATION_INFO creation; /* TPM_ST_ATTEST_CREATION */
+ TPMS_QUOTE_INFO quote; /* TPM_ST_ATTEST_QUOTE */
+ TPMS_COMMAND_AUDIT_INFO commandAudit; /* TPM_ST_ATTEST_COMMAND_AUDIT */
+ TPMS_SESSION_AUDIT_INFO sessionAudit; /* TPM_ST_ATTEST_SESSION_AUDIT */
+ TPMS_TIME_ATTEST_INFO time; /* TPM_ST_ATTEST_TIME */
+ TPMS_NV_CERTIFY_INFO nv; /* TPM_ST_ATTEST_NV */
+ TPMS_NV_DIGEST_CERTIFY_INFO nvDigest; /* TPM_ST_ATTEST_NV_DIGEST */
+} TPMU_ATTEST;
+
+/* Table 119 - Definition of TPMS_ATTEST Structure <OUT> */
+
+typedef struct {
+ TPM_GENERATED magic; /* the indication that this structure was created by
+ a TPM (always TPM_GENERATED_VALUE) */
+ TPMI_ST_ATTEST type; /* type of the attestation structure */
+ TPM2B_NAME qualifiedSigner; /* Qualified Name of the signing key */
+ TPM2B_DATA extraData; /* external information supplied by caller */
+ TPMS_CLOCK_INFO clockInfo; /* Clock, resetCount, restartCount, and Safe */
+ UINT64 firmwareVersion; /* TPM-vendor-specific value identifying the version
+ number of the firmware */
+ TPMU_ATTEST attested; /* the type-specific attestation information */
+} TPMS_ATTEST;
+
+/* Table 120 - Definition of TPM2B_ATTEST Structure <OUT> */
+
+typedef struct {
+ UINT16 size; /* size of the attestationData structure */
+ BYTE attestationData[sizeof(TPMS_ATTEST)]; /* the signed structure */
+} ATTEST_2B;
+
+typedef union {
+ ATTEST_2B t;
+ TPM2B b;
+} TPM2B_ATTEST;
+
+/* Table 121 - Definition of TPMS_AUTH_COMMAND Structure <IN> */
+
+typedef struct {
+ TPMI_SH_AUTH_SESSION sessionHandle; /* the session handle */
+ TPM2B_NONCE nonce; /* the session nonce, may be the Empty Buffer */
+ TPMA_SESSION sessionAttributes; /* the session attributes */
+ TPM2B_AUTH hmac; /* either an HMAC, a password, or an EmptyAuth */
+} TPMS_AUTH_COMMAND;
+
+/* Table 126 - Definition of TPMS_AUTH_RESPONSE Structure <OUT> */
+
+typedef struct {
+ TPM2B_NONCE nonce; /* the session nonce, may be the Empty Buffer */
+ TPMA_SESSION sessionAttributes; /* the session attributes */
+ TPM2B_AUTH hmac; /* either an HMAC or an EmptyAuth */
+} TPMS_AUTH_RESPONSE;
+
+/* Table 127 - Definition of {AES} (TPM_KEY_BITS) TPMI_!ALG.S_KEY_BITS Type */
+
+typedef TPM_KEY_BITS TPMI_TDES_KEY_BITS;
+typedef TPM_KEY_BITS TPMI_AES_KEY_BITS;
+typedef TPM_KEY_BITS TPMI_SM4_KEY_BITS;
+typedef TPM_KEY_BITS TPMI_CAMELLIA_KEY_BITS;
+
+/* Table 128 - Definition of TPMU_SYM_KEY_BITS Union */
+
+typedef union {
+#ifdef TPM_ALG_TDES
+ TPMI_TDES_KEY_BITS tdes; /* TPM_ALG_TDES */
+#endif
+#ifdef TPM_ALG_AES
+ TPMI_AES_KEY_BITS aes; /* TPM_ALG_AES */
+#endif
+#ifdef TPM_ALG_SM4
+ TPMI_SM4_KEY_BITS sm4; /* TPM_ALG_SM4 */
+#endif
+#ifdef TPM_ALG_CAMELLIA
+ TPMI_CAMELLIA_KEY_BITS camellia; /* TPM_ALG_CAMELLIA */
+#endif
+#ifdef TPM_ALG_XOR
+ TPMI_ALG_HASH xorr; /* TPM_ALG_XOR overload for using xor */
+#endif
+ TPM_KEY_BITS sym; /* when selector may be any of the symmetric block ciphers */
+} TPMU_SYM_KEY_BITS;
+
+/* Table 129 - Definition of TPMU_SYM_MODE Union */
+
+typedef union {
+#ifdef TPM_ALG_TDES
+ TPMI_ALG_SYM_MODE tdes; /* TPM_ALG_TDES */
+#endif
+#ifdef TPM_ALG_AES
+ TPMI_ALG_SYM_MODE aes; /* TPM_ALG_AES */
+#endif
+#ifdef TPM_ALG_SM4
+ TPMI_ALG_SYM_MODE sm4; /* TPM_ALG_SM4 */
+#endif
+#ifdef TPM_ALG_CAMELLIA
+ TPMI_ALG_SYM_MODE camellia; /* TPM_ALG_CAMELLIA */
+#endif
+ TPMI_ALG_SYM_MODE sym; /* when selector may be any of the symmetric block ciphers */
+} TPMU_SYM_MODE;
+
+/* Table 126 - xDefinition of TPMU_SYM_DETAILS Union */
+
+/* Table 127 - Definition of TPMT_SYM_DEF Structure */
+
+typedef struct {
+ TPMI_ALG_SYM algorithm; /* indicates a symmetric algorithm */
+ TPMU_SYM_KEY_BITS keyBits; /* a supported key size */
+ TPMU_SYM_MODE mode; /* the mode for the key */
+} TPMT_SYM_DEF;
+
+/* Table 128 - Definition of TPMT_SYM_DEF_OBJECT Structure */
+
+typedef struct {
+ TPMI_ALG_SYM_OBJECT algorithm; /* selects a symmetric block cipher */
+ TPMU_SYM_KEY_BITS keyBits; /* the key size */
+ TPMU_SYM_MODE mode; /* default mode */
+} TPMT_SYM_DEF_OBJECT;
+
+/* Table 129 - Definition of TPM2B_SYM_KEY Structure */
+
+typedef struct {
+ UINT16 size; /* size, in octets, of the buffer containing the key; may be zero */
+ BYTE buffer [MAX_SYM_KEY_BYTES]; /* the key */
+} SYM_KEY_2B;
+
+typedef union {
+ SYM_KEY_2B t;
+ TPM2B b;
+} TPM2B_SYM_KEY;
+
+/* Table 130 - Definition of TPMS_SYMCIPHER_PARMS Structure */
+
+typedef struct {
+ TPMT_SYM_DEF_OBJECT sym; /* a symmetric block cipher */
+} TPMS_SYMCIPHER_PARMS;
+
+/* Table 135 - Definition of TPM2B_LABEL Structure */
+
+typedef union {
+ struct {
+ UINT16 size;
+ BYTE buffer[LABEL_MAX_BUFFER];
+ } t;
+ TPM2B b;
+} TPM2B_LABEL;
+
+/* Table 135 - Definition of TPMS_DERIVE Structure */
+
+typedef struct {
+ TPM2B_LABEL label;
+ TPM2B_LABEL context;
+} TPMS_DERIVE;
+
+/* Table 131 - Definition of TPM2B_SENSITIVE_DATA Structure */
+
+typedef struct {
+ UINT16 size;
+ BYTE buffer[MAX_SYM_DATA]; /* the keyed hash private data structure */
+} SENSITIVE_DATA_2B;
+
+typedef union {
+ SENSITIVE_DATA_2B t;
+ TPM2B b;
+} TPM2B_SENSITIVE_DATA;
+
+/* Table 132 - Definition of TPMS_SENSITIVE_CREATE Structure <IN> */
+
+typedef struct {
+ TPM2B_AUTH userAuth; /* the USER auth secret value */
+ TPM2B_SENSITIVE_DATA data; /* data to be sealed */
+} TPMS_SENSITIVE_CREATE;
+
+/* Table 133 - Definition of TPM2B_SENSITIVE_CREATE Structure <IN, S> */
+
+typedef struct {
+ UINT16 size; /* size of sensitive in octets (may not be zero) */
+ TPMS_SENSITIVE_CREATE sensitive; /* data to be sealed or a symmetric key value. */
+} TPM2B_SENSITIVE_CREATE;
+
+/* Table 134 - Definition of TPMS_SCHEME_HASH Structure */
+
+typedef struct {
+ TPMI_ALG_HASH hashAlg; /* the hash algorithm used to digest the message */
+} TPMS_SCHEME_HASH;
+
+/* Table 135 - Definition of {ECC} TPMS_SCHEME_ECDAA Structure */
+
+typedef struct {
+ TPMI_ALG_HASH hashAlg; /* the hash algorithm used to digest the message */
+ UINT16 count; /* the counter value that is used between TPM2_Commit() and the sign operation */
+} TPMS_SCHEME_ECDAA;
+
+/* Table 136 - Definition of (TPM_ALG_ID) TPMI_ALG_KEYEDHASH_SCHEME Type */
+
+typedef TPM_ALG_ID TPMI_ALG_KEYEDHASH_SCHEME;
+
+/* Table 137 - Definition of Types for HMAC_SIG_SCHEME */
+
+typedef TPMS_SCHEME_HASH TPMS_SCHEME_HMAC;
+
+/* Table 138 - Definition of TPMS_SCHEME_XOR Structure */
+
+typedef struct {
+ TPMI_ALG_HASH hashAlg; /* the hash algorithm used to digest the message */
+ TPMI_ALG_KDF kdf; /* the key derivation function */
+} TPMS_SCHEME_XOR;
+
+/* Table 139 - Definition of TPMU_SCHEME_KEYEDHASH Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_HMAC
+ TPMS_SCHEME_HMAC hmac; /* TPM_ALG_HMAC the "signing" scheme */
+#endif
+#ifdef TPM_ALG_XOR
+ TPMS_SCHEME_XOR xorr; /* TPM_ALG_XOR the "obfuscation" scheme */
+#endif
+} TPMU_SCHEME_KEYEDHASH;
+
+/* Table 140 - Definition of TPMT_KEYEDHASH_SCHEME Structure */
+
+typedef struct {
+ TPMI_ALG_KEYEDHASH_SCHEME scheme; /* selects the scheme */
+ TPMU_SCHEME_KEYEDHASH details; /* the scheme parameters */
+} TPMT_KEYEDHASH_SCHEME;
+
+/* Table 141 - Definition of {RSA} Types for RSA Signature Schemes */
+
+typedef TPMS_SCHEME_HASH TPMS_SIG_SCHEME_RSASSA;
+typedef TPMS_SCHEME_HASH TPMS_SIG_SCHEME_RSAPSS;
+
+/* Table 142 - Definition of {ECC} Types for ECC Signature Schemes */
+
+typedef TPMS_SCHEME_HASH TPMS_SIG_SCHEME_ECDSA;
+typedef TPMS_SCHEME_HASH TPMS_SIG_SCHEME_SM2;
+typedef TPMS_SCHEME_HASH TPMS_SIG_SCHEME_ECSCHNORR;
+
+typedef TPMS_SCHEME_ECDAA TPMS_SIG_SCHEME_ECDAA;
+
+/* Table 143 - Definition of TPMU_SIG_SCHEME Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_RSASSA
+ TPMS_SIG_SCHEME_RSASSA rsassa; /* TPM_ALG_RSASSA the RSASSA-PKCS1v1_5 scheme */
+#endif
+#ifdef TPM_ALG_RSAPSS
+ TPMS_SIG_SCHEME_RSAPSS rsapss; /* TPM_ALG_RSAPSS the RSASSA-PSS scheme */
+#endif
+#ifdef TPM_ALG_ECDSA
+ TPMS_SIG_SCHEME_ECDSA ecdsa; /* TPM_ALG_ECDSA the ECDSA scheme */
+#endif
+#ifdef TPM_ALG_ECDAA
+ TPMS_SIG_SCHEME_ECDAA ecdaa; /* TPM_ALG_ECDAA the ECDAA scheme */
+#endif
+#ifdef TPM_ALG_SM2
+ TPMS_SIG_SCHEME_SM2 sm2; /* TPM_ALG_SM2 ECDSA from SM2 */
+#endif
+#ifdef TPM_ALG_ECSCHNORR
+ TPMS_SIG_SCHEME_ECSCHNORR ecSchnorr; /* TPM_ALG_ECSCHNORR the EC Schnorr */
+#endif
+#ifdef TPM_ALG_HMAC
+ TPMS_SCHEME_HMAC hmac; /* TPM_ALG_HMAC the HMAC scheme */
+#endif
+ TPMS_SCHEME_HASH any; /* selector that allows access to digest for any signing scheme */
+} TPMU_SIG_SCHEME;
+
+/* Table 144 - Definition of TPMT_SIG_SCHEME Structure */
+
+typedef struct {
+ TPMI_ALG_SIG_SCHEME scheme; /* scheme selector */
+ TPMU_SIG_SCHEME details; /* scheme parameters */
+} TPMT_SIG_SCHEME;
+
+/* Table 145 - Definition of Types for {RSA} Encryption Schemes */
+
+typedef TPMS_SCHEME_HASH TPMS_ENC_SCHEME_OAEP; /* schemes that only need a hash */
+
+typedef TPMS_EMPTY TPMS_ENC_SCHEME_RSAES; /* schemes that need nothing */
+
+/* Table 146 - Definition of Types for {ECC} ECC Key Exchange */
+
+typedef TPMS_SCHEME_HASH TPMS_KEY_SCHEME_ECDH; /* schemes that only need a hash */
+typedef TPMS_SCHEME_HASH TPMS_KEY_SCHEME_ECMQV; /* schemes that only need a hash */
+
+/* Table 147 - Definition of Types for KDF Schemes, hash-based key- or mask-generation functions */
+
+typedef TPMS_SCHEME_HASH TPMS_SCHEME_MGF1;
+typedef TPMS_SCHEME_HASH TPMS_SCHEME_KDF1_SP800_56A;
+typedef TPMS_SCHEME_HASH TPMS_SCHEME_KDF2;
+typedef TPMS_SCHEME_HASH TPMS_SCHEME_KDF1_SP800_108;
+
+/* Table 148 - Definition of TPMU_KDF_SCHEME Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_MGF1
+ TPMS_SCHEME_MGF1 mgf1; /* TPM_ALG_MGF1 */
+#endif
+#ifdef TPM_ALG_KDF1_SP800_56A
+ TPMS_SCHEME_KDF1_SP800_56A kdf1_SP800_56a; /* TPM_ALG_KDF1_SP800_56A */
+#endif
+#ifdef TPM_ALG_KDF2
+ TPMS_SCHEME_KDF2 kdf2; /* TPM_ALG_KDF2 */
+#endif
+#ifdef TPM_ALG_KDF1_SP800_108
+ TPMS_SCHEME_KDF1_SP800_108 kdf1_sp800_108; /* TPM_ALG_KDF1_SP800_108 */
+#endif
+} TPMU_KDF_SCHEME;
+
+/* Table 149 - Definition of TPMT_KDF_SCHEME Structure */
+
+typedef struct {
+ TPMI_ALG_KDF scheme; /* scheme selector */
+ TPMU_KDF_SCHEME details; /* scheme parameters */
+} TPMT_KDF_SCHEME;
+
+/* Table 150 - Definition of (TPM_ALG_ID) TPMI_ALG_ASYM_SCHEME Type <> */
+
+typedef TPM_ALG_ID TPMI_ALG_ASYM_SCHEME;
+
+/* Table 151 - Definition of TPMU_ASYM_SCHEME Union */
+
+typedef union {
+#ifdef TPM_ALG_ECDH
+ TPMS_KEY_SCHEME_ECDH ecdh; /* TPM_ALG_ECDH */
+#endif
+#ifdef TPM_ALG_ECMQV
+ TPMS_KEY_SCHEME_ECMQV ecmqvh; /* TPM_ALG_ECMQV */
+#endif
+#ifdef TPM_ALG_RSASSA
+ TPMS_SIG_SCHEME_RSASSA rsassa; /* TPM_ALG_RSASSA */
+#endif
+#ifdef TPM_ALG_RSAPSS
+ TPMS_SIG_SCHEME_RSAPSS rsapss; /* TPM_ALG_RSAPSS */
+#endif
+#ifdef TPM_ALG_ECDSA
+ TPMS_SIG_SCHEME_ECDSA ecdsa; /* TPM_ALG_ECDSA */
+#endif
+#ifdef TPM_ALG_ECDAA
+ TPMS_SIG_SCHEME_ECDAA ecdaa; /* TPM_ALG_ECDAA */
+#endif
+#ifdef TPM_ALG_SM2
+ TPMS_SIG_SCHEME_SM2 sm2; /* TPM_ALG_SM2 */
+#endif
+#ifdef TPM_ALG_ECSCHNORR
+ TPMS_SIG_SCHEME_ECSCHNORR ecSchnorr; /* TPM_ALG_ECSCHNORR */
+#endif
+#ifdef TPM_ALG_RSAES
+ TPMS_ENC_SCHEME_RSAES rsaes; /* TPM_ALG_RSAES */
+#endif
+#ifdef TPM_ALG_OAEP
+ TPMS_ENC_SCHEME_OAEP oaep; /* TPM_ALG_OAEP */
+#endif
+ TPMS_SCHEME_HASH anySig;
+} TPMU_ASYM_SCHEME;
+
+/* Table 152 - Definition of TPMT_ASYM_SCHEME Structure <> */
+
+typedef struct {
+ TPMI_ALG_ASYM_SCHEME scheme; /* scheme selector */
+ TPMU_ASYM_SCHEME details; /* scheme parameters */
+} TPMT_ASYM_SCHEME;
+
+/* Table 153 - Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_SCHEME Type */
+
+typedef TPM_ALG_ID TPMI_ALG_RSA_SCHEME;
+
+/* Table 154 - Definition of {RSA} TPMT_RSA_SCHEME Structure */
+
+typedef struct {
+ TPMI_ALG_RSA_SCHEME scheme; /* scheme selector */
+ TPMU_ASYM_SCHEME details; /* scheme parameters */
+} TPMT_RSA_SCHEME;
+
+/* Table 155 - Definition of (TPM_ALG_ID) {RSA} TPMI_ALG_RSA_DECRYPT Type */
+
+typedef TPM_ALG_ID TPMI_ALG_RSA_DECRYPT;
+
+/* Table 156 - Definition of {RSA} TPMT_RSA_DECRYPT Structure */
+
+typedef struct {
+ TPMI_ALG_RSA_DECRYPT scheme; /* scheme selector */
+ TPMU_ASYM_SCHEME details; /* scheme parameters */
+} TPMT_RSA_DECRYPT;
+
+/* Table 157 - Definition of {RSA} TPM2B_PUBLIC_KEY_RSA Structure */
+
+typedef struct {
+ UINT16 size; /* size of the buffer */
+ BYTE buffer[MAX_RSA_KEY_BYTES]; /* Value */
+} PUBLIC_KEY_RSA_2B;
+
+typedef union {
+ PUBLIC_KEY_RSA_2B t;
+ TPM2B b;
+} TPM2B_PUBLIC_KEY_RSA;
+
+/* Table 158 - Definition of {RSA} (TPM_KEY_BITS) TPMI_RSA_KEY_BITS Type */
+
+typedef TPM_KEY_BITS TPMI_RSA_KEY_BITS;
+
+/* Table 159 - Definition of {RSA} TPM2B_PRIVATE_KEY_RSA Structure */
+
+typedef struct {
+ UINT16 size;
+ BYTE buffer[MAX_RSA_KEY_BYTES/2];
+} PRIVATE_KEY_RSA_2B;
+
+typedef union {
+ PRIVATE_KEY_RSA_2B t;
+ TPM2B b;
+} TPM2B_PRIVATE_KEY_RSA;
+
+/* Table 160 - Definition of {ECC} TPM2B_ECC_PARAMETER Structure */
+
+typedef struct {
+ UINT16 size; /* size of the buffer */
+ BYTE buffer[MAX_ECC_KEY_BYTES]; /* the parameter data */
+} ECC_PARAMETER_2B;
+
+typedef union {
+ ECC_PARAMETER_2B t;
+ TPM2B b;
+} TPM2B_ECC_PARAMETER;
+
+/* Table 161 - Definition of {ECC} TPMS_ECC_POINT Structure */
+
+typedef struct {
+ TPM2B_ECC_PARAMETER x; /* X coordinate */
+ TPM2B_ECC_PARAMETER y; /* Y coordinate */
+} TPMS_ECC_POINT;
+
+/* Table 162 - Definition of {ECC} TPM2B_ECC_POINT Structure */
+
+typedef struct {
+ UINT16 size; /* size of the remainder of this structure */
+ TPMS_ECC_POINT point; /* coordinates */
+} TPM2B_ECC_POINT;
+
+/* Table 163 - Definition of (TPM_ALG_ID) {ECC} TPMI_ALG_ECC_SCHEME Type */
+
+typedef TPM_ALG_ID TPMI_ALG_ECC_SCHEME;
+
+/* Table 164 - Definition of {ECC} (TPM_ECC_CURVE) TPMI_ECC_CURVE Type */
+
+typedef TPM_ECC_CURVE TPMI_ECC_CURVE;
+
+/* Table 165 - Definition of (TPMT_SIG_SCHEME) {ECC} TPMT_ECC_SCHEME Structure */
+
+typedef struct {
+ TPMI_ALG_ECC_SCHEME scheme; /* scheme selector */
+ TPMU_ASYM_SCHEME details; /* scheme parameters */
+} TPMT_ECC_SCHEME;
+
+/* Table 166 - Definition of {ECC} TPMS_ALGORITHM_DETAIL_ECC Structure <OUT> */
+
+typedef struct {
+ TPM_ECC_CURVE curveID; /* identifier for the curve */
+ UINT16 keySize; /* Size in bits of the key */
+ TPMT_KDF_SCHEME kdf; /* If not TPM_ALG_NULL, the required KDF and hash algorithm
+ used in secret sharing operations */
+ TPMT_ECC_SCHEME sign; /* If not TPM_ALG_NULL, this is the mandatory signature
+ scheme that is required to be used with this curve. */
+ TPM2B_ECC_PARAMETER p; /* Fp (the modulus) */
+ TPM2B_ECC_PARAMETER a; /* coefficient of the linear term in the curve equation */
+ TPM2B_ECC_PARAMETER b; /* constant term for curve equation */
+ TPM2B_ECC_PARAMETER gX; /* x coordinate of base point G */
+ TPM2B_ECC_PARAMETER gY; /* y coordinate of base point G */
+ TPM2B_ECC_PARAMETER n; /* order of G */
+ TPM2B_ECC_PARAMETER h; /* cofactor (a size of zero indicates a cofactor of 1) */
+} TPMS_ALGORITHM_DETAIL_ECC;
+
+/* Table 167 - Definition of {RSA} TPMS_SIGNATURE_RSA Structure */
+
+typedef struct {
+ TPMI_ALG_HASH hash; /* the hash algorithm used to digest the message TPM_ALG_NULL is not allowed. */
+ TPM2B_PUBLIC_KEY_RSA sig; /* The signature is the size of a public key. */
+} TPMS_SIGNATURE_RSA;
+
+/* Table 168 - Definition of Types for {RSA} Signature */
+
+typedef TPMS_SIGNATURE_RSA TPMS_SIGNATURE_RSASSA;
+typedef TPMS_SIGNATURE_RSA TPMS_SIGNATURE_RSAPSS;
+
+/* Table 169 - Definition of {ECC} TPMS_SIGNATURE_ECC Structure */
+
+typedef struct {
+ TPMI_ALG_HASH hash; /* the hash algorithm used in the signature process TPM_ALG_NULL is not allowed. */
+ TPM2B_ECC_PARAMETER signatureR;
+ TPM2B_ECC_PARAMETER signatureS;
+} TPMS_SIGNATURE_ECC;
+
+/* Table 170 - Definition of Types for {ECC} TPMS_SIGNATURE_ECC */
+
+typedef TPMS_SIGNATURE_ECC TPMS_SIGNATURE_ECDSA;
+typedef TPMS_SIGNATURE_ECC TPMS_SIGNATURE_ECDAA;
+typedef TPMS_SIGNATURE_ECC TPMS_SIGNATURE_SM2;
+typedef TPMS_SIGNATURE_ECC TPMS_SIGNATURE_ECSCHNORR;
+
+/* Table 171 - Definition of TPMU_SIGNATURE Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_RSASSA
+ TPMS_SIGNATURE_RSASSA rsassa; /* TPM_ALG_RSASSA */
+#endif
+#ifdef TPM_ALG_RSAPSS
+ TPMS_SIGNATURE_RSAPSS rsapss; /* TPM_ALG_RSAPSS */
+#endif
+#ifdef TPM_ALG_ECDSA
+ TPMS_SIGNATURE_ECDSA ecdsa; /* TPM_ALG_ECDSA */
+#endif
+#ifdef TPM_ALG_ECDAA
+ TPMS_SIGNATURE_ECDSA ecdaa; /* TPM_ALG_ECDAA */
+#endif
+#ifdef TPM_ALG_SM2
+ TPMS_SIGNATURE_ECDSA sm2; /* TPM_ALG_SM2 */
+#endif
+#ifdef TPM_ALG_ECSCHNORR
+ TPMS_SIGNATURE_ECDSA ecschnorr; /* TPM_ALG_ECSCHNORR */
+#endif
+#ifdef TPM_ALG_HMAC
+ TPMT_HA hmac; /* TPM_ALG_HMAC */
+#endif
+ TPMS_SCHEME_HASH any; /* used to access the hash */
+} TPMU_SIGNATURE;
+
+/* Table 172 - Definition of TPMT_SIGNATURE Structure */
+
+typedef struct {
+ TPMI_ALG_SIG_SCHEME sigAlg; /* selector of the algorithm used to construct the signature */
+ TPMU_SIGNATURE signature; /* This shall be the actual signature information. */
+} TPMT_SIGNATURE;
+
+/* Table 173 - Definition of TPMU_ENCRYPTED_SECRET Union <S> */
+
+typedef union {
+#ifdef TPM_ALG_ECC
+ BYTE ecc[sizeof(TPMS_ECC_POINT)]; /* TPM_ALG_ECC */
+#endif
+#ifdef TPM_ALG_RSA
+ BYTE rsa[MAX_RSA_KEY_BYTES]; /* TPM_ALG_RSA */
+#endif
+#ifdef TPM_ALG_SYMCIPHER
+ BYTE symmetric[sizeof(TPM2B_DIGEST)]; /* TPM_ALG_SYMCIPHER */
+#endif
+#ifdef TPM_ALG_KEYEDHASH
+ BYTE keyedHash[sizeof(TPM2B_DIGEST)]; /* TPM_ALG_KEYEDHASH */
+#endif
+} TPMU_ENCRYPTED_SECRET;
+
+/* Table 174 - Definition of TPM2B_ENCRYPTED_SECRET Structure */
+
+typedef struct {
+ UINT16 size; /* size of the secret value */
+ BYTE secret[sizeof(TPMU_ENCRYPTED_SECRET)]; /* secret */
+} ENCRYPTED_SECRET_2B;
+
+typedef union {
+ ENCRYPTED_SECRET_2B t;
+ TPM2B b;
+} TPM2B_ENCRYPTED_SECRET;
+
+/* Table 175 - Definition of (TPM_ALG_ID) TPMI_ALG_PUBLIC Type */
+
+typedef TPM_ALG_ID TPMI_ALG_PUBLIC;
+
+/* Table 176 - Definition of TPMU_PUBLIC_ID Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_KEYEDHASH
+ TPM2B_DIGEST keyedHash; /* TPM_ALG_KEYEDHASH */
+#endif
+#ifdef TPM_ALG_SYMCIPHER
+ TPM2B_DIGEST sym; /* TPM_ALG_SYMCIPHER */
+#endif
+#ifdef TPM_ALG_RSA
+ TPM2B_PUBLIC_KEY_RSA rsa; /* TPM_ALG_RSA */
+#endif
+#ifdef TPM_ALG_ECC
+ TPMS_ECC_POINT ecc; /* TPM_ALG_ECC */
+#endif
+ TPMS_DERIVE derive; /* only allowed for TPM2_CreateLoaded when
+ parentHandle is a Derivation Parent */
+} TPMU_PUBLIC_ID;
+
+/* Table 177 - Definition of TPMS_KEYEDHASH_PARMS Structure */
+
+typedef struct {
+ TPMT_KEYEDHASH_SCHEME scheme; /* Indicates the signing method used for a keyedHash signing object */
+} TPMS_KEYEDHASH_PARMS;
+
+/* Table 178 - Definition of TPMS_ASYM_PARMS Structure <> */
+
+typedef struct {
+ TPMT_SYM_DEF_OBJECT symmetric; /* the companion symmetric algorithm for a restricted decryption key */
+ TPMT_ASYM_SCHEME scheme; /* for a key with the sign attribute SET, a valid signing scheme for the key type */
+} TPMS_ASYM_PARMS;
+
+/* Table 179 - Definition of {RSA} TPMS_RSA_PARMS Structure */
+
+typedef struct {
+ TPMT_SYM_DEF_OBJECT symmetric; /* for a restricted decryption key, shall be set to a supported symmetric algorithm, key size, and mode. */
+ TPMT_RSA_SCHEME scheme; /* for an unrestricted signing key, shall be either TPM_ALG_RSAPSS TPM_ALG_RSASSA or TPM_ALG_NULL */
+ TPMI_RSA_KEY_BITS keyBits; /* number of bits in the public modulus */
+ UINT32 exponent; /* the public exponent */
+} TPMS_RSA_PARMS;
+
+/* Table 180 - Definition of {ECC} TPMS_ECC_PARMS Structure */
+
+typedef struct {
+ TPMT_SYM_DEF_OBJECT symmetric; /* for a restricted decryption key, shall be set to a supported symmetric algorithm, key size. and mode. */
+ TPMT_ECC_SCHEME scheme; /* If the sign attribute of the key is SET, then this shall be a valid signing scheme. */
+ TPMI_ECC_CURVE curveID; /* ECC curve ID */
+ TPMT_KDF_SCHEME kdf; /* an optional key derivation scheme for generating a symmetric key from a Z value */
+} TPMS_ECC_PARMS;
+
+/* Table 181 - Definition of TPMU_PUBLIC_PARMS Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_KEYEDHASH
+ TPMS_KEYEDHASH_PARMS keyedHashDetail; /* TPM_ALG_KEYEDHASH */
+#endif
+#ifdef TPM_ALG_SYMCIPHER
+ TPMS_SYMCIPHER_PARMS symDetail; /* TPM_ALG_SYMCIPHER */
+#endif
+#ifdef TPM_ALG_RSA
+ TPMS_RSA_PARMS rsaDetail; /* TPM_ALG_RSA */
+#endif
+#ifdef TPM_ALG_ECC
+ TPMS_ECC_PARMS eccDetail; /* TPM_ALG_ECC */
+#endif
+ TPMS_ASYM_PARMS asymDetail; /* common scheme structure for RSA and ECC keys */
+} TPMU_PUBLIC_PARMS;
+
+/* Table 182 - Definition of TPMT_PUBLIC_PARMS Structure */
+
+typedef struct {
+ TPMI_ALG_PUBLIC type; /* the algorithm to be tested */
+ TPMU_PUBLIC_PARMS parameters; /* the algorithm details */
+} TPMT_PUBLIC_PARMS;
+
+/* Table 183 - Definition of TPMT_PUBLIC Structure */
+
+typedef struct {
+ TPMI_ALG_PUBLIC type; /* "algorithm" associated with this object */
+ TPMI_ALG_HASH nameAlg; /* algorithm used for computing the Name of the object */
+ TPMA_OBJECT objectAttributes; /* attributes that, along with type, determine the manipulations of this object */
+ TPM2B_DIGEST authPolicy; /* optional policy for using this key */
+ TPMU_PUBLIC_PARMS parameters; /* the algorithm or structure details */
+ TPMU_PUBLIC_ID unique; /* the unique identifier of the structure */
+} TPMT_PUBLIC;
+
+/* Table 184 - Definition of TPM2B_PUBLIC Structure */
+
+typedef struct {
+ UINT16 size; /* size of publicArea */
+ TPMT_PUBLIC publicArea; /* the public area */
+} TPM2B_PUBLIC;
+
+/* Table 192 - Definition of TPM2B_TEMPLATE Structure */
+
+typedef union {
+ struct {
+ UINT16 size; /* size of publicArea */
+ BYTE buffer[sizeof(TPMT_PUBLIC)]; /* the public area */
+ } t;
+ TPM2B b;
+} TPM2B_TEMPLATE;
+
+/* Table 186 - Definition of TPMU_SENSITIVE_COMPOSITE Union <IN/OUT, S> */
+
+typedef union {
+#ifdef TPM_ALG_RSA
+ TPM2B_PRIVATE_KEY_RSA rsa; /* TPM_ALG_RSA a prime factor of the public key */
+#endif
+#ifdef TPM_ALG_ECC
+ TPM2B_ECC_PARAMETER ecc; /* TPM_ALG_ECC the integer private key */
+#endif
+#ifdef TPM_ALG_KEYEDHASH
+ TPM2B_SENSITIVE_DATA bits; /* TPM_ALG_KEYEDHASH the private data */
+#endif
+#ifdef TPM_ALG_SYMCIPHER
+ TPM2B_SYM_KEY sym; /* TPM_ALG_SYMCIPHER the symmetric key */
+#endif
+} TPMU_SENSITIVE_COMPOSITE;
+
+/* Table 187 - Definition of TPMT_SENSITIVE Structure */
+
+typedef struct {
+ TPMI_ALG_PUBLIC sensitiveType; /* identifier for the sensitive area */
+ TPM2B_AUTH authValue; /* user authorization data */
+ TPM2B_DIGEST seedValue; /* for asymmetric key object, the optional protection seed; for other objects, the obfuscation value */
+ TPMU_SENSITIVE_COMPOSITE sensitive; /* the type-specific private data */
+} TPMT_SENSITIVE;
+
+/* Table 188 - Definition of TPM2B_SENSITIVE Structure <IN/OUT> */
+
+typedef struct {
+ UINT16 size; /* size of the private structure */
+ TPMT_SENSITIVE sensitiveArea; /* an unencrypted sensitive area */
+} SENSITIVE_2B;
+
+typedef union {
+ SENSITIVE_2B t;
+ TPM2B b;
+} TPM2B_SENSITIVE;
+
+/* Table 189 - Definition of _PRIVATE Structure <> */
+
+typedef struct {
+ TPM2B_DIGEST integrityOuter;
+ TPM2B_DIGEST integrityInner; /* could also be a TPM2B_IV */
+ TPM2B_SENSITIVE sensitive; /* the sensitive area */
+} _PRIVATE;
+
+/* Table 190 - Definition of TPM2B_PRIVATE Structure <IN/OUT, S> */
+
+typedef struct {
+ UINT16 size; /* size of the private structure */
+ BYTE buffer[sizeof(_PRIVATE)]; /* an encrypted private area */
+} PRIVATE_2B;
+
+typedef union {
+ PRIVATE_2B t;
+ TPM2B b;
+} TPM2B_PRIVATE;
+
+/* Table 191 - Definition of _ID_OBJECT Structure <> */
+
+typedef struct {
+ TPM2B_DIGEST integrityHMAC; /* HMAC using the nameAlg of the storage key on the target TPM */
+ TPM2B_DIGEST encIdentity; /* credential protector information returned if name matches the referenced object */
+} _ID_OBJECT;
+
+/* Table 192 - Definition of TPM2B_ID_OBJECT Structure <IN/OUT> */
+
+typedef struct {
+ UINT16 size; /* size of the credential structure */
+ BYTE credential[sizeof(_ID_OBJECT)]; /* an encrypted credential area */
+} ID_OBJECT_2B;
+
+typedef union {
+ ID_OBJECT_2B t;
+ TPM2B b;
+} TPM2B_ID_OBJECT;
+
+/* Table 193 - Definition of (UINT32) TPM_NV_INDEX Bits <> */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int index : 24; /* 23:0 The Index of the NV location */
+ unsigned int RH_NV : 8; /* 31:24 constant value of TPM_HT_NV_INDEX indicating the NV Index range */
+ };
+ UINT32 val;
+} TPM_NV_INDEX;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int RH_NV : 8; /* 31:24 constant value of TPM_HT_NV_INDEX indicating the NV Index range */
+ unsigned int index : 24; /* 23:0 The Index of the NV location */
+ };
+ UINT32 val;
+} TPM_NV_INDEX;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPM_NV_INDEX;
+
+#endif
+
+#define TPM_NV_INDEX_INDEX 0x00ffffff
+#define TPM_NV_INDEX_RH_NV 0xff000000
+
+/* Table 194 - Definition of TPM_NT Constants */
+
+#define TPM_NT_ORDINARY 0x0 /* Ordinary - contains data that is opaque to the TPM that can only be modified using TPM2_NV_Write(). */
+#define TPM_NT_COUNTER 0x1 /* Counter - contains an 8-octet value that is to be used as a
+ counter and can only be modified with TPM2_NV_Increment() */
+#define TPM_NT_BITS 0x2 /* Bit Field - contains an 8-octet value to be used as a bit field
+ and can only be modified with TPM2_NV_SetBits(). */
+#define TPM_NT_EXTEND 0x4 /* Extend - contains a digest-sized value used like a PCR. The Index
+ can only be modified using TPM2_NV_Extend(). The extend will use
+ the nameAlg of the Index. */
+#define TPM_NT_PIN_FAIL 0x8 /* PIN Fail - contains a PIN limit and a PIN count that increments on a PIN authorization failure */
+#define TPM_NT_PIN_PASS 0x9 /* PIN Pass - contains a PIN limit and a PIN count that increments on a PIN authorization success */
+
+/* Table 204 - Definition of TPMS_NV_PIN_COUNTER_PARAMETERS Structure */
+
+typedef struct {
+ uint32_t pinCount; /* This counter shows the current number of successful authValue
+ authorization attempts to access a TPM_NT_PIN_PASS index or the current
+ number of unsuccessful authValue authorization attempts to access a
+ TPM_NT_PIN_FAIL index. */
+ uint32_t pinLimit; /* This threshold is the value of pinCount at which the authValue
+ authorization of the host TPM_NT_PIN_PASS or TPM_NT_PIN_FAIL index is
+ locked out. */
+} TPMS_NV_PIN_COUNTER_PARAMETERS;
+
+/* Table 205 - Definition of (UINT32) TPMA_NV Bits */
+
+#if defined TPM_BITFIELD_LE
+
+typedef union {
+ struct {
+ unsigned int TPMA_NV_PPWRITE : 1; /* 0 The Index data can be written if Platform Authorization is provided. */
+ unsigned int TPMA_NV_OWNERWRITE : 1; /* 1 The Index data can be written if Owner Authorization is provided. */
+ unsigned int TPMA_NV_AUTHWRITE : 1; /* 2 Authorizations to change the Index contents that require USER role may be provided with an HMAC session or password. */
+ unsigned int TPMA_NV_POLICYWRITE : 1; /* 3 Authorizations to change the Index contents that require USER role may be provided with a policy session. */
+ unsigned int TPM_NT : 4; /* 7:4 The type of the index */
+ unsigned int Reserved1 : 2; /* 9:8 shall be zero reserved for future use */
+ unsigned int TPMA_NV_POLICY_DELETE : 1; /* 10 Index may not be deleted unless the authPolicy is satisfied. */
+ unsigned int TPMA_NV_WRITELOCKED : 1; /* 11 Index cannot be written. */
+ unsigned int TPMA_NV_WRITEALL : 1; /* 12 A partial write of the Index data is not allowed. The write size shall match the defined space size. */
+ unsigned int TPMA_NV_WRITEDEFINE : 1; /* 13 TPM2_NV_WriteLock() may be used to prevent further writes to this location. */
+ unsigned int TPMA_NV_WRITE_STCLEAR : 1; /* 14 TPM2_NV_WriteLock() may be used to prevent further writes to this location until the next TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_GLOBALLOCK : 1; /* 15 If TPM2_NV_GlobalLock() is successful, then further writes are not permitted until the next TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_PPREAD : 1; /* 16 The Index data can be read if Platform Authorization is provided. */
+ unsigned int TPMA_NV_OWNERREAD : 1; /* 17 The Index data can be read if Owner Authorization is provided. */
+ unsigned int TPMA_NV_AUTHREAD : 1; /* 18 The Index data may be read if the authValue is provided. */
+ unsigned int TPMA_NV_POLICYREAD : 1; /* 19 The Index data may be read if the authPolicy is satisfied. */
+ unsigned int Reserved2 : 5; /* 24:20 shall be zero reserved for future use */
+ unsigned int TPMA_NV_NO_DA : 1; /* 25 Authorization failures of the Index do not affect the DA logic */
+ unsigned int TPMA_NV_ORDERLY : 1; /* 26 NV Index state is only required to be saved when the TPM performs an orderly shutdown */
+ unsigned int TPMA_NV_CLEAR_STCLEAR : 1; /* 27 TPMA_NV_WRITTEN for the Index is CLEAR by TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_READLOCKED : 1; /* 28 Reads of the Index are blocked until the next TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_WRITTEN : 1; /* 29 Index has been written. */
+ unsigned int TPMA_NV_PLATFORMCREATE : 1; /* 30 This Index may be undefined with Platform Authorization but not with Owner Authorization. */
+ unsigned int TPMA_NV_READ_STCLEAR : 1; /* 31 TPM2_NV_ReadLock() may be used to SET TPMA_NV_READLOCKED for this Index. */
+ };
+ UINT32 val;
+} TPMA_NV;
+
+#elif defined TPM_BITFIELD_BE
+
+typedef union {
+ struct {
+ unsigned int TPMA_NV_READ_STCLEAR : 1; /* 31 TPM2_NV_ReadLock() may be used to SET TPMA_NV_READLOCKED for this Index. */
+ unsigned int TPMA_NV_PLATFORMCREATE : 1; /* 30 This Index may be undefined with Platform Authorization but not with Owner Authorization. */
+ unsigned int TPMA_NV_WRITTEN : 1; /* 29 Index has been written. */
+ unsigned int TPMA_NV_READLOCKED : 1; /* 28 Reads of the Index are blocked until the next TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_CLEAR_STCLEAR : 1; /* 27 TPMA_NV_WRITTEN for the Index is CLEAR by TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_ORDERLY : 1; /* 26 NV Index state is only required to be saved when the TPM performs an orderly shutdown */
+ unsigned int TPMA_NV_NO_DA : 1; /* 25 Authorization failures of the Index do not affect the DA logic */
+ unsigned int Reserved2 : 5; /* 24:20 shall be zero reserved for future use */
+ unsigned int TPMA_NV_POLICYREAD : 1; /* 19 The Index data may be read if the authPolicy is satisfied. */
+ unsigned int TPMA_NV_AUTHREAD : 1; /* 18 The Index data may be read if the authValue is provided. */
+ unsigned int TPMA_NV_OWNERREAD : 1; /* 17 The Index data can be read if Owner Authorization is provided. */
+ unsigned int TPMA_NV_PPREAD : 1; /* 16 The Index data can be read if Platform Authorization is provided. */
+ unsigned int TPMA_NV_GLOBALLOCK : 1; /* 15 If TPM2_NV_GlobalLock() is successful, then further writes are not permitted until the next TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_WRITE_STCLEAR : 1; /* 14 TPM2_NV_WriteLock() may be used to prevent further writes to this location until the next TPM Reset or TPM Restart. */
+ unsigned int TPMA_NV_WRITEDEFINE : 1; /* 13 TPM2_NV_WriteLock() may be used to prevent further writes to this location. */
+ unsigned int TPMA_NV_WRITEALL : 1; /* 12 A partial write of the Index data is not allowed. The write size shall match the defined space size. */
+ unsigned int TPMA_NV_WRITELOCKED : 1; /* 11 Index cannot be written. */
+ unsigned int TPMA_NV_POLICY_DELETE : 1; /* 10 Index may not be deleted unless the authPolicy is satisfied. */
+ unsigned int Reserved1 : 2; /* 9:8 shall be zero reserved for future use */
+ unsigned int TPM_NT : 4; /* 7:4 The type of the index */
+ unsigned int TPMA_NV_POLICYWRITE : 1; /* 3 Authorizations to change the Index contents that require USER role may be provided with a policy session. */
+ unsigned int TPMA_NV_AUTHWRITE : 1; /* 2 Authorizations to change the Index contents that require USER role may be provided with an HMAC session or password. */
+ unsigned int TPMA_NV_OWNERWRITE : 1; /* 1 The Index data can be written if Owner Authorization is provided. */
+ unsigned int TPMA_NV_PPWRITE : 1; /* 0 The Index data can be written if Platform Authorization is provided. */
+ };
+ UINT32 val;
+} TPMA_NV;
+
+#else
+
+typedef struct {
+ UINT32 val;
+} TPMA_NV;
+
+#endif
+
+#define TPMA_NVA_PPWRITE 0x00000001
+#define TPMA_NVA_OWNERWRITE 0x00000002
+#define TPMA_NVA_AUTHWRITE 0x00000004
+#define TPMA_NVA_POLICYWRITE 0x00000008
+#define TPMA_NVA_ORDINARY 0x00000000
+#define TPMA_NVA_COUNTER 0x00000010
+#define TPMA_NVA_BITS 0x00000020
+#define TPMA_NVA_EXTEND 0x00000040
+#define TPMA_NVA_PIN_FAIL 0x00000080
+#define TPMA_NVA_PIN_PASS 0x00000090
+#define TPMA_NVA_RESERVED1 0x00000300
+#define TPMA_NVA_POLICY_DELETE 0x00000400
+#define TPMA_NVA_WRITELOCKED 0x00000800
+#define TPMA_NVA_WRITEALL 0x00001000
+#define TPMA_NVA_WRITEDEFINE 0x00002000
+#define TPMA_NVA_WRITE_STCLEAR 0x00004000
+#define TPMA_NVA_GLOBALLOCK 0x00008000
+#define TPMA_NVA_PPREAD 0x00010000
+#define TPMA_NVA_OWNERREAD 0x00020000
+#define TPMA_NVA_AUTHREAD 0x00040000
+#define TPMA_NVA_POLICYREAD 0x00080000
+#define TPMA_NVA_RESERVED2 0x01f00000
+#define TPMA_NVA_NO_DA 0x02000000
+#define TPMA_NVA_ORDERLY 0x04000000
+#define TPMA_NVA_CLEAR_STCLEAR 0x08000000
+#define TPMA_NVA_READLOCKED 0x10000000
+#define TPMA_NVA_WRITTEN 0x20000000
+#define TPMA_NVA_PLATFORMCREATE 0x40000000
+#define TPMA_NVA_READ_STCLEAR 0x80000000
+
+#define TPMA_NVA_TPM_NT_MASK 0x000000f0
+#define TPMA_NV_RESERVED (TPMA_NVA_RESERVED1 | TPMA_NVA_RESERVED2)
+
+/* Table 197 - Definition of TPMS_NV_PUBLIC Structure */
+
+typedef struct {
+ TPMI_RH_NV_INDEX nvIndex; /* the handle of the data area */
+ TPMI_ALG_HASH nameAlg; /* hash algorithm used to compute the name of the Index and used for the authPolicy */
+ TPMA_NV attributes; /* the Index attributes */
+ TPM2B_DIGEST authPolicy; /* optional access policy for the Index */
+ UINT16 dataSize; /* the size of the data area */
+} TPMS_NV_PUBLIC;
+
+/* Table 198 - Definition of TPM2B_NV_PUBLIC Structure */
+
+typedef struct {
+ UINT16 size; /* size of nvPublic */
+ TPMS_NV_PUBLIC nvPublic; /* the public area */
+} TPM2B_NV_PUBLIC;
+
+/* Table 199 - Definition of TPM2B_CONTEXT_SENSITIVE Structure <IN/OUT> */
+
+typedef struct {
+ UINT16 size;
+ BYTE buffer[MAX_CONTEXT_SIZE]; /* the sensitive data */
+} CONTEXT_SENSITIVE_2B;
+
+typedef union {
+ CONTEXT_SENSITIVE_2B t;
+ TPM2B b;
+} TPM2B_CONTEXT_SENSITIVE;
+
+/* Table 200 - Definition of TPMS_CONTEXT_DATA Structure <IN/OUT, S> */
+
+typedef struct {
+ TPM2B_DIGEST integrity; /* the integrity value */
+ TPM2B_CONTEXT_SENSITIVE encrypted; /* the sensitive area */
+} TPMS_CONTEXT_DATA;
+
+/* Table 201 - Definition of TPM2B_CONTEXT_DATA Structure <IN/OUT> */
+
+typedef struct {
+ UINT16 size;
+ BYTE buffer[sizeof(TPMS_CONTEXT_DATA)];
+} CONTEXT_DATA_2B;
+
+typedef union {
+ CONTEXT_DATA_2B t;
+ TPM2B b;
+} TPM2B_CONTEXT_DATA;
+
+/* Table 202 - Definition of TPMS_CONTEXT Structure */
+
+typedef struct {
+ UINT64 sequence; /* the sequence number of the context */
+ TPMI_DH_SAVED savedHandle; /* a handle indicating if the context is a session, object or sequence object */
+ TPMI_RH_HIERARCHY hierarchy; /* the hierarchy of the context */
+ TPM2B_CONTEXT_DATA contextBlob; /* the context data and integrity HMAC */
+} TPMS_CONTEXT;
+
+/* Table 203 - Context Handle Values */
+
+#define TPM_CONTEXT_HANDLE_HMAC 0x02000000 /* an HMAC session context */
+#define TPM_CONTEXT_HANDLE_POLICY_SESSION 0x03000000 /* a policy session context */
+#define TPM_CONTEXT_HANDLE_TRANSIENT 0x80000000 /* an ordinary transient object */
+#define TPM_CONTEXT_HANDLE_SEQUENCE 0x80000001 /* a sequence object */
+#define TPM_CONTEXT_HANDLE_STCLEAR 0x80000002 /* a transient object with the stClear attribute SET */
+
+/* Table 204 - Definition of TPMS_CREATION_DATA Structure <OUT> */
+
+typedef struct {
+ TPML_PCR_SELECTION pcrSelect; /* list indicating the PCR included in pcrDigest */
+ TPM2B_DIGEST pcrDigest; /* digest of the selected PCR using nameAlg of the object for which this structure is being created */
+ TPMA_LOCALITY locality; /* the locality at which the object was created */
+ TPM_ALG_ID parentNameAlg; /* nameAlg of the parent */
+ TPM2B_NAME parentName; /* Name of the parent at time of creation */
+ TPM2B_NAME parentQualifiedName; /* Qualified Name of the parent at the time of creation */
+ TPM2B_DATA outsideInfo; /* association with additional information added by the key creator */
+} TPMS_CREATION_DATA;
+
+/* Table 205 - Definition of TPM2B_CREATION_DATA Structure <OUT> */
+
+typedef struct {
+ UINT16 size; /* size of the creation data */
+ TPMS_CREATION_DATA creationData;
+} TPM2B_CREATION_DATA;
+
+typedef struct tdNTC2_CFG_STRUCT {
+ uint8_t i2cLoc1_2;
+ uint8_t i2cLoc3_4;
+ uint8_t AltCfg;
+ uint8_t Direction;
+ uint8_t PullUp;
+ uint8_t PushPull;
+ uint8_t CFG_A;
+ uint8_t CFG_B;
+ uint8_t CFG_C;
+ uint8_t CFG_D;
+ uint8_t CFG_E;
+ uint8_t CFG_F;
+ uint8_t CFG_G;
+ uint8_t CFG_H;
+ uint8_t CFG_I;
+ uint8_t CFG_J;
+ uint8_t IsValid; /* Must be AAh */
+ uint8_t IsLocked; /* Ignored on NTC2_PreConfig, NTC2_GetConfig returns AAh once configuration
+ is locked. */
+} NTC2_CFG_STRUCT;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TakeOwnership_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TakeOwnership_fp.h
new file mode 100644
index 000000000..20a8f6664
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TakeOwnership_fp.h
@@ -0,0 +1,67 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 TakeOwnership */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: TakeOwnership_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TAKEOWNERSHIP_FP_H
+#define TAKEOWNERSHIP_FP_H
+
+#include <ibmtss/tpmtypes12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#include <ibmtss/Implementation.h>
+
+typedef struct {
+ TPM_PROTOCOL_ID protocolID;
+ uint32_t encOwnerAuthSize;
+ uint8_t encOwnerAuth[MAX_RSA_KEY_BYTES];
+ uint32_t encSrkAuthSize;
+ uint8_t encSrkAuth[MAX_RSA_KEY_BYTES];
+ TPM_KEY12 srkParams;
+} TakeOwnership_In;
+
+typedef struct {
+ TPM_KEY12 srkPub;
+} TakeOwnership_Out;
+
+TPM_RC
+TPM2_TakeOwnership(
+ TakeOwnership_In *in, // IN: input parameter buffer
+ TakeOwnership_Out *out // OUT: output parameter buffer
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TestParms_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TestParms_fp.h
new file mode 100644
index 000000000..1d0ca4d3c
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TestParms_fp.h
@@ -0,0 +1,79 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: TestParms_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef TESTPARMS_FP_H
+#define TESTPARMS_FP_H
+
+typedef struct {
+ TPMT_PUBLIC_PARMS parameters;
+} TestParms_In;
+
+#define RC_TestParms_parameters (TPM_RC_P + TPM_RC_1)
+
+TPM_RC
+TPM2_TestParms(
+ TestParms_In *in // IN: input parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TpmBuildSwitches.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TpmBuildSwitches.h
new file mode 100644
index 000000000..e61d9ed5d
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/TpmBuildSwitches.h
@@ -0,0 +1,87 @@
+/********************************************************************************/
+/* */
+/* TSS Compiler Build Switches */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: TpmBuildSwitches.h 1294 2018-08-09 19:08:34Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2018 */
+/* */
+/********************************************************************************/
+
+// 5.12 TpmBuildSwitches.h
+
+// This file contains the build switches.
+
+#ifndef _TPM_BUILD_SWITCHES_H
+#define _TPM_BUILD_SWITCHES_H
+
+// Switch added to support packed lists that leave out space associated with unimplemented
+// commands. Comment this out to use linear lists. NOTE: if vendor specific commands are present,
+// the associated list is always in compressed form.
+#define COMPRESSED_LISTS
+
+#ifdef _MSC_VER
+// This macro is used to handle LIB_EXPORT of function and variable names in lieu of a .def
+// file. Visual Studio requires that functions be explicity exported and imported.
+# define LIB_EXPORT __declspec(dllexport) // VS compatible version
+#endif
+
+// The following definitions are used if they have not already been defined. The defaults for these
+// settings are compatible with ISO/IEC 9899:2011 (E)
+
+#ifndef LIB_EXPORT
+# define LIB_EXPORT
+#endif
+
+#endif // _TPM_BUILD_SWITCHES_H
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal12_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal12_fp.h
new file mode 100644
index 000000000..60149e0e0
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal12_fp.h
@@ -0,0 +1,94 @@
+/********************************************************************************/
+/* */
+/* Parameter Unmarshaling */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Unmarshal12_fp.h 1285 2018-07-27 18:33:41Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018 */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef UNMARSHAL12_FP_H
+#define UNMARSHAL12_FP_H
+
+#include "TPM_Types.h"
+#include "tpmtypes12.h"
+#include <ibmtss/tpmstructures12.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ TPM_RC
+ TSS_TPM_STARTUP_TYPE_Unmarshalu(TPM_STARTUP_TYPE *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_VERSION_Unmarshalu(TPM_VERSION *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_TAG_Unmarshalu(TPM_TAG *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PCR_SELECTION_Unmarshalu(TPM_PCR_SELECTION *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM4B_TPM_PCR_INFO_LONG_Unmarshalu(TPM_PCR_INFO_LONG *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PCR_INFO_LONG_Unmarshalu(TPM_PCR_INFO_LONG *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PCR_INFO_SHORT_Unmarshalu(TPM_PCR_INFO_SHORT *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_SYMMETRIC_KEY_Unmarshalu(TPM_SYMMETRIC_KEY *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_RSA_KEY_PARMS_Unmarshalu(TPM_RSA_KEY_PARMS *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPMU_PARMS_Unmarshalu(TPMU_PARMS *target, BYTE **buffer, uint32_t *size, uint32_t selector);
+ TPM_RC
+ TSS_TPM4B_TPMU_PARMS_Unmarshalu(TPMU_PARMS *target, BYTE **buffer, uint32_t *size, uint32_t selector);
+ TPM_RC
+ TSS_TPM_KEY_PARMS_Unmarshalu(TPM_KEY_PARMS *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_KEY12_Unmarshalu(TPM_KEY12 *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_STORE_PUBKEY_Unmarshalu(TPM_STORE_PUBKEY *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PUBKEY_Unmarshalu(TPM_PUBKEY *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_NV_ATTRIBUTES_Unmarshalu(TPM_NV_ATTRIBUTES *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_NV_DATA_PUBLIC_Unmarshalu(TPM_NV_DATA_PUBLIC *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_CAP_VERSION_INFO_Unmarshalu(TPM_CAP_VERSION_INFO *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_DA_INFO_Unmarshalu(TPM_DA_INFO *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_DA_INFO_LIMITED_Unmarshalu(TPM_DA_INFO_LIMITED *target, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_DA_ACTION_TYPE_Unmarshalu(TPM_DA_ACTION_TYPE *target, BYTE **buffer, uint32_t *size);
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal_fp.h
new file mode 100644
index 000000000..cd3062e7b
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unmarshal_fp.h
@@ -0,0 +1,696 @@
+/********************************************************************************/
+/* */
+/* Unmarshal Functions */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2019 */
+/* */
+/********************************************************************************/
+
+/* The functions with the TSS_ prefix are preferred. They use an unsigned size. The functions
+ without the prefix are deprecated. */
+
+#ifndef UNMARSHAL_FP_H
+#define UNMARSHAL_FP_H
+
+#include "TPM_Types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ LIB_EXPORT TPM_RC
+ TSS_UINT8_Unmarshalu(UINT8 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_INT8_Unmarshalu(INT8 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT16_Unmarshalu(UINT16 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT32_Unmarshalu(UINT32 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_INT32_Unmarshalu(INT32 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT64_Unmarshalu(UINT64 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_Array_Unmarshalu(BYTE *targetBuffer, UINT16 targetSize, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_Unmarshalu(TPM2B *target, UINT16 targetSize, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_KEY_BITS_Unmarshalu(TPM_KEY_BITS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_GENERATED_Unmarshalu(TPM_GENERATED *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ALG_ID_Unmarshalu(TPM_ALG_ID *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ECC_CURVE_Unmarshalu(TPM_ECC_CURVE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CC_Unmarshalu(TPM_RC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_RC_Unmarshalu(TPM_RC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CLOCK_ADJUST_Unmarshalu(TPM_CLOCK_ADJUST *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_EO_Unmarshalu(TPM_EO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ST_Unmarshalu(TPM_ST *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_SU_Unmarshalu(TPM_SU *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_SE_Unmarshalu(TPM_SE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CAP_Unmarshalu(TPM_CAP *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_PT_Unmarshalu(TPM_HANDLE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_PT_PCR_Unmarshalu(TPM_PT_PCR *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_HANDLE_Unmarshalu(TPM_HANDLE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_ALGORITHM_Unmarshalu(TPMA_ALGORITHM *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_OBJECT_Unmarshalu(TPMA_OBJECT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_SESSION_Unmarshalu(TPMA_SESSION *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_LOCALITY_Unmarshalu(TPMA_LOCALITY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_CC_Unmarshalu(TPMA_CC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_YES_NO_Unmarshalu(TPMI_YES_NO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_OBJECT_Unmarshalu(TPMI_DH_OBJECT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PARENT_Unmarshalu(TPMI_DH_PARENT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PERSISTENT_Unmarshalu(TPMI_DH_PERSISTENT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_ENTITY_Unmarshalu(TPMI_DH_ENTITY *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PCR_Unmarshalu(TPMI_DH_PCR *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_AUTH_SESSION_Unmarshalu(TPMI_SH_AUTH_SESSION *target, BYTE **buffer, uint32_t *size, BOOL allowPwd);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_HMAC_Unmarshalu(TPMI_SH_HMAC *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_POLICY_Unmarshalu(TPMI_SH_POLICY *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_CONTEXT_Unmarshalu(TPMI_DH_CONTEXT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_SAVED_Unmarshalu(TPMI_DH_SAVED *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_Unmarshalu(TPMI_RH_HIERARCHY *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_ENABLES_Unmarshalu(TPMI_RH_ENABLES *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_AUTH_Unmarshalu(TPMI_RH_HIERARCHY_AUTH *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_PLATFORM_Unmarshalu(TPMI_RH_PLATFORM *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_ENDORSEMENT_Unmarshalu(TPMI_RH_ENDORSEMENT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_PROVISION_Unmarshalu(TPMI_RH_PROVISION *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_CLEAR_Unmarshalu(TPMI_RH_CLEAR *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_NV_AUTH_Unmarshalu(TPMI_RH_NV_AUTH *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_LOCKOUT_Unmarshalu(TPMI_RH_LOCKOUT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_NV_INDEX_Unmarshalu(TPMI_RH_NV_INDEX *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_HASH_Unmarshalu(TPMI_ALG_HASH *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_Unmarshalu(TPMI_ALG_SYM *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_OBJECT_Unmarshalu(TPMI_ALG_SYM_OBJECT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_MODE_Unmarshalu(TPMI_ALG_SYM_MODE *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_KDF_Unmarshalu(TPMI_ALG_KDF *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SIG_SCHEME_Unmarshalu(TPMI_ALG_SIG_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ECC_KEY_EXCHANGE_Unmarshalu(TPMI_ECC_KEY_EXCHANGE *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ST_COMMAND_TAG_Unmarshalu(TPMI_ST_COMMAND_TAG *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_MAC_SCHEME_Unmarshalu(TPMI_ALG_MAC_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_CIPHER_MODE_Unmarshalu(TPMI_ALG_CIPHER_MODE *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_EMPTY_Unmarshalu(TPMS_EMPTY *target, BYTE **buffer, uint32_t *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_HA_Unmarshalu(TPMU_HA *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_HA_Unmarshalu(TPMT_HA *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_DIGEST_Unmarshalu(TPM2B_DIGEST *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_DATA_Unmarshalu(TPM2B_DATA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NONCE_Unmarshalu(TPM2B_NONCE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_AUTH_Unmarshalu(TPM2B_AUTH *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_OPERAND_Unmarshalu(TPM2B_OPERAND *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_EVENT_Unmarshalu(TPM2B_EVENT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_MAX_BUFFER_Unmarshalu(TPM2B_MAX_BUFFER *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_MAX_NV_BUFFER_Unmarshalu(TPM2B_MAX_NV_BUFFER *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_TIMEOUT_Unmarshalu(TPM2B_TIMEOUT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_IV_Unmarshalu(TPM2B_IV *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NAME_Unmarshalu(TPM2B_NAME *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_PCR_SELECTION_Unmarshalu(TPMS_PCR_SELECTION *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_CREATION_Unmarshalu(TPMT_TK_CREATION *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_VERIFIED_Unmarshalu(TPMT_TK_VERIFIED *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_AUTH_Unmarshalu(TPMT_TK_AUTH *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_HASHCHECK_Unmarshalu(TPMT_TK_HASHCHECK *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ALG_PROPERTY_Unmarshalu(TPMS_ALG_PROPERTY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_PROPERTY_Unmarshalu(TPMS_TAGGED_PROPERTY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_PCR_SELECT_Unmarshalu(TPMS_TAGGED_PCR_SELECT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_CC_Unmarshalu(TPML_CC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_POLICY_Unmarshalu(TPMS_TAGGED_POLICY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_CCA_Unmarshalu(TPML_CCA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ALG_Unmarshalu(TPML_ALG *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_HANDLE_Unmarshalu(TPML_HANDLE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_DIGEST_Unmarshalu(TPML_DIGEST *target, BYTE **buffer, uint32_t *size ,uint32_t minCount);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_DIGEST_VALUES_Unmarshalu(TPML_DIGEST_VALUES *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_PCR_SELECTION_Unmarshalu(TPML_PCR_SELECTION *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ALG_PROPERTY_Unmarshalu(TPML_ALG_PROPERTY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_TPM_PROPERTY_Unmarshalu(TPML_TAGGED_TPM_PROPERTY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_PCR_PROPERTY_Unmarshalu(TPML_TAGGED_PCR_PROPERTY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ECC_CURVE_Unmarshalu(TPML_ECC_CURVE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_POLICY_Unmarshalu(TPML_TAGGED_POLICY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_CAPABILITIES_Unmarshalu(TPMU_CAPABILITIES *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CLOCK_INFO_Unmarshalu(TPMS_CLOCK_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TIME_INFO_Unmarshalu(TPMS_TIME_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TIME_ATTEST_INFO_Unmarshalu(TPMS_TIME_ATTEST_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CERTIFY_INFO_Unmarshalu(TPMS_CERTIFY_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_QUOTE_INFO_Unmarshalu(TPMS_QUOTE_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_COMMAND_AUDIT_INFO_Unmarshalu(TPMS_COMMAND_AUDIT_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SESSION_AUDIT_INFO_Unmarshalu(TPMS_SESSION_AUDIT_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CREATION_INFO_Unmarshalu(TPMS_CREATION_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_CERTIFY_INFO_Unmarshalu(TPMS_NV_CERTIFY_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_DIGEST_CERTIFY_INFO_Unmarshalu(TPMS_NV_DIGEST_CERTIFY_INFO *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ST_ATTEST_Unmarshalu(TPMI_ST_ATTEST *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_ATTEST_Unmarshalu(TPMU_ATTEST *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ATTEST_Unmarshalu(TPMS_ATTEST *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ATTEST_Unmarshalu(TPM2B_ATTEST *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CAPABILITY_DATA_Unmarshalu(TPMS_CAPABILITY_DATA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_AUTH_RESPONSE_Unmarshalu(TPMS_AUTH_RESPONSE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_AES_KEY_BITS_Unmarshalu(TPMI_AES_KEY_BITS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SYM_KEY_BITS_Unmarshalu(TPMU_SYM_KEY_BITS *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SYM_MODE_Unmarshalu(TPMU_SYM_MODE *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SYM_DEF_Unmarshalu(TPMT_SYM_DEF *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SYM_DEF_OBJECT_Unmarshalu(TPMT_SYM_DEF_OBJECT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SYM_KEY_Unmarshalu(TPM2B_SYM_KEY *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SYMCIPHER_PARMS_Unmarshalu(TPMS_SYMCIPHER_PARMS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_LABEL_Unmarshalu(TPM2B_LABEL *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_DATA_Unmarshalu(TPM2B_SENSITIVE_DATA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SENSITIVE_CREATE_Unmarshalu(TPMS_SENSITIVE_CREATE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_CREATE_Unmarshalu(TPM2B_SENSITIVE_CREATE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_HASH_Unmarshalu(TPMS_SCHEME_HASH *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_ECDAA_Unmarshalu(TPMS_SCHEME_ECDAA *target, BYTE **buffer, uint32_t *size) ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_KEYEDHASH_SCHEME_Unmarshalu(TPMI_ALG_KEYEDHASH_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_HMAC_Unmarshalu(TPMS_SCHEME_HMAC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_XOR_Unmarshalu(TPMS_SCHEME_XOR *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SCHEME_KEYEDHASH_Unmarshalu(TPMU_SCHEME_KEYEDHASH *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_KEYEDHASH_SCHEME_Unmarshalu(TPMT_KEYEDHASH_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECDAA_Unmarshalu(TPMS_SIG_SCHEME_ECDAA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECDSA_Unmarshalu(TPMS_SIG_SCHEME_ECDSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECSCHNORR_Unmarshalu(TPMS_SIG_SCHEME_ECSCHNORR *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_RSAPSS_Unmarshalu(TPMS_SIG_SCHEME_RSAPSS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_RSASSA_Unmarshalu(TPMS_SIG_SCHEME_RSASSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_SM2_Unmarshalu(TPMS_SIG_SCHEME_SM2 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SIG_SCHEME_Unmarshalu(TPMU_SIG_SCHEME *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SIG_SCHEME_Unmarshalu(TPMT_SIG_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ENC_SCHEME_OAEP_Unmarshalu(TPMS_ENC_SCHEME_OAEP *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ENC_SCHEME_RSAES_Unmarshalu(TPMS_ENC_SCHEME_RSAES *target, BYTE **buffer, uint32_t *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEY_SCHEME_ECDH_Unmarshalu(TPMS_KEY_SCHEME_ECDH *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEY_SCHEME_ECMQV_Unmarshalu(TPMS_KEY_SCHEME_ECMQV *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF1_SP800_108_Unmarshalu(TPMS_SCHEME_KDF1_SP800_108 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF1_SP800_56A_Unmarshalu(TPMS_SCHEME_KDF1_SP800_56A *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF2_Unmarshalu(TPMS_SCHEME_KDF2 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_MGF1_Unmarshalu(TPMS_SCHEME_MGF1 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_KDF_SCHEME_Unmarshalu(TPMU_KDF_SCHEME *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_KDF_SCHEME_Unmarshalu(TPMT_KDF_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_ASYM_SCHEME_Unmarshalu(TPMI_ALG_ASYM_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_ASYM_SCHEME_Unmarshalu(TPMU_ASYM_SCHEME *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_ASYM_SCHEME_Unmarshalu(TPMT_ASYM_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_RSA_SCHEME_Unmarshalu(TPMI_ALG_RSA_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_RSA_SCHEME_Unmarshalu(TPMT_RSA_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_RSA_DECRYPT_Unmarshalu(TPMI_ALG_RSA_DECRYPT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_RSA_DECRYPT_Unmarshalu(TPMT_RSA_DECRYPT *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PUBLIC_KEY_RSA_Unmarshalu(TPM2B_PUBLIC_KEY_RSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RSA_KEY_BITS_Unmarshalu(TPMI_RSA_KEY_BITS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PRIVATE_KEY_RSA_Unmarshalu(TPM2B_PRIVATE_KEY_RSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ECC_PARAMETER_Unmarshalu(TPM2B_ECC_PARAMETER *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ECC_POINT_Unmarshalu(TPMS_ECC_POINT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ECC_POINT_Unmarshalu(TPM2B_ECC_POINT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_ECC_SCHEME_Unmarshalu(TPMI_ALG_ECC_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ECC_CURVE_Unmarshalu(TPMI_ECC_CURVE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_ECC_SCHEME_Unmarshalu(TPMT_ECC_SCHEME *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ALGORITHM_DETAIL_ECC_Unmarshalu(TPMS_ALGORITHM_DETAIL_ECC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSA_Unmarshalu(TPMS_SIGNATURE_RSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSASSA_Unmarshalu(TPMS_SIGNATURE_RSASSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSAPSS_Unmarshalu(TPMS_SIGNATURE_RSAPSS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECC_Unmarshalu(TPMS_SIGNATURE_ECC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECDSA_Unmarshalu(TPMS_SIGNATURE_ECDSA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECDAA_Unmarshalu(TPMS_SIGNATURE_ECDAA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_SM2_Unmarshalu(TPMS_SIGNATURE_SM2 *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECSCHNORR_Unmarshalu(TPMS_SIGNATURE_ECSCHNORR *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SIGNATURE_Unmarshalu(TPMU_SIGNATURE *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SIGNATURE_Unmarshalu(TPMT_SIGNATURE *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ENCRYPTED_SECRET_Unmarshalu(TPM2B_ENCRYPTED_SECRET *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_PUBLIC_Unmarshalu(TPMI_ALG_PUBLIC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_PUBLIC_ID_Unmarshalu(TPMU_PUBLIC_ID *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEYEDHASH_PARMS_Unmarshalu(TPMS_KEYEDHASH_PARMS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ASYM_PARMS_Unmarshalu(TPMS_ASYM_PARMS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_RSA_PARMS_Unmarshalu(TPMS_RSA_PARMS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ECC_PARMS_Unmarshalu(TPMS_ECC_PARMS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_PUBLIC_PARMS_Unmarshalu(TPMU_PUBLIC_PARMS *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_PARMS_Unmarshalu(TPMT_PUBLIC_PARMS *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_Unmarshalu(TPMT_PUBLIC *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PUBLIC_Unmarshalu(TPM2B_PUBLIC *target, BYTE **buffer, uint32_t *size, BOOL allowNull);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_TEMPLATE_Unmarshalu(TPM2B_TEMPLATE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SENSITIVE_COMPOSITE_Unmarshalu(TPMU_SENSITIVE_COMPOSITE *target, BYTE **buffer, uint32_t *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SENSITIVE_Unmarshalu(TPMT_SENSITIVE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_Unmarshalu(TPM2B_SENSITIVE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PRIVATE_Unmarshalu(TPM2B_PRIVATE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ID_OBJECT_Unmarshalu(TPM2B_ID_OBJECT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_NV_Unmarshalu(TPMA_NV *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_PUBLIC_Unmarshalu(TPMS_NV_PUBLIC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NV_PUBLIC_Unmarshalu(TPM2B_NV_PUBLIC *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CONTEXT_SENSITIVE_Unmarshalu(TPM2B_CONTEXT_SENSITIVE *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CONTEXT_DATA_Unmarshalu(TPMS_CONTEXT_DATA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CONTEXT_DATA_Unmarshalu(TPM2B_CONTEXT_DATA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CONTEXT_Unmarshalu(TPMS_CONTEXT *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CREATION_DATA_Unmarshalu(TPMS_CREATION_DATA *target, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CREATION_DATA_Unmarshalu(TPM2B_CREATION_DATA *target, BYTE **buffer, uint32_t *size);
+
+ /* These functions are deprecated. They were adapted from the TPM side, but the signed size
+ caused static analysis tool warnings. */
+
+ TPM_RC UINT8_Unmarshal(UINT8 *target, BYTE **buffer, INT32 *size);
+ TPM_RC INT8_Unmarshal(INT8 *target, BYTE **buffer, INT32 *size);
+ TPM_RC UINT16_Unmarshal(UINT16 *target, BYTE **buffer, INT32 *size);
+ TPM_RC UINT32_Unmarshal(UINT32 *target, BYTE **buffer, INT32 *size);
+ TPM_RC INT32_Unmarshal(INT32 *target, BYTE **buffer, INT32 *size);
+ TPM_RC UINT64_Unmarshal(UINT64 *target, BYTE **buffer, INT32 *size);
+ TPM_RC Array_Unmarshal(BYTE *targetBuffer, UINT16 targetSize, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_Unmarshal(TPM2B *target, UINT16 targetSize, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_KEY_BITS_Unmarshal(TPM_KEY_BITS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_GENERATED_Unmarshal(TPM_GENERATED *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_ALG_ID_Unmarshal(TPM_ALG_ID *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_ECC_CURVE_Unmarshal(TPM_ECC_CURVE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_CC_Unmarshal(TPM_RC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_RC_Unmarshal(TPM_RC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_CLOCK_ADJUST_Unmarshal(TPM_CLOCK_ADJUST *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_EO_Unmarshal(TPM_EO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_ST_Unmarshal(TPM_ST *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_SU_Unmarshal(TPM_SU *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_SE_Unmarshal(TPM_SE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_CAP_Unmarshal(TPM_CAP *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_PT_Unmarshal(TPM_HANDLE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_PT_PCR_Unmarshal(TPM_PT_PCR *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM_HANDLE_Unmarshal(TPM_HANDLE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMA_ALGORITHM_Unmarshal(TPMA_ALGORITHM *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMA_OBJECT_Unmarshal(TPMA_OBJECT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMA_SESSION_Unmarshal(TPMA_SESSION *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMA_LOCALITY_Unmarshal(TPMA_LOCALITY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMA_CC_Unmarshal(TPMA_CC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_YES_NO_Unmarshal(TPMI_YES_NO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_DH_OBJECT_Unmarshal(TPMI_DH_OBJECT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_DH_PARENT_Unmarshal(TPMI_DH_PARENT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_DH_PERSISTENT_Unmarshal(TPMI_DH_PERSISTENT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_DH_ENTITY_Unmarshal(TPMI_DH_ENTITY *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_DH_PCR_Unmarshal(TPMI_DH_PCR *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_SH_AUTH_SESSION_Unmarshal(TPMI_SH_AUTH_SESSION *target, BYTE **buffer, INT32 *size, BOOL allowPwd);
+ TPM_RC TPMI_SH_HMAC_Unmarshal(TPMI_SH_HMAC *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_SH_POLICY_Unmarshal(TPMI_SH_POLICY *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_DH_CONTEXT_Unmarshal(TPMI_DH_CONTEXT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_HIERARCHY_Unmarshal(TPMI_RH_HIERARCHY *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_ENABLES_Unmarshal(TPMI_RH_ENABLES *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_HIERARCHY_AUTH_Unmarshal(TPMI_RH_HIERARCHY_AUTH *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_PLATFORM_Unmarshal(TPMI_RH_PLATFORM *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_ENDORSEMENT_Unmarshal(TPMI_RH_ENDORSEMENT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_PROVISION_Unmarshal(TPMI_RH_PROVISION *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_CLEAR_Unmarshal(TPMI_RH_CLEAR *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_NV_AUTH_Unmarshal(TPMI_RH_NV_AUTH *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_LOCKOUT_Unmarshal(TPMI_RH_LOCKOUT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_RH_NV_INDEX_Unmarshal(TPMI_RH_NV_INDEX *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_HASH_Unmarshal(TPMI_ALG_HASH *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_SYM_Unmarshal(TPMI_ALG_SYM *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_SYM_OBJECT_Unmarshal(TPMI_ALG_SYM_OBJECT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_SYM_MODE_Unmarshal(TPMI_ALG_SYM_MODE *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_KDF_Unmarshal(TPMI_ALG_KDF *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_SIG_SCHEME_Unmarshal(TPMI_ALG_SIG_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ECC_KEY_EXCHANGE_Unmarshal(TPMI_ECC_KEY_EXCHANGE *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ST_COMMAND_TAG_Unmarshal(TPMI_ST_COMMAND_TAG *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_ALG_MAC_SCHEME_Unmarshal(TPMI_ALG_MAC_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_CIPHER_MODE_Unmarshal(TPMI_ALG_CIPHER_MODE *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMS_EMPTY_Unmarshal(TPMS_EMPTY *target, BYTE **buffer, INT32 *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ TPM_RC TPMU_HA_Unmarshal(TPMU_HA *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_HA_Unmarshal(TPMT_HA *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPM2B_DIGEST_Unmarshal(TPM2B_DIGEST *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_DATA_Unmarshal(TPM2B_DATA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_NONCE_Unmarshal(TPM2B_NONCE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_AUTH_Unmarshal(TPM2B_AUTH *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_OPERAND_Unmarshal(TPM2B_OPERAND *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_EVENT_Unmarshal(TPM2B_EVENT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_MAX_BUFFER_Unmarshal(TPM2B_MAX_BUFFER *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_MAX_NV_BUFFER_Unmarshal(TPM2B_MAX_NV_BUFFER *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_TIMEOUT_Unmarshal(TPM2B_TIMEOUT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_IV_Unmarshal(TPM2B_IV *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_NAME_Unmarshal(TPM2B_NAME *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_PCR_SELECTION_Unmarshal(TPMS_PCR_SELECTION *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMT_TK_CREATION_Unmarshal(TPMT_TK_CREATION *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMT_TK_VERIFIED_Unmarshal(TPMT_TK_VERIFIED *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMT_TK_AUTH_Unmarshal(TPMT_TK_AUTH *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMT_TK_HASHCHECK_Unmarshal(TPMT_TK_HASHCHECK *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_ALG_PROPERTY_Unmarshal(TPMS_ALG_PROPERTY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_TAGGED_PROPERTY_Unmarshal(TPMS_TAGGED_PROPERTY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_TAGGED_PCR_SELECT_Unmarshal(TPMS_TAGGED_PCR_SELECT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_CC_Unmarshal(TPML_CC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_TAGGED_POLICY_Unmarshal(TPMS_TAGGED_POLICY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_CCA_Unmarshal(TPML_CCA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_ALG_Unmarshal(TPML_ALG *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_HANDLE_Unmarshal(TPML_HANDLE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_DIGEST_Unmarshal(TPML_DIGEST *target, BYTE **buffer, INT32 *size,uint32_t minCount);
+ TPM_RC TPML_DIGEST_VALUES_Unmarshal(TPML_DIGEST_VALUES *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_PCR_SELECTION_Unmarshal(TPML_PCR_SELECTION *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_ALG_PROPERTY_Unmarshal(TPML_ALG_PROPERTY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_TAGGED_TPM_PROPERTY_Unmarshal(TPML_TAGGED_TPM_PROPERTY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_TAGGED_PCR_PROPERTY_Unmarshal(TPML_TAGGED_PCR_PROPERTY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_ECC_CURVE_Unmarshal(TPML_ECC_CURVE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPML_TAGGED_POLICY_Unmarshal(TPML_TAGGED_POLICY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_CAPABILITIES_Unmarshal(TPMU_CAPABILITIES *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMS_CLOCK_INFO_Unmarshal(TPMS_CLOCK_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_TIME_INFO_Unmarshal(TPMS_TIME_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_TIME_ATTEST_INFO_Unmarshal(TPMS_TIME_ATTEST_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_CERTIFY_INFO_Unmarshal(TPMS_CERTIFY_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_QUOTE_INFO_Unmarshal(TPMS_QUOTE_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_COMMAND_AUDIT_INFO_Unmarshal(TPMS_COMMAND_AUDIT_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SESSION_AUDIT_INFO_Unmarshal(TPMS_SESSION_AUDIT_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_CREATION_INFO_Unmarshal(TPMS_CREATION_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_NV_CERTIFY_INFO_Unmarshal(TPMS_NV_CERTIFY_INFO *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_ST_ATTEST_Unmarshal(TPMI_ST_ATTEST *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_ATTEST_Unmarshal(TPMU_ATTEST *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMS_ATTEST_Unmarshal(TPMS_ATTEST *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_ATTEST_Unmarshal(TPM2B_ATTEST *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_CAPABILITY_DATA_Unmarshal(TPMS_CAPABILITY_DATA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_AUTH_RESPONSE_Unmarshal(TPMS_AUTH_RESPONSE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_AES_KEY_BITS_Unmarshal(TPMI_AES_KEY_BITS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_SYM_KEY_BITS_Unmarshal(TPMU_SYM_KEY_BITS *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMU_SYM_MODE_Unmarshal(TPMU_SYM_MODE *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_SYM_DEF_Unmarshal(TPMT_SYM_DEF *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMT_SYM_DEF_OBJECT_Unmarshal(TPMT_SYM_DEF_OBJECT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPM2B_SYM_KEY_Unmarshal(TPM2B_SYM_KEY *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SYMCIPHER_PARMS_Unmarshal(TPMS_SYMCIPHER_PARMS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_LABEL_Unmarshal(TPM2B_LABEL *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_SENSITIVE_DATA_Unmarshal(TPM2B_SENSITIVE_DATA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SENSITIVE_CREATE_Unmarshal(TPMS_SENSITIVE_CREATE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_SENSITIVE_CREATE_Unmarshal(TPM2B_SENSITIVE_CREATE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_HASH_Unmarshal(TPMS_SCHEME_HASH *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_ECDAA_Unmarshal(TPMS_SCHEME_ECDAA *target, BYTE **buffer, INT32 *size) ;
+ TPM_RC TPMI_ALG_KEYEDHASH_SCHEME_Unmarshal(TPMI_ALG_KEYEDHASH_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMS_SCHEME_HMAC_Unmarshal(TPMS_SCHEME_HMAC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_XOR_Unmarshal(TPMS_SCHEME_XOR *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_SCHEME_KEYEDHASH_Unmarshal(TPMU_SCHEME_KEYEDHASH *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_KEYEDHASH_SCHEME_Unmarshal(TPMT_KEYEDHASH_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMS_SIG_SCHEME_ECDAA_Unmarshal(TPMS_SIG_SCHEME_ECDAA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIG_SCHEME_ECDSA_Unmarshal(TPMS_SIG_SCHEME_ECDSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIG_SCHEME_ECSCHNORR_Unmarshal(TPMS_SIG_SCHEME_ECSCHNORR *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIG_SCHEME_RSAPSS_Unmarshal(TPMS_SIG_SCHEME_RSAPSS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIG_SCHEME_RSASSA_Unmarshal(TPMS_SIG_SCHEME_RSASSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIG_SCHEME_SM2_Unmarshal(TPMS_SIG_SCHEME_SM2 *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_SIG_SCHEME_Unmarshal(TPMU_SIG_SCHEME *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_SIG_SCHEME_Unmarshal(TPMT_SIG_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMS_ENC_SCHEME_OAEP_Unmarshal(TPMS_ENC_SCHEME_OAEP *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_ENC_SCHEME_RSAES_Unmarshal(TPMS_ENC_SCHEME_RSAES *target, BYTE **buffer, INT32 *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ TPM_RC TPMS_KEY_SCHEME_ECDH_Unmarshal(TPMS_KEY_SCHEME_ECDH *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_KEY_SCHEME_ECMQV_Unmarshal(TPMS_KEY_SCHEME_ECMQV *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_KDF1_SP800_108_Unmarshal(TPMS_SCHEME_KDF1_SP800_108 *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_KDF1_SP800_56A_Unmarshal(TPMS_SCHEME_KDF1_SP800_56A *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_KDF2_Unmarshal(TPMS_SCHEME_KDF2 *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SCHEME_MGF1_Unmarshal(TPMS_SCHEME_MGF1 *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_KDF_SCHEME_Unmarshal(TPMU_KDF_SCHEME *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_KDF_SCHEME_Unmarshal(TPMT_KDF_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_ASYM_SCHEME_Unmarshal(TPMI_ALG_ASYM_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMU_ASYM_SCHEME_Unmarshal(TPMU_ASYM_SCHEME *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_ASYM_SCHEME_Unmarshal(TPMT_ASYM_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_RSA_SCHEME_Unmarshal(TPMI_ALG_RSA_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMT_RSA_SCHEME_Unmarshal(TPMT_RSA_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ALG_RSA_DECRYPT_Unmarshal(TPMI_ALG_RSA_DECRYPT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMT_RSA_DECRYPT_Unmarshal(TPMT_RSA_DECRYPT *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPM2B_PUBLIC_KEY_RSA_Unmarshal(TPM2B_PUBLIC_KEY_RSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_RSA_KEY_BITS_Unmarshal(TPMI_RSA_KEY_BITS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_PRIVATE_KEY_RSA_Unmarshal(TPM2B_PRIVATE_KEY_RSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_ECC_PARAMETER_Unmarshal(TPM2B_ECC_PARAMETER *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_ECC_POINT_Unmarshal(TPMS_ECC_POINT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_ECC_POINT_Unmarshal(TPM2B_ECC_POINT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_ALG_ECC_SCHEME_Unmarshal(TPMI_ALG_ECC_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMI_ECC_CURVE_Unmarshal(TPMI_ECC_CURVE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMT_ECC_SCHEME_Unmarshal(TPMT_ECC_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPMS_ALGORITHM_DETAIL_ECC_Unmarshal(TPMS_ALGORITHM_DETAIL_ECC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_RSA_Unmarshal(TPMS_SIGNATURE_RSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_RSASSA_Unmarshal(TPMS_SIGNATURE_RSASSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_RSAPSS_Unmarshal(TPMS_SIGNATURE_RSAPSS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_ECC_Unmarshal(TPMS_SIGNATURE_ECC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_ECDSA_Unmarshal(TPMS_SIGNATURE_ECDSA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_ECDAA_Unmarshal(TPMS_SIGNATURE_ECDAA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_SM2_Unmarshal(TPMS_SIGNATURE_SM2 *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_SIGNATURE_ECSCHNORR_Unmarshal(TPMS_SIGNATURE_ECSCHNORR *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_SIGNATURE_Unmarshal(TPMU_SIGNATURE *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_SIGNATURE_Unmarshal(TPMT_SIGNATURE *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPM2B_ENCRYPTED_SECRET_Unmarshal(TPM2B_ENCRYPTED_SECRET *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMI_ALG_PUBLIC_Unmarshal(TPMI_ALG_PUBLIC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_PUBLIC_ID_Unmarshal(TPMU_PUBLIC_ID *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMS_KEYEDHASH_PARMS_Unmarshal(TPMS_KEYEDHASH_PARMS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_ASYM_PARMS_Unmarshal(TPMS_ASYM_PARMS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_RSA_PARMS_Unmarshal(TPMS_RSA_PARMS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_ECC_PARMS_Unmarshal(TPMS_ECC_PARMS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_PUBLIC_PARMS_Unmarshal(TPMU_PUBLIC_PARMS *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_PUBLIC_PARMS_Unmarshal(TPMT_PUBLIC_PARMS *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMT_PUBLIC_Unmarshal(TPMT_PUBLIC *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPM2B_PUBLIC_Unmarshal(TPM2B_PUBLIC *target, BYTE **buffer, INT32 *size, BOOL allowNull);
+ TPM_RC TPM2B_TEMPLATE_Unmarshal(TPM2B_TEMPLATE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMU_SENSITIVE_COMPOSITE_Unmarshal(TPMU_SENSITIVE_COMPOSITE *target, BYTE **buffer, INT32 *size, UINT32 selector);
+ TPM_RC TPMT_SENSITIVE_Unmarshal(TPMT_SENSITIVE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_SENSITIVE_Unmarshal(TPM2B_SENSITIVE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_PRIVATE_Unmarshal(TPM2B_PRIVATE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_ID_OBJECT_Unmarshal(TPM2B_ID_OBJECT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMA_NV_Unmarshal(TPMA_NV *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_NV_PUBLIC_Unmarshal(TPMS_NV_PUBLIC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_NV_PUBLIC_Unmarshal(TPM2B_NV_PUBLIC *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_CONTEXT_SENSITIVE_Unmarshal(TPM2B_CONTEXT_SENSITIVE *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_CONTEXT_DATA_Unmarshal(TPMS_CONTEXT_DATA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_CONTEXT_DATA_Unmarshal(TPM2B_CONTEXT_DATA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_CONTEXT_Unmarshal(TPMS_CONTEXT *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPMS_CREATION_DATA_Unmarshal(TPMS_CREATION_DATA *target, BYTE **buffer, INT32 *size);
+ TPM_RC TPM2B_CREATION_DATA_Unmarshal(TPM2B_CREATION_DATA *target, BYTE **buffer, INT32 *size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unseal_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unseal_fp.h
new file mode 100644
index 000000000..87c720ec7
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/Unseal_fp.h
@@ -0,0 +1,83 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: Unseal_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef UNSEAL_FP_H
+#define UNSEAL_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT itemHandle;
+} Unseal_In;
+
+#define RC_Unseal_itemHandle (TPM_RC_H + TPM_RC_1)
+
+typedef struct {
+ TPM2B_SENSITIVE_DATA outData;
+} Unseal_Out;
+
+TPM_RC
+TPM2_Unseal(
+ Unseal_In *in,
+ Unseal_Out *out
+ );
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/VerifySignature_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/VerifySignature_fp.h
new file mode 100644
index 000000000..19f36a2b5
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/VerifySignature_fp.h
@@ -0,0 +1,88 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: VerifySignature_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef VERIFYSIGNATURE_FP_H
+#define VERIFYSIGNATURE_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyHandle;
+ TPM2B_DIGEST digest;
+ TPMT_SIGNATURE signature;
+} VerifySignature_In;
+
+#define RC_VerifySignature_keyHandle (TPM_RC_H + TPM_RC_1)
+#define RC_VerifySignature_digest (TPM_RC_P + TPM_RC_1)
+#define RC_VerifySignature_signature (TPM_RC_P + TPM_RC_2)
+
+typedef struct {
+ TPMT_TK_VERIFIED validation;
+} VerifySignature_Out;
+
+TPM_RC
+TPM2_VerifySignature(
+ VerifySignature_In *in, // IN: input parameter list
+ VerifySignature_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ZGen_2Phase_fp.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ZGen_2Phase_fp.h
new file mode 100644
index 000000000..efbf082f8
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/ZGen_2Phase_fp.h
@@ -0,0 +1,93 @@
+/********************************************************************************/
+/* */
+/* */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: ZGen_2Phase_fp.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* Licenses and Notices */
+/* */
+/* 1. Copyright Licenses: */
+/* */
+/* - Trusted Computing Group (TCG) grants to the user of the source code in */
+/* this specification (the "Source Code") a worldwide, irrevocable, */
+/* nonexclusive, royalty free, copyright license to reproduce, create */
+/* derivative works, distribute, display and perform the Source Code and */
+/* derivative works thereof, and to grant others the rights granted herein. */
+/* */
+/* - The TCG grants to the user of the other parts of the specification */
+/* (other than the Source Code) the rights to reproduce, distribute, */
+/* display, and perform the specification solely for the purpose of */
+/* developing products based on such documents. */
+/* */
+/* 2. Source Code Distribution Conditions: */
+/* */
+/* - Redistributions of Source Code must retain the above copyright licenses, */
+/* this list of conditions and the following disclaimers. */
+/* */
+/* - Redistributions in binary form must reproduce the above copyright */
+/* licenses, this list of conditions and the following disclaimers in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* 3. Disclaimers: */
+/* */
+/* - THE COPYRIGHT LICENSES SET FORTH ABOVE DO NOT REPRESENT ANY FORM OF */
+/* LICENSE OR WAIVER, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, WITH */
+/* RESPECT TO PATENT RIGHTS HELD BY TCG MEMBERS (OR OTHER THIRD PARTIES) */
+/* THAT MAY BE NECESSARY TO IMPLEMENT THIS SPECIFICATION OR OTHERWISE. */
+/* Contact TCG Administration (admin@trustedcomputinggroup.org) for */
+/* information on specification licensing rights available through TCG */
+/* membership agreements. */
+/* */
+/* - THIS SPECIFICATION IS PROVIDED "AS IS" WITH NO EXPRESS OR IMPLIED */
+/* WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR */
+/* FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OR */
+/* NONINFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS, OR ANY WARRANTY */
+/* OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. */
+/* */
+/* - Without limitation, TCG and its members and licensors disclaim all */
+/* liability, including liability for infringement of any proprietary */
+/* rights, relating to use of information in this specification and to the */
+/* implementation of this specification, and TCG disclaims all liability for */
+/* cost of procurement of substitute goods or services, lost profits, loss */
+/* of use, loss of data or any incidental, consequential, direct, indirect, */
+/* or special damages, whether under contract, tort, warranty or otherwise, */
+/* arising in any way out of use or reliance upon this specification or any */
+/* information herein. */
+/* */
+/* (c) Copyright IBM Corp. and others, 2012-2015 */
+/* */
+/********************************************************************************/
+
+/* rev 119 */
+
+#ifndef ZGEN_2PHASE_FP_H
+#define ZGEN_2PHASE_FP_H
+
+typedef struct {
+ TPMI_DH_OBJECT keyA;
+ TPM2B_ECC_POINT inQsB;
+ TPM2B_ECC_POINT inQeB;
+ TPMI_ECC_KEY_EXCHANGE inScheme;
+ UINT16 counter;
+} ZGen_2Phase_In;
+
+#define RC_ZGen_2Phase_keyA (TPM_RC_H + TPM_RC_1)
+#define RC_ZGen_2Phase_inQsB (TPM_RC_P + TPM_RC_1)
+#define RC_ZGen_2Phase_inQeB (TPM_RC_P + TPM_RC_2)
+#define RC_ZGen_2Phase_inScheme (TPM_RC_P + TPM_RC_3)
+#define RC_ZGen_2Phase_counter (TPM_RC_P + TPM_RC_4)
+
+typedef struct {
+ TPM2B_ECC_POINT outZ1;
+ TPM2B_ECC_POINT outZ2;
+} ZGen_2Phase_Out;
+
+TPM_RC
+TPM2_ZGen_2Phase(
+ ZGen_2Phase_In *in, // IN: input parameter list
+ ZGen_2Phase_Out *out // OUT: output parameter list
+ );
+
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmconstants12.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmconstants12.h
new file mode 100644
index 000000000..55574badc
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmconstants12.h
@@ -0,0 +1,1721 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Constants */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2006, 2010. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TPMCONSTANTS12_H
+#define TPMCONSTANTS12_H
+
+#include <stdint.h>
+
+/*
+ NOTE implementation Specific
+*/
+
+/*
+ version, revision, specLevel, errataRev
+*/
+
+/* current for released specification revision 103 */
+
+#define TPM_REVISION_MAX 9999
+#ifndef TPM_REVISION
+#define TPM_REVISION TPM_REVISION_MAX
+#endif
+
+// #if (TPM_REVISION >= 116)
+
+// #define TPM_SPEC_LEVEL 0x0002 /* uint16_t The level of ordinals supported */
+// #define TPM_ERRATA_REV 0x03 /* specification errata level */
+
+// #elif (TPM_REVISION >= 103)
+
+// #define TPM_SPEC_LEVEL 0x0002 /* uint16_t The level of ordinals supported */
+// #define TPM_ERRATA_REV 0x02 /* specification errata level */
+
+// #elif (TPM_REVISION >= 94)
+
+// #define TPM_SPEC_LEVEL 0x0002 /* uint16_t The level of ordinals supported */
+// #define TPM_ERRATA_REV 0x01 /* specification errata level */
+
+// #elif (TPM_REVISION >= 85)
+
+// #define TPM_SPEC_LEVEL 0x0002 /* uint16_t The level of ordinals supported */
+// #define TPM_ERRATA_REV 0x00 /* specification errata level */
+
+// #else
+
+// #define TPM_SPEC_LEVEL 0x0001 /* uint16_t The level of ordinals supported */
+// #define TPM_ERRATA_REV 0x00 /* specification errata level */
+
+// #endif
+
+/* IBM specific */
+
+#if 0 /* at one time vendorID was the PCI vendor ID, this is the IBM code */
+#define TPM_VENDOR_ID "\x00\x00\x10\x14" /* BYTE[4], the vendor ID, obtained from the TCG,
+ typically PCI vendor ID */
+#endif
+
+
+#ifdef TPM_VENDOR
+
+#define TPM_VENDOR_ID "WEC" /* 4 bytes, as of rev 99 vendorID and TPM_CAP_PROP_MANUFACTURER
+ return the same value */
+#define TPM_MANUFACTURER "WEC" /* 4 characters, assigned by TCG, typically stock ticker symbol */
+
+#else
+
+#define TPM_VENDOR_ID "IBM" /* 4 bytes, as of rev 99 vendorID and TPM_CAP_PROP_MANUFACTURER
+ return the same value */
+#define TPM_MANUFACTURER "IBM" /* 4 characters, assigned by TCG, typically stock ticker symbol */
+
+#endif
+
+/* Timeouts in microseconds. These are for the platform specific interface (e.g. the LPC bus
+ registers in the PC Client TPM). They are most likely not applicable to a software TPM. */
+#define TPM_TIMEOUT_A 1000000
+#define TPM_TIMEOUT_B 1000000
+#define TPM_TIMEOUT_C 1000000
+#define TPM_TIMEOUT_D 1000000
+
+/* dictionary attack mitigation */
+
+#define TPM_LOCKOUT_THRESHOLD 5 /* successive failures to trigger lockout, must be greater
+ than 0 */
+
+/* Denotes the duration value in microseconds of the duration of the three classes of commands:
+ Small, Medium and Long. The command types are in the Part 2 Ordinal Table. Essentially:
+
+ Long - creating an RSA key pair
+ Medium - using an RSA key
+ Short - anything else
+*/
+
+#ifndef TPM_SMALL_DURATION
+#define TPM_SMALL_DURATION 2000000
+#endif
+
+#ifndef TPM_MEDIUM_DURATION
+#define TPM_MEDIUM_DURATION 5000000
+#endif
+
+#ifndef TPM_LONG_DURATION
+#define TPM_LONG_DURATION 60000000
+#endif
+
+/* startup effects */
+
+#define TPM_STARTUP_EFFECTS_VALUE \
+(TPM_STARTUP_EFFECTS_ST_ANY_RT_KEY | /* key resources init by TPM_Startup(ST_ANY) */ \
+ TPM_STARTUP_EFFECTS_ST_STATE_RT_HASH | /* hash resources are init by TPM_Startup(ST_STATE) */ \
+ TPM_STARTUP_EFFECTS_ST_CLEAR_AUDITDIGEST) /* auditDigest nulled on TPM_Startup(ST_CLEAR) */
+
+/*
+ TPM buffer limits
+*/
+
+/* This value is used to limit memory allocation to prevent resource overload. */
+
+#ifndef TPM_ALLOC_MAX
+#define TPM_ALLOC_MAX 0x10000 /* 64k bytes */
+#endif
+
+/* This is the increment by which the TPM_STORE_BUFFER grows. A larger number saves realloc's. A
+ smaller number saves memory.
+
+ TPM_ALLOC_MAX must be a multiple of this value.
+*/
+
+#define TPM_STORE_BUFFER_INCREMENT (TPM_ALLOC_MAX / 64)
+
+/* This is the maximum value of the TPM input and output packet buffer. It should be large enough
+ to accommodate the largest TPM command or response, currently about 1200 bytes. It should be
+ small enough to accommodate whatever software is driving the TPM.
+
+ NOTE: Some commands are somewhat open ended, and related to this parmater. E.g., The input size
+ for the TPM_SHA1Init. The output size for TPM_GetRandom.
+
+ It is returned by TPM_GetCapability -> TPM_CAP_PROP_INPUT_BUFFER
+*/
+
+#ifndef TPM_BUFFER_MAX
+#define TPM_BUFFER_MAX 0x1000 /* 4k bytes */
+#endif
+
+/* Random number generator */
+
+/* maximum bytes in one TPM_GetRandom() call
+
+ Use maximum input buffer size minus tag, paramSize, returnCode, randomBytesSize.
+*/
+
+#define TPM_RANDOM_MAX (TPM_BUFFER_MAX \
+ - sizeof(TPM_TAG) - sizeof(uint32_t) \
+ - sizeof(TPM_RESULT) - sizeof(uint32_t))
+
+/* Maximum number of bytes that can be sent to TPM_SHA1Update. Must be a multiple of 64 bytes.
+
+ Use maximum input buffer size minus tag, paramSize, ordinal, numBytes.
+*/
+
+#define TPM_SHA1_MAXNUMBYTES (TPM_BUFFER_MAX - 64)
+
+/* extra audit status bits for TSC commands outside the normal ordinal range */
+#define TSC_PHYS_PRES_AUDIT 0x01
+#define TSC_RESET_ESTAB_AUDIT 0x02
+
+#ifdef TPM_VTPM
+/* ordinals for virtual TPM instance handling */
+/* NOTE must be contiguous, see TPM_PERMANENT_DATA -> instanceOrdinalAuditStatus */
+#define TPM_InstanceOrdinals_Start1 0x20000000
+#define TPM_InstanceOrdinals_End1 0x20000020
+#define TPM_InstanceOrdinals_Start2 0x20000020
+#define TPM_InstanceOrdinals_End2 0x20000040
+
+#define TPM_ORD_CreateInstance 0x20000001
+#define TPM_ORD_DeleteInstance 0x20000002
+#define TPM_ORD_LockInstance 0x20000003
+#define TPM_ORD_GetInstanceData 0x20000004
+#define TPM_ORD_SetInstanceData 0x20000005
+#define TPM_ORD_GetInstanceKey 0x20000009
+#define TPM_ORD_SetInstanceKey 0x2000000a
+#define TPM_ORD_TransportInstance 0x2000000b
+#define TPM_ORD_SetupInstance 0x2000000c
+#define TPM_ORD_UnlockInstance 0x2000000e
+#define TPM_ORD_ReportEnvironment 0x2000000f
+#define TPM_ORD_QuotePubEK 0x20000010
+
+/* actionMask for TPM_SetupInstance (bit mask) */
+
+#define TPM_INSTANCE_ACTIVATE 0x00000001
+#define TPM_INSTANCE_ENABLE 0x00000002
+#define TPM_INSTANCE_STARTUP 0x00000004
+#define TPM_INSTANCE_INIT 0x00000008
+
+#define TPM_INSTANCE_ACTION_MASK 0xfffffff0 /* ~ OR of all above bits */
+
+/* creationMask for TPM_CreateInstance (bit mask) */
+
+#define TPM_INSTANCE_PRIVILEGED 0x00000001
+#define TPM_INSTANCE_NO_MIGRATE 0x00000002
+#define TPM_INSTANCE_CREATION_MASK 0xfffffffc /* ~ OR of all above bits */
+
+/* TPM_CAP_MFR capabilities */
+
+#define TPM_CAP_PROP_MAX_INSTANCES 0x00000001
+#define TPM_CAP_INSTANCE_HANDLE 0x00000002
+#define TPM_CAP_INSTANCE_PARENT 0x00000003
+#define TPM_CAP_INSTANCE_CHILDREN 0x00000004
+#define TPM_CAP_CREATION_MASK 0x00000005
+#define TPM_CAP_SETUP_PCRLIST 0x00000006
+#define TPM_CAP_NUMBER_PCR_MEAS 0x00000008
+#define TPM_CAP_PCR_MEASUREMENTS 0x00000009
+#define TPM_CAP_PCR_SELECTIONS 0x0000000a
+
+/* TPM_SET_VENDOR Subcap */
+
+#define TPM_SETCAP_LOG_PCR_SELECTION 0x00000001
+#define TPM_SETCAP_SUBSCRIBE_PCR_SELECTION 0x00000002
+#define TPM_SETCAP_LOG_LOG_LENGTH_MAX 0x00000003
+
+/* VTPM Structure Tags */
+
+#define TPM_TAG_LOG_ENTRIES 0x8003
+
+#endif /* TPM_VTPM */
+
+/* TPM_CAP_MFR capabilities */
+#define TPM_CAP_PROCESS_ID 0x00000020
+
+#ifdef TPM_VENDOR
+
+#define WEC_ORD_PreConfig 0x2000000e
+#define WEC_ORD_LockPreConfig 0x2000000f
+#define WEC_ORD_GetTPMStatus 0x20000021
+
+#endif /* TPM_VENDOR */
+
+/* define a value for an illegal instance handle */
+
+#define TPM_ILLEGAL_INSTANCE_HANDLE 0xffffffff
+
+/*
+ NOTE End Implementation Specific
+*/
+
+/* 3. Structure Tags rev 105
+
+ There have been some indications that knowing what structure is in use would be valuable
+ information in each structure. This new tag will be in each new structure that the TPM defines.
+
+ The upper nibble of the value designates the purview of the structure tag. 0 is used for TPM
+ structures, 1 for platforms, and 2-F are reserved.
+*/
+
+/* 3.1 TPM_STRUCTURE_TAG */
+
+/* Structure */
+#define TPM_TAG_CONTEXTBLOB 0x0001 /* TPM_CONTEXT_BLOB */
+#define TPM_TAG_CONTEXT_SENSITIVE 0x0002 /* TPM_CONTEXT_SENSITIVE */
+#define TPM_TAG_CONTEXTPOINTER 0x0003 /* TPM_CONTEXT_POINTER */
+#define TPM_TAG_CONTEXTLIST 0x0004 /* TPM_CONTEXT_LIST */
+#define TPM_TAG_SIGNINFO 0x0005 /* TPM_SIGN_INFO */
+#define TPM_TAG_PCR_INFO_LONG 0x0006 /* TPM_PCR_INFO_LONG */
+#define TPM_TAG_PERSISTENT_FLAGS 0x0007 /* TPM_PERSISTENT_FLAGS (deprecated 1.1 struct) */
+#define TPM_TAG_VOLATILE_FLAGS 0x0008 /* TPM_VOLATILE_FLAGS (deprecated 1.1 struct) */
+#define TPM_TAG_PERSISTENT_DATA 0x0009 /* TPM_PERSISTENT_DATA (deprecated 1.1 struct) */
+#define TPM_TAG_VOLATILE_DATA 0x000A /* TPM_VOLATILE_DATA (deprecated 1.1 struct) */
+#define TPM_TAG_SV_DATA 0x000B /* TPM_SV_DATA */
+#define TPM_TAG_EK_BLOB 0x000C /* TPM_EK_BLOB */
+#define TPM_TAG_EK_BLOB_AUTH 0x000D /* TPM_EK_BLOB_AUTH */
+#define TPM_TAG_COUNTER_VALUE 0x000E /* TPM_COUNTER_VALUE */
+#define TPM_TAG_TRANSPORT_INTERNAL 0x000F /* TPM_TRANSPORT_INTERNAL */
+#define TPM_TAG_TRANSPORT_LOG_IN 0x0010 /* TPM_TRANSPORT_LOG_IN */
+#define TPM_TAG_TRANSPORT_LOG_OUT 0x0011 /* TPM_TRANSPORT_LOG_OUT */
+#define TPM_TAG_AUDIT_EVENT_IN 0x0012 /* TPM_AUDIT_EVENT_IN */
+#define TPM_TAG_AUDIT_EVENT_OUT 0X0013 /* TPM_AUDIT_EVENT_OUT */
+#define TPM_TAG_CURRENT_TICKS 0x0014 /* TPM_CURRENT_TICKS */
+#define TPM_TAG_KEY 0x0015 /* TPM_KEY */
+#define TPM_TAG_STORED_DATA12 0x0016 /* TPM_STORED_DATA12 */
+#define TPM_TAG_NV_ATTRIBUTES 0x0017 /* TPM_NV_ATTRIBUTES */
+#define TPM_TAG_NV_DATA_PUBLIC 0x0018 /* TPM_NV_DATA_PUBLIC */
+#define TPM_TAG_NV_DATA_SENSITIVE 0x0019 /* TPM_NV_DATA_SENSITIVE */
+#define TPM_TAG_DELEGATIONS 0x001A /* TPM DELEGATIONS */
+#define TPM_TAG_DELEGATE_PUBLIC 0x001B /* TPM_DELEGATE_PUBLIC */
+#define TPM_TAG_DELEGATE_TABLE_ROW 0x001C /* TPM_DELEGATE_TABLE_ROW */
+#define TPM_TAG_TRANSPORT_AUTH 0x001D /* TPM_TRANSPORT_AUTH */
+#define TPM_TAG_TRANSPORT_PUBLIC 0X001E /* TPM_TRANSPORT_PUBLIC */
+#define TPM_TAG_PERMANENT_FLAGS 0X001F /* TPM_PERMANENT_FLAGS */
+#define TPM_TAG_STCLEAR_FLAGS 0X0020 /* TPM_STCLEAR_FLAGS */
+#define TPM_TAG_STANY_FLAGS 0X0021 /* TPM_STANY_FLAGS */
+#define TPM_TAG_PERMANENT_DATA 0X0022 /* TPM_PERMANENT_DATA */
+#define TPM_TAG_STCLEAR_DATA 0X0023 /* TPM_STCLEAR_DATA */
+#define TPM_TAG_STANY_DATA 0X0024 /* TPM_STANY_DATA */
+#define TPM_TAG_FAMILY_TABLE_ENTRY 0X0025 /* TPM_FAMILY_TABLE_ENTRY */
+#define TPM_TAG_DELEGATE_SENSITIVE 0X0026 /* TPM_DELEGATE_SENSITIVE */
+#define TPM_TAG_DELG_KEY_BLOB 0X0027 /* TPM_DELG_KEY_BLOB */
+#define TPM_TAG_KEY12 0x0028 /* TPM_KEY12 */
+#define TPM_TAG_CERTIFY_INFO2 0X0029 /* TPM_CERTIFY_INFO2 */
+#define TPM_TAG_DELEGATE_OWNER_BLOB 0X002A /* TPM_DELEGATE_OWNER_BLOB */
+#define TPM_TAG_EK_BLOB_ACTIVATE 0X002B /* TPM_EK_BLOB_ACTIVATE */
+#define TPM_TAG_DAA_BLOB 0X002C /* TPM_DAA_BLOB */
+#define TPM_TAG_DAA_CONTEXT 0X002D /* TPM_DAA_CONTEXT */
+#define TPM_TAG_DAA_ENFORCE 0X002E /* TPM_DAA_ENFORCE */
+#define TPM_TAG_DAA_ISSUER 0X002F /* TPM_DAA_ISSUER */
+#define TPM_TAG_CAP_VERSION_INFO 0X0030 /* TPM_CAP_VERSION_INFO */
+#define TPM_TAG_DAA_SENSITIVE 0X0031 /* TPM_DAA_SENSITIVE */
+#define TPM_TAG_DAA_TPM 0X0032 /* TPM_DAA_TPM */
+#define TPM_TAG_CMK_MIGAUTH 0X0033 /* TPM_CMK_MIGAUTH */
+#define TPM_TAG_CMK_SIGTICKET 0X0034 /* TPM_CMK_SIGTICKET */
+#define TPM_TAG_CMK_MA_APPROVAL 0X0035 /* TPM_CMK_MA_APPROVAL */
+#define TPM_TAG_QUOTE_INFO2 0X0036 /* TPM_QUOTE_INFO2 */
+#define TPM_TAG_DA_INFO 0x0037 /* TPM_DA_INFO */
+#define TPM_TAG_DA_INFO_LIMITED 0x0038 /* TPM_DA_INFO_LIMITED */
+#define TPM_TAG_DA_ACTION_TYPE 0x0039 /* TPM_DA_ACTION_TYPE */
+
+/*
+ SW TPM Tags
+*/
+
+/*
+ These tags are used to describe the format of serialized TPM non-volatile state
+*/
+
+/* These describe the overall format */
+
+/* V1 state is the sequence permanent data, permanent flags, owner evict keys, NV defined space */
+
+#define TPM_TAG_NVSTATE_V1 0x0001 /* svn revision 4078 */
+
+/* These tags describe the TPM_PERMANENT_DATA format */
+
+/* For the first release, use the standard TPM_TAG_PERMANENT_DATA tag. Since this tag is never
+ visible outside the TPM, the tag value can be changed if the format changes.
+*/
+
+/* These tags describe the TPM_PERMANENT_FLAGS format */
+
+/* The TPM_PERMANENT_FLAGS structure changed from rev 94 to 103. Unfortunately, the standard TPM
+ tag did not change. Define distinguishing values here.
+*/
+
+#define TPM_TAG_NVSTATE_PF94 0x0001
+#define TPM_TAG_NVSTATE_PF103 0x0002
+
+/* This tag describes the owner evict key format */
+
+#define TPM_TAG_NVSTATE_OE_V1 0x0001
+
+/* This tag describes the NV defined space format */
+
+#define TPM_TAG_NVSTATE_NV_V1 0x0001
+
+/* V2 added the NV public optimization */
+
+#define TPM_TAG_NVSTATE_NV_V2 0x0002
+
+/*
+ These tags are used to describe the format of serialized TPM volatile state
+*/
+
+/* These describe the overall format */
+
+/* V1 state is the sequence TPM Parameters, TPM_STCLEAR_FLAGS, TPM_STANY_FLAGS, TPM_STCLEAR_DATA,
+ TPM_STANY_DATA, TPM_KEY_HANDLE_ENTRY, SHA1 context(s), TPM_TRANSHANDLE, testState, NV volatile
+ flags */
+
+#define TPM_TAG_VSTATE_V1 0x0001
+
+/* This tag defines the TPM Parameters format */
+
+#define TPM_TAG_TPM_PARAMETERS_V1 0x0001
+
+/* This tag defines the TPM_STCLEAR_FLAGS format */
+
+/* V1 is the TCG standard returned by the getcap. It's unlikely that this will change */
+
+#define TPM_TAG_STCLEAR_FLAGS_V1 0x0001
+
+/* These tags describe the TPM_STANY_FLAGS format */
+
+/* For the first release, use the standard TPM_TAG_STANY_FLAGS tag. Since this tag is never visible
+ outside the TPM, the tag value can be changed if the format changes.
+*/
+
+/* This tag defines the TPM_STCLEAR_DATA format */
+
+/* V2 deleted the ordinalResponse, responseCount */
+
+#define TPM_TAG_STCLEAR_DATA_V2 0X0024
+
+/* These tags describe the TPM_STANY_DATA format */
+
+/* For the first release, use the standard TPM_TAG_STANY_DATA tag. Since this tag is never visible
+ outside the TPM, the tag value can be changed if the format changes.
+*/
+
+/* This tag defines the key handle entries format */
+
+#define TPM_TAG_KEY_HANDLE_ENTRIES_V1 0x0001
+
+/* This tag defines the SHA-1 context format */
+
+#define TPM_TAG_SHA1CONTEXT_OSSL_V1 0x0001 /* for openssl */
+
+#define TPM_TAG_SHA1CONTEXT_FREEBL_V1 0x0101 /* for freebl */
+
+/* This tag defines the NV index entries volatile format */
+
+#define TPM_TAG_NV_INDEX_ENTRIES_VOLATILE_V1 0x0001
+
+/* 4. Types
+ */
+
+/* 4.1 TPM_RESOURCE_TYPE rev 87 */
+
+#define TPM_RT_KEY 0x00000001 /* The handle is a key handle and is the result of a LoadKey
+ type operation */
+
+#define TPM_RT_AUTH 0x00000002 /* The handle is an authorization handle. Auth handles come from
+ TPM_OIAP, TPM_OSAP and TPM_DSAP */
+
+#define TPM_RT_HASH 0X00000003 /* Reserved for hashes */
+
+#define TPM_RT_TRANS 0x00000004 /* The handle is for a transport session. Transport handles come
+ from TPM_EstablishTransport */
+
+#define TPM_RT_CONTEXT 0x00000005 /* Resource wrapped and held outside the TPM using the context
+ save/restore commands */
+
+#define TPM_RT_COUNTER 0x00000006 /* Reserved for counters */
+
+#define TPM_RT_DELEGATE 0x00000007 /* The handle is for a delegate row. These are the internal rows
+ held in NV storage by the TPM */
+
+#define TPM_RT_DAA_TPM 0x00000008 /* The value is a DAA TPM specific blob */
+
+#define TPM_RT_DAA_V0 0x00000009 /* The value is a DAA V0 parameter */
+
+#define TPM_RT_DAA_V1 0x0000000A /* The value is a DAA V1 parameter */
+
+/* 4.2 TPM_PAYLOAD_TYPE rev 87
+
+ This structure specifies the type of payload in various messages.
+*/
+
+#define TPM_PT_ASYM 0x01 /* The entity is an asymmetric key */
+#define TPM_PT_BIND 0x02 /* The entity is bound data */
+#define TPM_PT_MIGRATE 0x03 /* The entity is a migration blob */
+#define TPM_PT_MAINT 0x04 /* The entity is a maintenance blob */
+#define TPM_PT_SEAL 0x05 /* The entity is sealed data */
+#define TPM_PT_MIGRATE_RESTRICTED 0x06 /* The entity is a restricted-migration asymmetric key */
+#define TPM_PT_MIGRATE_EXTERNAL 0x07 /* The entity is a external migratable key */
+#define TPM_PT_CMK_MIGRATE 0x08 /* The entity is a CMK migratable blob */
+/* 0x09 - 0x7F Reserved for future use by TPM */
+/* 0x80 - 0xFF Vendor specific payloads */
+
+/* 4.3 TPM_ENTITY_TYPE rev 100
+
+ This specifies the types of entity that are supported by the TPM.
+
+ The LSB is used to indicate the entity type. The MSB is used to indicate the ADIP
+ encryption scheme when applicable.
+
+ For compatibility with TPM 1.1, this mapping is maintained:
+
+ 0x0001 specifies a keyHandle entity with XOR encryption
+ 0x0002 specifies an owner entity with XOR encryption
+ 0x0003 specifies some data entity with XOR encryption
+ 0x0004 specifies the SRK entity with XOR encryption
+ 0x0005 specifies a key entity with XOR encryption
+
+ When the entity is not being used for ADIP encryption, the MSB MUST be 0x00.
+*/
+
+/* TPM_ENTITY_TYPE LSB Values (entity type) */
+
+#define TPM_ET_KEYHANDLE 0x01 /* The entity is a keyHandle or key */
+#define TPM_ET_OWNER 0x02 /*0x40000001 The entity is the TPM Owner */
+#define TPM_ET_DATA 0x03 /* The entity is some data */
+#define TPM_ET_SRK 0x04 /*0x40000000 The entity is the SRK */
+#define TPM_ET_KEY 0x05 /* The entity is a key or keyHandle */
+#define TPM_ET_REVOKE 0x06 /*0x40000002 The entity is the RevokeTrust value */
+#define TPM_ET_DEL_OWNER_BLOB 0x07 /* The entity is a delegate owner blob */
+#define TPM_ET_DEL_ROW 0x08 /* The entity is a delegate row */
+#define TPM_ET_DEL_KEY_BLOB 0x09 /* The entity is a delegate key blob */
+#define TPM_ET_COUNTER 0x0A /* The entity is a counter */
+#define TPM_ET_NV 0x0B /* The entity is a NV index */
+#define TPM_ET_OPERATOR 0x0C /* The entity is the operator */
+#define TPM_ET_RESERVED_HANDLE 0x40 /* Reserved. This value avoids collisions with the handle
+ MSB setting.*/
+
+/* TPM_ENTITY_TYPE MSB Values (ADIP encryption scheme) */
+
+#define TPM_ET_XOR 0x00 /* XOR */
+#define TPM_ET_AES128_CTR 0x06 /* AES 128 bits in CTR mode */
+
+/* 4.4 Handles rev 88
+
+ Handles provides pointers to TPM internal resources. Handles should provide the ability to locate
+ a value without collision.
+
+ 1. The TPM MAY order and set a handle to any value the TPM determines is appropriate
+
+ 2. The handle value SHALL provide assurance that collisions SHOULD not occur in 2^24 handles
+
+ 4.4.1 Reserved Key Handles
+
+ The reserved key handles. These values specify specific keys or specific actions for the TPM.
+*/
+
+/* 4.4.1 Reserved Key Handles rev 87
+
+ The reserved key handles. These values specify specific keys or specific actions for the TPM.
+
+ TPM_KH_TRANSPORT indicates to TPM_EstablishTransport that there is no encryption key, and that
+ the "secret" wrapped parameters are actually passed unencrypted.
+*/
+
+#define TPM_KH_SRK 0x40000000 /* The handle points to the SRK */
+#define TPM_KH_OWNER 0x40000001 /* The handle points to the TPM Owner */
+#define TPM_KH_REVOKE 0x40000002 /* The handle points to the RevokeTrust value */
+#define TPM_KH_TRANSPORT 0x40000003 /* The handle points to the TPM_EstablishTransport static
+ authorization */
+#define TPM_KH_OPERATOR 0x40000004 /* The handle points to the Operator auth */
+#define TPM_KH_ADMIN 0x40000005 /* The handle points to the delegation administration
+ auth */
+#define TPM_KH_EK 0x40000006 /* The handle points to the PUBEK, only usable with
+ TPM_OwnerReadInternalPub */
+
+/* 4.5 TPM_STARTUP_TYPE rev 87
+
+ To specify what type of startup is occurring.
+*/
+
+#define TPM_ST_CLEAR 0x0001 /* The TPM is starting up from a clean state */
+#define TPM_ST_STATE 0x0002 /* The TPM is starting up from a saved state */
+#define TPM_ST_DEACTIVATED 0x0003 /* The TPM is to startup and set the deactivated flag to
+ TRUE */
+
+/* 4.6 TPM_STARTUP_EFFECTS rev 101
+
+ This structure lists for the various resources and sessions on a TPM the affect that TPM_Startup
+ has on the values.
+
+ There are three ST_STATE options for keys (restore all, restore non-volatile, or restore none)
+ and two ST_CLEAR options (restore non-volatile or restore none). As bit 4 was insufficient to
+ describe the possibilities, it is deprecated. Software should use TPM_CAP_KEY_HANDLE to
+ determine which keys are loaded after TPM_Startup.
+
+ 31-9 No information and MUST be FALSE
+
+ 8 TPM_RT_DAA_TPM resources are initialized by TPM_Startup(ST_STATE)
+ 7 TPM_Startup has no effect on auditDigest
+ 6 auditDigest is set to all zeros on TPM_Startup(ST_CLEAR) but not on other types of TPM_Startup
+ 5 auditDigest is set to all zeros on TPM_Startup(any)
+ 4 TPM_RT_KEY Deprecated, as the meaning was subject to interpretation. (Was:TPM_RT_KEY resources
+ are initialized by TPM_Startup(ST_ANY))
+ 3 TPM_RT_AUTH resources are initialized by TPM_Startup(ST_STATE)
+ 2 TPM_RT_HASH resources are initialized by TPM_Startup(ST_STATE)
+ 1 TPM_RT_TRANS resources are initialized by TPM_Startup(ST_STATE)
+ 0 TPM_RT_CONTEXT session (but not key) resources are initialized by TPM_Startup(ST_STATE)
+*/
+
+
+#define TPM_STARTUP_EFFECTS_ST_STATE_RT_DAA 0x00000100 /* bit 8 */
+#define TPM_STARTUP_EFFECTS_STARTUP_NO_AUDITDIGEST 0x00000080 /* bit 7 */
+#define TPM_STARTUP_EFFECTS_ST_CLEAR_AUDITDIGEST 0x00000040 /* bit 6 */
+#define TPM_STARTUP_EFFECTS_STARTUP_AUDITDIGEST 0x00000020 /* bit 5 */
+#define TPM_STARTUP_EFFECTS_ST_ANY_RT_KEY 0x00000010 /* bit 4 */
+#define TPM_STARTUP_EFFECTS_ST_STATE_RT_AUTH 0x00000008 /* bit 3 */
+#define TPM_STARTUP_EFFECTS_ST_STATE_RT_HASH 0x00000004 /* bit 2 */
+#define TPM_STARTUP_EFFECTS_ST_STATE_RT_TRANS 0x00000002 /* bit 1 */
+#define TPM_STARTUP_EFFECTS_ST_STATE_RT_CONTEXT 0x00000001 /* bit 0 */
+
+/* 4.7 TPM_PROTOCOL_ID rev 87
+
+ This value identifies the protocol in use.
+*/
+
+#define TPM_PID_NONE 0x0000 /* kgold - added */
+#define TPM_PID_OIAP 0x0001 /* The OIAP protocol. */
+#define TPM_PID_OSAP 0x0002 /* The OSAP protocol. */
+#define TPM_PID_ADIP 0x0003 /* The ADIP protocol. */
+#define TPM_PID_ADCP 0X0004 /* The ADCP protocol. */
+#define TPM_PID_OWNER 0X0005 /* The protocol for taking ownership of a TPM. */
+#define TPM_PID_DSAP 0x0006 /* The DSAP protocol */
+#define TPM_PID_TRANSPORT 0x0007 /*The transport protocol */
+
+/* 4.8 TPM_ALGORITHM_ID rev 99
+
+ This table defines the types of algorithms that may be supported by the TPM.
+
+ The TPM MUST support the algorithms TPM_ALG_RSA, TPM_ALG_SHA, TPM_ALG_HMAC, and TPM_ALG_MGF1
+*/
+
+//#define TPM_ALG_RSA 0x00000001 /* The RSA algorithm. */
+/* #define TPM_ALG_DES 0x00000002 (was the DES algorithm) */
+/* #define TPM_ALG_3DES 0X00000003 (was the 3DES algorithm in EDE mode) */
+#define TPM_ALG_SHA 0x00000004 /* The SHA1 algorithm */
+//#define TPM_ALG_HMAC 0x00000005 /* The RFC 2104 HMAC algorithm */
+#define TPM_ALG_AES128 0x00000006 /* The AES algorithm, key size 128 */
+//#define TPM_ALG_MGF1 0x00000007 /* The XOR algorithm using MGF1 to create a string the size
+//of the encrypted block */
+#define TPM_ALG_AES192 0x00000008 /* AES, key size 192 */
+#define TPM_ALG_AES256 0x00000009 /* AES, key size 256 */
+//#define TPM_ALG_XOR 0x0000000A /* XOR using the rolling nonces */
+
+/* 4.9 TPM_PHYSICAL_PRESENCE rev 87
+
+*/
+
+#define TPM_PHYSICAL_PRESENCE_HW_DISABLE 0x0200 /* Sets the physicalPresenceHWEnable to FALSE
+ */
+#define TPM_PHYSICAL_PRESENCE_CMD_DISABLE 0x0100 /* Sets the physicalPresenceCMDEnable to
+ FALSE */
+#define TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK 0x0080 /* Sets the physicalPresenceLifetimeLock to
+ TRUE */
+#define TPM_PHYSICAL_PRESENCE_HW_ENABLE 0x0040 /* Sets the physicalPresenceHWEnable to TRUE
+ */
+#define TPM_PHYSICAL_PRESENCE_CMD_ENABLE 0x0020 /* Sets the physicalPresenceCMDEnable to TRUE
+ */
+#define TPM_PHYSICAL_PRESENCE_NOTPRESENT 0x0010 /* Sets PhysicalPresence = FALSE */
+#define TPM_PHYSICAL_PRESENCE_PRESENT 0x0008 /* Sets PhysicalPresence = TRUE */
+#define TPM_PHYSICAL_PRESENCE_LOCK 0x0004 /* Sets PhysicalPresenceLock = TRUE */
+
+#define TPM_PHYSICAL_PRESENCE_MASK 0xfc03 /* ~ OR of all above bits */
+
+/* 4.10 TPM_MIGRATE_SCHEME rev 103
+
+ The scheme indicates how the StartMigrate command should handle the migration of the encrypted
+ blob.
+*/
+
+#define TPM_MS_MIGRATE 0x0001 /* A public key that can be used with all TPM
+ migration commands other than 'ReWrap' mode. */
+#define TPM_MS_REWRAP 0x0002 /* A public key that can be used for the ReWrap mode
+ of TPM_CreateMigrationBlob. */
+#define TPM_MS_MAINT 0x0003 /* A public key that can be used for the Maintenance
+ commands */
+#define TPM_MS_RESTRICT_MIGRATE 0x0004 /* The key is to be migrated to a Migration
+ Authority. */
+#define TPM_MS_RESTRICT_APPROVE 0x0005 /* The key is to be migrated to an entity approved by
+ a Migration Authority using double wrapping */
+
+/* 4.11 TPM_EK_TYPE rev 87
+
+ This structure indicates what type of information that the EK is dealing with.
+*/
+
+#define TPM_EK_TYPE_ACTIVATE 0x0001 /* The blob MUST be TPM_EK_BLOB_ACTIVATE */
+#define TPM_EK_TYPE_AUTH 0x0002 /* The blob MUST be TPM_EK_BLOB_AUTH */
+
+/* 4.12 TPM_PLATFORM_SPECIFIC rev 87
+
+ This enumerated type indicates the platform specific spec that the information relates to.
+*/
+
+#define TPM_PS_PC_11 0x0001 /* PC Specific version 1.1 */
+#define TPM_PS_PC_12 0x0002 /* PC Specific version 1.2 */
+#define TPM_PS_PDA_12 0x0003 /* PDA Specific version 1.2 */
+#define TPM_PS_Server_12 0x0004 /* Server Specific version 1.2 */
+#define TPM_PS_Mobile_12 0x0005 /* Mobil Specific version 1.2 */
+
+/* 5.8 TPM_KEY_USAGE rev 101
+
+ This table defines the types of keys that are possible. Each value defines for what operation
+ the key can be used. Most key usages can be CMKs. See 4.2, TPM_PAYLOAD_TYPE.
+
+ Each key has a setting defining the encryption and signature scheme to use. The selection of a
+ key usage value limits the choices of encryption and signature schemes.
+*/
+
+#define TPM_KEY_UNINITIALIZED 0x0000 /* NOTE: Added. This seems like a good place to indicate
+ that a TPM_KEY structure has not been initialized */
+
+#define TPM_KEY_SIGNING 0x0010 /* This SHALL indicate a signing key. The [private] key
+ SHALL be used for signing operations, only. This means
+ that it MUST be a leaf of the Protected Storage key
+ hierarchy. */
+
+#define TPM_KEY_STORAGE 0x0011 /* This SHALL indicate a storage key. The key SHALL be used
+ to wrap and unwrap other keys in the Protected Storage
+ hierarchy */
+
+#define TPM_KEY_IDENTITY 0x0012 /* This SHALL indicate an identity key. The key SHALL be
+ used for operations that require a TPM identity, only. */
+
+#define TPM_KEY_AUTHCHANGE 0X0013 /* This SHALL indicate an ephemeral key that is in use
+ during the ChangeAuthAsym process, only. */
+
+#define TPM_KEY_BIND 0x0014 /* This SHALL indicate a key that can be used for TPM_Bind
+ and TPM_Unbind operations only. */
+
+#define TPM_KEY_LEGACY 0x0015 /* This SHALL indicate a key that can perform signing and
+ binding operations. The key MAY be used for both signing
+ and binding operations. The TPM_KEY_LEGACY key type is to
+ allow for use by applications where both signing and
+ encryption operations occur with the same key. */
+
+#define TPM_KEY_MIGRATE 0x0016 /* This SHALL indicate a key in use for TPM_MigrateKey */
+
+/* 5.8.1 TPM_ENC_SCHEME Mandatory Key Usage Schemes rev 99
+
+ The TPM MUST check that the encryption scheme defined for use with the key is a valid scheme for
+ the key type, as follows:
+*/
+
+#define TPM_ES_NONE 0x0001
+#define TPM_ES_RSAESPKCSv15 0x0002
+#define TPM_ES_RSAESOAEP_SHA1_MGF1 0x0003
+#define TPM_ES_SYM_CTR 0x0004
+#define TPM_ES_SYM_OFB 0x0005
+
+/* 5.8.1 TPM_SIG_SCHEME Mandatory Key Usage Schemes rev 99
+
+ The TPM MUST check that the signature scheme defined for use with the key is a valid scheme for
+ the key type, as follows:
+*/
+
+#define TPM_SS_NONE 0x0001
+#define TPM_SS_RSASSAPKCS1v15_SHA1 0x0002
+#define TPM_SS_RSASSAPKCS1v15_DER 0x0003
+#define TPM_SS_RSASSAPKCS1v15_INFO 0x0004
+
+/* 5.9 TPM_AUTH_DATA_USAGE rev 110
+
+ The indication to the TPM when authorization sessions for an entity are required. Future
+ versions may allow for more complex decisions regarding AuthData checking.
+*/
+
+#define TPM_AUTH_NEVER 0x00 /* This SHALL indicate that usage of the key without
+ authorization is permitted. */
+
+#define TPM_AUTH_ALWAYS 0x01 /* This SHALL indicate that on each usage of the key the
+ authorization MUST be performed. */
+
+#define TPM_NO_READ_PUBKEY_AUTH 0x03 /* This SHALL indicate that on commands that require the TPM to
+ use the the key, the authorization MUST be performed. For
+ commands that cause the TPM to read the public portion of the
+ key, but not to use the key (e.g. TPM_GetPubKey), the
+ authorization may be omitted. */
+
+/* 5.10 TPM_KEY_FLAGS rev 110
+
+ This table defines the meanings of the bits in a TPM_KEY_FLAGS structure, used in
+ TPM_STORE_ASYMKEY and TPM_CERTIFY_INFO.
+
+ The value of TPM_KEY_FLAGS MUST be decomposed into individual mask values. The presence of a mask
+ value SHALL have the effect described in the above table
+
+ On input, all undefined bits MUST be zero. The TPM MUST return an error if any undefined bit is
+ set. On output, the TPM MUST set all undefined bits to zero.
+*/
+
+#define TPM_KEY_FLAGS_MASK 0x0000001f
+
+#define TPM_REDIRECTION 0x00000001 /* This mask value SHALL indicate the use of redirected
+ output. */
+
+#define TPM_MIGRATABLE 0x00000002 /* This mask value SHALL indicate that the key is
+ migratable. */
+
+#define TPM_ISVOLATILE 0x00000004 /* This mask value SHALL indicate that the key MUST be
+ unloaded upon execution of the
+ TPM_Startup(ST_Clear). This does not indicate that a
+ non-volatile key will remain loaded across
+ TPM_Startup(ST_Clear) events. */
+
+#define TPM_PCRIGNOREDONREAD 0x00000008 /* When TRUE the TPM MUST NOT check digestAtRelease or
+ localityAtRelease for commands that read the public
+ portion of the key (e.g., TPM_GetPubKey) and MAY NOT
+ check digestAtRelease or localityAtRelease for
+ commands that use the public portion of the key
+ (e.g. TPM_Seal)
+
+ When FALSE the TPM MUST check digestAtRelease and
+ localityAtRelease for commands that read or use the
+ public portion of the key */
+
+#define TPM_MIGRATEAUTHORITY 0x00000010 /* When set indicates that the key is under control of a
+ migration authority. The TPM MUST only allow the
+ creation of a key with this flag in
+ TPM_MA_CreateKey */
+
+/* 5.17 TPM_CMK_DELEGATE values rev 89
+
+ The bits of TPM_CMK_DELEGATE are flags that determine how the TPM responds to delegated requests
+ to manipulate a certified-migration-key, a loaded key with payload type TPM_PT_MIGRATE_RESTRICTED
+ or TPM_PT_MIGRATE_EXTERNAL..
+
+ 26:0 reserved MUST be 0
+
+ The default value of TPM_CMK_Delegate is zero (0)
+*/
+
+#define TPM_CMK_DELEGATE_SIGNING 0x80000000 /* When set to 1, this bit SHALL indicate that a
+ delegated command may manipulate a CMK of
+ TPM_KEY_USAGE == TPM_KEY_SIGNING */
+#define TPM_CMK_DELEGATE_STORAGE 0x40000000 /* When set to 1, this bit SHALL indicate that a
+ delegated command may manipulate a CMK of
+ TPM_KEY_USAGE == TPM_KEY_STORAGE */
+#define TPM_CMK_DELEGATE_BIND 0x20000000 /* When set to 1, this bit SHALL indicate that a
+ delegated command may manipulate a CMK of
+ TPM_KEY_USAGE == TPM_KEY_BIND */
+#define TPM_CMK_DELEGATE_LEGACY 0x10000000 /* When set to 1, this bit SHALL indicate that a
+ delegated command may manipulate a CMK of
+ TPM_KEY_USAGE == TPM_KEY_LEGACY */
+#define TPM_CMK_DELEGATE_MIGRATE 0x08000000 /* When set to 1, this bit SHALL indicate that a
+ delegated command may manipulate a CMK of
+ TPM_KEY_USAGE == TPM_KEY_MIGRATE */
+
+/* 6. TPM_TAG (Command and Response Tags) rev 100
+
+ These tags indicate to the TPM the construction of the command either as input or as output. The
+ AUTH indicates that there are one or more AuthData values that follow the command
+ parameters.
+*/
+
+#define TPM_TAG_RQU_COMMAND 0x00C1 /* A command with no authentication. */
+#define TPM_TAG_RQU_AUTH1_COMMAND 0x00C2 /* An authenticated command with one authentication
+ handle */
+#define TPM_TAG_RQU_AUTH2_COMMAND 0x00C3 /* An authenticated command with two authentication
+ handles */
+#define TPM_TAG_RSP_COMMAND 0x00C4 /* A response from a command with no authentication
+ */
+#define TPM_TAG_RSP_AUTH1_COMMAND 0x00C5 /* An authenticated response with one authentication
+ handle */
+#define TPM_TAG_RSP_AUTH2_COMMAND 0x00C6 /* An authenticated response with two authentication
+ handles */
+
+/* TIS 7.2 PCR Attributes
+
+*/
+
+#define TPM_DEBUG_PCR 16
+#define TPM_LOCALITY_4_PCR 17
+#define TPM_LOCALITY_3_PCR 18
+#define TPM_LOCALITY_2_PCR 19
+#define TPM_LOCALITY_1_PCR 20
+
+/* 10.9 TPM_KEY_CONTROL rev 87
+
+ Attributes that can control various aspects of key usage and manipulation.
+
+ Allows for controlling of the key when loaded and how to handle TPM_Startup issues.
+*/
+
+#define TPM_KEY_CONTROL_OWNER_EVICT 0x00000001 /* Owner controls when the key is evicted
+ from the TPM. When set the TPM MUST
+ preserve key the key across all TPM_Init
+ invocations. */
+
+/* 13.1.1 TPM_TRANSPORT_ATTRIBUTES Definitions */
+
+#define TPM_TRANSPORT_ENCRYPT 0x00000001 /* The session will provide encryption using
+ the internal encryption algorithm */
+#define TPM_TRANSPORT_LOG 0x00000002 /* The session will provide a log of all
+ operations that occur in the session */
+#define TPM_TRANSPORT_EXCLUSIVE 0X00000004 /* The transport session is exclusive and
+ any command executed outside the
+ transport session causes the invalidation
+ of the session */
+
+/* 21.1 TPM_CAPABILITY_AREA rev 115
+
+ To identify a capability to be queried.
+*/
+
+#define TPM_CAP_ORD 0x00000001 /* Boolean value. TRUE indicates that the TPM supports
+ the ordinal. FALSE indicates that the TPM does not
+ support the ordinal. Unimplemented optional ordinals
+ and unused (unassigned) ordinals return FALSE. */
+#define TPM_CAP_ALG 0x00000002 /* Boolean value. TRUE means that the TPM supports the
+ asymmetric algorithm for TPM_Sign, TPM_Seal,
+ TPM_UnSeal and TPM_UnBind and related commands. FALSE
+ indicates that the asymmetric algorithm is not
+ supported for these types of commands. The TPM MAY
+ return TRUE or FALSE for other than asymmetric
+ algoroithms that it supports. Unassigned and
+ unsupported algorithm IDs return FALSE.*/
+
+#define TPM_CAP_PID 0x00000003 /* Boolean value. TRUE indicates that the TPM supports
+ the protocol, FALSE indicates that the TPM does not
+ support the protocol. */
+#define TPM_CAP_FLAG 0x00000004 /* Return the TPM_PERMANENT_FLAGS structure or Return the
+ TPM_STCLEAR_FLAGS structure */
+#define TPM_CAP_PROPERTY 0x00000005 /* See following table for the subcaps */
+#define TPM_CAP_VERSION 0x00000006 /* TPM_STRUCT_VER structure. The Major and Minor must
+ indicate 1.1. The firmware revision MUST indicate
+ 0.0 */
+#define TPM_CAP_KEY_HANDLE 0x00000007 /* A TPM_KEY_HANDLE_LIST structure that enumerates all
+ key handles loaded on the TPM. */
+#define TPM_CAP_CHECK_LOADED 0x00000008 /* A Boolean value. TRUE indicates that the TPM has
+ enough memory available to load a key of the type
+ specified by TPM_KEY_PARMS. FALSE indicates that the
+ TPM does not have enough memory. */
+#define TPM_CAP_SYM_MODE 0x00000009 /* Subcap TPM_SYM_MODE
+ A Boolean value. TRUE indicates that the TPM supports
+ the TPM_SYM_MODE, FALSE indicates the TPM does not
+ support the mode. */
+#define TPM_CAP_KEY_STATUS 0x0000000C /* Boolean value of ownerEvict. The handle MUST point to
+ a valid key handle.*/
+#define TPM_CAP_NV_LIST 0x0000000D /* A list of TPM_NV_INDEX values that are currently
+ allocated NV storage through TPM_NV_DefineSpace. */
+#define TPM_CAP_MFR 0x00000010 /* Manufacturer specific. The manufacturer may provide
+ any additional information regarding the TPM and the
+ TPM state but MUST not expose any sensitive
+ information. */
+#define TPM_CAP_NV_INDEX 0x00000011 /* A TPM_NV_DATA_PUBLIC structure that indicates the
+ values for the TPM_NV_INDEX. Returns TPM_BADINDEX if
+ the index is not in the TPM_CAP_NV_LIST list. */
+#define TPM_CAP_TRANS_ALG 0x00000012 /* Boolean value. TRUE means that the TPM supports the
+ algorithm for TPM_EstablishTransport,
+ TPM_ExecuteTransport and
+ TPM_ReleaseTransportSigned. FALSE indicates that for
+ these three commands the algorithm is not supported."
+ */
+#define TPM_CAP_HANDLE 0x00000014 /* A TPM_KEY_HANDLE_LIST structure that enumerates all
+ handles currently loaded in the TPM for the given
+ resource type. */
+#define TPM_CAP_TRANS_ES 0x00000015 /* Boolean value. TRUE means the TPM supports the
+ encryption scheme in a transport session for at least
+ one algorithm.. */
+#define TPM_CAP_AUTH_ENCRYPT 0x00000017 /* Boolean value. TRUE indicates that the TPM supports
+ the encryption algorithm in OSAP encryption of
+ AuthData values */
+#define TPM_CAP_SELECT_SIZE 0x00000018 /* Boolean value. TRUE indicates that the TPM supports
+ the size for the given version. For instance a request
+ could ask for version 1.1 size 2 and the TPM would
+ indicate TRUE. For 1.1 size 3 the TPM would indicate
+ FALSE. For 1.2 size 3 the TPM would indicate TRUE. */
+#define TPM_CAP_DA_LOGIC 0x00000019 /* (OPTIONAL)
+ A TPM_DA_INFO or TPM_DA_INFO_LIMITED structure that
+ returns data according to the selected entity type
+ (e.g., TPM_ET_KEYHANDLE, TPM_ET_OWNER, TPM_ET_SRK,
+ TPM_ET_COUNTER, TPM_ET_OPERATOR, etc.). If the
+ implemented dictionary attack logic does not support
+ different secret types, the entity type can be
+ ignored. */
+#define TPM_CAP_VERSION_VAL 0x0000001A /* TPM_CAP_VERSION_INFO structure. The TPM fills in the
+ structure and returns the information indicating what
+ the TPM currently supports. */
+
+#define TPM_CAP_FLAG_PERMANENT 0x00000108 /* Return the TPM_PERMANENT_FLAGS structure */
+#define TPM_CAP_FLAG_VOLATILE 0x00000109 /* Return the TPM_STCLEAR_FLAGS structure */
+
+/* 21.2 CAP_PROPERTY Subcap values for CAP_PROPERTY rev 105
+
+ The TPM_CAP_PROPERTY capability has numerous subcap values. The definition for all subcap values
+ occurs in this table.
+
+ TPM_CAP_PROP_MANUFACTURER returns a vendor ID unique to each manufacturer. The same value is
+ returned as the TPM_CAP_VERSION_INFO -> tpmVendorID. A company abbreviation such as a null
+ terminated stock ticker is a typical choice. However, there is no requirement that the value
+ contain printable characters. The document "TCG Vendor Naming" lists the vendor ID values.
+
+ TPM_CAP_PROP_MAX_xxxSESS is a constant. At TPM_Startup(ST_CLEAR) TPM_CAP_PROP_xxxSESS ==
+ TPM_CAP_PROP_MAX_xxxSESS. As sessions are created on the TPM, TPM_CAP_PROP_xxxSESS decreases
+ toward zero. As sessions are terminated, TPM_CAP_PROP_xxxSESS increases toward
+ TPM_CAP_PROP_MAX_xxxSESS.
+
+ There is a similar relationship between the constants TPM_CAP_PROP_MAX_COUNTERS and
+ TPM_CAP_PROP_MAX_CONTEXT and the varying TPM_CAP_PROP_COUNTERS and TPM_CAP_PROP_CONTEXT.
+
+ In one typical implementation where authorization and transport sessions reside in separate
+ pools, TPM_CAP_PROP_SESSIONS will be the sum of TPM_CAP_PROP_AUTHSESS and TPM_CAP_PROP_TRANSESS.
+ In another typical implementation where authorization and transport sessions share the same pool,
+ TPM_CAP_PROP_SESSIONS, TPM_CAP_PROP_AUTHSESS, and TPM_CAP_PROP_TRANSESS will all be equal.
+*/
+
+#define TPM_CAP_PROP_PCR 0x00000101 /* uint32_t value. Returns the number of PCR
+ registers supported by the TPM */
+#define TPM_CAP_PROP_DIR 0x00000102 /* uint32_t. Deprecated. Returns the number of
+ DIR, which is now fixed at 1 */
+#define TPM_CAP_PROP_MANUFACTURER 0x00000103 /* uint32_t value. Returns the vendor ID
+ unique to each TPM manufacturer. */
+#define TPM_CAP_PROP_KEYS 0x00000104 /* uint32_t value. Returns the number of 2048-
+ bit RSA keys that can be loaded. This may
+ vary with time and circumstances. */
+#define TPM_CAP_PROP_MIN_COUNTER 0x00000107 /* uint32_t. The minimum amount of time in
+ 10ths of a second that must pass between
+ invocations of incrementing the monotonic
+ counter. */
+#define TPM_CAP_PROP_AUTHSESS 0x0000010A /* uint32_t. The number of available
+ authorization sessions. This may vary with
+ time and circumstances. */
+#define TPM_CAP_PROP_TRANSESS 0x0000010B /* uint32_t. The number of available transport
+ sessions. This may vary with time and
+ circumstances. */
+#define TPM_CAP_PROP_COUNTERS 0x0000010C /* uint32_t. The number of available monotonic
+ counters. This may vary with time and
+ circumstances. */
+#define TPM_CAP_PROP_MAX_AUTHSESS 0x0000010D /* uint32_t. The maximum number of loaded
+ authorization sessions the TPM supports */
+#define TPM_CAP_PROP_MAX_TRANSESS 0x0000010E /* uint32_t. The maximum number of loaded
+ transport sessions the TPM supports. */
+#define TPM_CAP_PROP_MAX_COUNTERS 0x0000010F /* uint32_t. The maximum number of monotonic
+ counters under control of TPM_CreateCounter
+ */
+#define TPM_CAP_PROP_MAX_KEYS 0x00000110 /* uint32_t. The maximum number of 2048 RSA
+ keys that the TPM can support. The number
+ does not include the EK or SRK. */
+#define TPM_CAP_PROP_OWNER 0x00000111 /* BOOL. A value of TRUE indicates that the
+ TPM has successfully installed an owner. */
+#define TPM_CAP_PROP_CONTEXT 0x00000112 /* uint32_t. The number of available saved
+ session slots. This may vary with time and
+ circumstances. */
+#define TPM_CAP_PROP_MAX_CONTEXT 0x00000113 /* uint32_t. The maximum number of saved
+ session slots. */
+#define TPM_CAP_PROP_FAMILYROWS 0x00000114 /* uint32_t. The maximum number of rows in the
+ family table */
+#define TPM_CAP_PROP_TIS_TIMEOUT 0x00000115 /* A 4 element array of uint32_t values each
+ denoting the timeout value in microseconds
+ for the following in this order:
+
+ TIMEOUT_A, TIMEOUT_B, TIMEOUT_C, TIMEOUT_D
+
+ Where these timeouts are to be used is
+ determined by the platform specific TPM
+ Interface Specification. */
+#define TPM_CAP_PROP_STARTUP_EFFECT 0x00000116 /* The TPM_STARTUP_EFFECTS structure */
+#define TPM_CAP_PROP_DELEGATE_ROW 0x00000117 /* uint32_t. The maximum size of the delegate
+ table in rows. */
+#define TPM_CAP_PROP_MAX_DAASESS 0x00000119 /* uint32_t. The maximum number of loaded DAA
+ sessions (join or sign) that the TPM
+ supports */
+#define TPM_CAP_PROP_DAASESS 0x0000011A /* uint32_t. The number of available DAA
+ sessions. This may vary with time and
+ circumstances */
+#define TPM_CAP_PROP_CONTEXT_DIST 0x0000011B /* uint32_t. The maximum distance between
+ context count values. This MUST be at least
+ 2^16-1. */
+#define TPM_CAP_PROP_DAA_INTERRUPT 0x0000011C /* BOOL. A value of TRUE indicates that the
+ TPM will accept ANY command while executing
+ a DAA Join or Sign.
+
+ A value of FALSE indicates that the TPM
+ will invalidate the DAA Join or Sign upon
+ the receipt of any command other than the
+ next join/sign in the session or a
+ TPM_SaveContext */
+#define TPM_CAP_PROP_SESSIONS 0X0000011D /* uint32_t. The number of available sessions
+ from the pool. This MAY vary with time and
+ circumstances. Pool sessions include
+ authorization and transport sessions. */
+#define TPM_CAP_PROP_MAX_SESSIONS 0x0000011E /* uint32_t. The maximum number of sessions
+ the TPM supports. */
+#define TPM_CAP_PROP_CMK_RESTRICTION 0x0000011F /* uint32_t TPM_Permanent_Data ->
+ restrictDelegate
+ */
+#define TPM_CAP_PROP_DURATION 0x00000120 /* A 3 element array of uint32_t values each
+ denoting the duration value in microseconds
+ of the duration of the three classes of
+ commands: Small, Medium and Long in the
+ following in this order: SMALL_DURATION,
+ MEDIUM_DURATION, LONG_DURATION */
+#define TPM_CAP_PROP_ACTIVE_COUNTER 0x00000122 /* TPM_COUNT_ID. The id of the current
+ counter. 0xff..ff if no counter is active
+ */
+#define TPM_CAP_PROP_MAX_NV_AVAILABLE 0x00000123 /*uint32_t. Deprecated. The maximum number
+ of NV space that can be allocated, MAY
+ vary with time and circumstances. This
+ capability was not implemented
+ consistently, and is replaced by
+ TPM_NV_INDEX_TRIAL. */
+#define TPM_CAP_PROP_INPUT_BUFFER 0x00000124 /* uint32_t. The maximum size of the TPM
+ input buffer or output buffer in
+ bytes. */
+
+/* 21.4 Set_Capability Values rev 107
+ */
+
+#define TPM_SET_PERM_FLAGS 0x00000001 /* The ability to set a value is field specific and
+ a review of the structure will disclose the
+ ability and requirements to set a value */
+#define TPM_SET_PERM_DATA 0x00000002 /* The ability to set a value is field specific and
+ a review of the structure will disclose the
+ ability and requirements to set a value */
+#define TPM_SET_STCLEAR_FLAGS 0x00000003 /* The ability to set a value is field specific and
+ a review of the structure will disclose the
+ ability and requirements to set a value */
+#define TPM_SET_STCLEAR_DATA 0x00000004 /* The ability to set a value is field specific and
+ a review of the structure will disclose the
+ ability and requirements to set a value */
+#define TPM_SET_STANY_FLAGS 0x00000005 /* The ability to set a value is field specific and
+ a review of the structure will disclose the
+ ability and requirements to set a value */
+#define TPM_SET_STANY_DATA 0x00000006 /* The ability to set a value is field specific and
+ a review of the structure will disclose the
+ ability and requirements to set a value */
+#define TPM_SET_VENDOR 0x00000007 /* This area allows the vendor to set specific areas
+ in the TPM according to the normal shielded
+ location requirements */
+
+/* Set Capability sub caps */
+
+/* TPM_PERMANENT_FLAGS */
+
+#define TPM_PF_DISABLE 1
+#define TPM_PF_OWNERSHIP 2
+#define TPM_PF_DEACTIVATED 3
+#define TPM_PF_READPUBEK 4
+#define TPM_PF_DISABLEOWNERCLEAR 5
+#define TPM_PF_ALLOWMAINTENANCE 6
+#define TPM_PF_PHYSICALPRESENCELIFETIMELOCK 7
+#define TPM_PF_PHYSICALPRESENCEHWENABLE 8
+#define TPM_PF_PHYSICALPRESENCECMDENABLE 9
+#define TPM_PF_CEKPUSED 10
+#define TPM_PF_TPMPOST 11
+#define TPM_PF_TPMPOSTLOCK 12
+#define TPM_PF_FIPS 13
+#define TPM_PF_OPERATOR 14
+#define TPM_PF_ENABLEREVOKEEK 15
+#define TPM_PF_NV_LOCKED 16
+#define TPM_PF_READSRKPUB 17
+#define TPM_PF_TPMESTABLISHED 18
+#define TPM_PF_MAINTENANCEDONE 19
+#define TPM_PF_DISABLEFULLDALOGICINFO 20
+
+/* TPM_STCLEAR_FLAGS */
+
+#define TPM_SF_DEACTIVATED 1
+#define TPM_SF_DISABLEFORCECLEAR 2
+#define TPM_SF_PHYSICALPRESENCE 3
+#define TPM_SF_PHYSICALPRESENCELOCK 4
+#define TPM_SF_BGLOBALLOCK 5
+
+/* TPM_STANY_FLAGS */
+
+#define TPM_AF_POSTINITIALISE 1
+#define TPM_AF_LOCALITYMODIFIER 2
+#define TPM_AF_TRANSPORTEXCLUSIVE 3
+#define TPM_AF_TOSPRESENT 4
+
+/* TPM_PERMANENT_DATA */
+
+#define TPM_PD_REVMAJOR 1
+#define TPM_PD_REVMINOR 2
+#define TPM_PD_TPMPROOF 3
+#define TPM_PD_OWNERAUTH 4
+#define TPM_PD_OPERATORAUTH 5
+#define TPM_PD_MANUMAINTPUB 6
+#define TPM_PD_ENDORSEMENTKEY 7
+#define TPM_PD_SRK 8
+#define TPM_PD_DELEGATEKEY 9
+#define TPM_PD_CONTEXTKEY 10
+#define TPM_PD_AUDITMONOTONICCOUNTER 11
+#define TPM_PD_MONOTONICCOUNTER 12
+#define TPM_PD_PCRATTRIB 13
+#define TPM_PD_ORDINALAUDITSTATUS 14
+#define TPM_PD_AUTHDIR 15
+#define TPM_PD_RNGSTATE 16
+#define TPM_PD_FAMILYTABLE 17
+#define TPM_DELEGATETABLE 18
+#define TPM_PD_EKRESET 19
+#define TPM_PD_LASTFAMILYID 21
+#define TPM_PD_NOOWNERNVWRITE 22
+#define TPM_PD_RESTRICTDELEGATE 23
+#define TPM_PD_TPMDAASEED 24
+#define TPM_PD_DAAPROOF 25
+
+/* TPM_STCLEAR_DATA */
+
+#define TPM_SD_CONTEXTNONCEKEY 1
+#define TPM_SD_COUNTID 2
+#define TPM_SD_OWNERREFERENCE 3
+#define TPM_SD_DISABLERESETLOCK 4
+#define TPM_SD_PCR 5
+#define TPM_SD_DEFERREDPHYSICALPRESENCE 6
+
+/* TPM_STCLEAR_DATA -> deferredPhysicalPresence bits */
+
+#define TPM_DPP_UNOWNED_FIELD_UPGRADE 0x00000001 /* bit 0 TPM_FieldUpgrade */
+
+/* TPM_STANY_DATA */
+
+#define TPM_AD_CONTEXTNONCESESSION 1
+#define TPM_AD_AUDITDIGEST 2
+#define TPM_AD_CURRENTTICKS 3
+#define TPM_AD_CONTEXTCOUNT 4
+#define TPM_AD_CONTEXTLIST 5
+#define TPM_AD_SESSIONS 6
+
+/* 17. Ordinals rev 110
+
+ Ordinals are 32 bit values of type TPM_COMMAND_CODE. The upper byte contains values that serve
+ as flag indicators, the next byte contains values indicating what committee designated the
+ ordinal, and the final two bytes contain the Command Ordinal Index.
+
+ 3 2 1
+ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ |P|C|V| Reserved| Purview | Command Ordinal Index |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Where:
+
+ P is Protected/Unprotected command. When 0 the command is a Protected command, when 1 the
+ command is an Unprotected command.
+
+ C is Non-Connection/Connection related command. When 0 this command passes through to either the
+ protected (TPM) or unprotected (TSS) components.
+
+ V is TPM/Vendor command. When 0 the command is TPM defined, when 1 the command is vendor
+ defined.
+
+ All reserved area bits are set to 0.
+*/
+
+/* The following masks are created to allow for the quick definition of the commands */
+
+#define TPM_PROTECTED_COMMAND 0x00000000 /* TPM protected command, specified in main specification
+ */
+#define TPM_UNPROTECTED_COMMAND 0x80000000 /* TSS command, specified in the TSS specification */
+#define TPM_CONNECTION_COMMAND 0x40000000 /* TSC command, protected connection commands are
+ specified in the main specification Unprotected
+ connection commands are specified in the TSS */
+#define TPM_VENDOR_COMMAND 0x20000000 /* Command that is vendor specific for a given TPM or
+ TSS. */
+
+
+/* The following Purviews have been defined: */
+
+#define TPM_MAIN 0x00 /* Command is from the main specification */
+#define TPM_PC 0x01 /* Command is specific to the PC */
+#define TPM_PDA 0x02 /* Command is specific to a PDA */
+#define TPM_CELL_PHONE 0x03 /* Command is specific to a cell phone */
+#define TPM_SERVER 0x04 /* Command is specific to servers */
+#define TPM_PERIPHERAL 0x05 /* Command is specific to peripherals */
+//#define TPM_TSS 0x06 /* Command is specific to TSS */
+
+/* Combinations for the main specification would be: */
+
+#define TPM_PROTECTED_ORDINAL (TPM_PROTECTED_COMMAND | TPM_MAIN)
+#define TPM_UNPROTECTED_ORDINAL (TPM_UNPROTECTED_COMMAND | TPM_MAIN)
+#define TPM_CONNECTION_ORDINAL (TPM_CONNECTION_COMMAND | TPM_MAIN)
+
+/* Command ordinals */
+
+#define TPM_ORD_ActivateIdentity 0x0000007A
+#define TPM_ORD_AuthorizeMigrationKey 0x0000002B
+#define TPM_ORD_CertifyKey 0x00000032
+#define TPM_ORD_CertifyKey2 0x00000033
+#define TPM_ORD_CertifySelfTest 0x00000052
+#define TPM_ORD_ChangeAuth 0x0000000C
+#define TPM_ORD_ChangeAuthAsymFinish 0x0000000F
+#define TPM_ORD_ChangeAuthAsymStart 0x0000000E
+#define TPM_ORD_ChangeAuthOwner 0x00000010
+#define TPM_ORD_CMK_ApproveMA 0x0000001D
+#define TPM_ORD_CMK_ConvertMigration 0x00000024
+#define TPM_ORD_CMK_CreateBlob 0x0000001B
+#define TPM_ORD_CMK_CreateKey 0x00000013
+#define TPM_ORD_CMK_CreateTicket 0x00000012
+#define TPM_ORD_CMK_SetRestrictions 0x0000001C
+#define TPM_ORD_ContinueSelfTest 0x00000053
+#define TPM_ORD_ConvertMigrationBlob 0x0000002A
+#define TPM_ORD_CreateCounter 0x000000DC
+#define TPM_ORD_CreateEndorsementKeyPair 0x00000078
+#define TPM_ORD_CreateMaintenanceArchive 0x0000002C
+#define TPM_ORD_CreateMigrationBlob 0x00000028
+#define TPM_ORD_CreateRevocableEK 0x0000007F
+#define TPM_ORD_CreateWrapKey 0x0000001F
+#define TPM_ORD_DAA_Join 0x00000029
+#define TPM_ORD_DAA_Sign 0x00000031
+#define TPM_ORD_Delegate_CreateKeyDelegation 0x000000D4
+#define TPM_ORD_Delegate_CreateOwnerDelegation 0x000000D5
+#define TPM_ORD_Delegate_LoadOwnerDelegation 0x000000D8
+#define TPM_ORD_Delegate_Manage 0x000000D2
+#define TPM_ORD_Delegate_ReadTable 0x000000DB
+#define TPM_ORD_Delegate_UpdateVerification 0x000000D1
+#define TPM_ORD_Delegate_VerifyDelegation 0x000000D6
+#define TPM_ORD_DirRead 0x0000001A
+#define TPM_ORD_DirWriteAuth 0x00000019
+#define TPM_ORD_DisableForceClear 0x0000005E
+#define TPM_ORD_DisableOwnerClear 0x0000005C
+#define TPM_ORD_DisablePubekRead 0x0000007E
+#define TPM_ORD_DSAP 0x00000011
+#define TPM_ORD_EstablishTransport 0x000000E6
+#define TPM_ORD_EvictKey 0x00000022
+#define TPM_ORD_ExecuteTransport 0x000000E7
+#define TPM_ORD_Extend 0x00000014
+#define TPM_ORD_FieldUpgrade 0x000000AA
+#define TPM_ORD_FlushSpecific 0x000000BA
+#define TPM_ORD_ForceClear 0x0000005D
+#define TPM_ORD_GetAuditDigest 0x00000085
+#define TPM_ORD_GetAuditDigestSigned 0x00000086
+#define TPM_ORD_GetAuditEvent 0x00000082
+#define TPM_ORD_GetAuditEventSigned 0x00000083
+#define TPM_ORD_GetCapability 0x00000065
+#define TPM_ORD_GetCapabilityOwner 0x00000066
+#define TPM_ORD_GetCapabilitySigned 0x00000064
+#define TPM_ORD_GetOrdinalAuditStatus 0x0000008C
+#define TPM_ORD_GetPubKey 0x00000021
+#define TPM_ORD_GetRandom 0x00000046
+#define TPM_ORD_GetTestResult 0x00000054
+#define TPM_ORD_GetTicks 0x000000F1
+#define TPM_ORD_IncrementCounter 0x000000DD
+#define TPM_ORD_Init 0x00000097
+#define TPM_ORD_KeyControlOwner 0x00000023
+#define TPM_ORD_KillMaintenanceFeature 0x0000002E
+#define TPM_ORD_LoadAuthContext 0x000000B7
+#define TPM_ORD_LoadContext 0x000000B9
+#define TPM_ORD_LoadKey 0x00000020
+#define TPM_ORD_LoadKey2 0x00000041
+#define TPM_ORD_LoadKeyContext 0x000000B5
+#define TPM_ORD_LoadMaintenanceArchive 0x0000002D
+#define TPM_ORD_LoadManuMaintPub 0x0000002F
+#define TPM_ORD_MakeIdentity 0x00000079
+#define TPM_ORD_MigrateKey 0x00000025
+#define TPM_ORD_NV_DefineSpace 0x000000CC
+#define TPM_ORD_NV_ReadValue 0x000000CF
+#define TPM_ORD_NV_ReadValueAuth 0x000000D0
+#define TPM_ORD_NV_WriteValue 0x000000CD
+#define TPM_ORD_NV_WriteValueAuth 0x000000CE
+#define TPM_ORD_OIAP 0x0000000A
+#define TPM_ORD_OSAP 0x0000000B
+#define TPM_ORD_OwnerClear 0x0000005B
+#define TPM_ORD_OwnerReadInternalPub 0x00000081
+#define TPM_ORD_OwnerReadPubek 0x0000007D
+#define TPM_ORD_OwnerSetDisable 0x0000006E
+#define TPM_ORD_PCR_Reset 0x000000C8
+#define TPM_ORD_PcrRead 0x00000015
+#define TPM_ORD_PhysicalDisable 0x00000070
+#define TPM_ORD_PhysicalEnable 0x0000006F
+#define TPM_ORD_PhysicalSetDeactivated 0x00000072
+#define TPM_ORD_Quote 0x00000016
+#define TPM_ORD_Quote2 0x0000003E
+#define TPM_ORD_ReadCounter 0x000000DE
+#define TPM_ORD_ReadManuMaintPub 0x00000030
+#define TPM_ORD_ReadPubek 0x0000007C
+#define TPM_ORD_ReleaseCounter 0x000000DF
+#define TPM_ORD_ReleaseCounterOwner 0x000000E0
+#define TPM_ORD_ReleaseTransportSigned 0x000000E8
+#define TPM_ORD_Reset 0x0000005A
+#define TPM_ORD_ResetLockValue 0x00000040
+#define TPM_ORD_RevokeTrust 0x00000080
+#define TPM_ORD_SaveAuthContext 0x000000B6
+#define TPM_ORD_SaveContext 0x000000B8
+#define TPM_ORD_SaveKeyContext 0x000000B4
+#define TPM_ORD_SaveState 0x00000098
+#define TPM_ORD_Seal 0x00000017
+#define TPM_ORD_Sealx 0x0000003D
+#define TPM_ORD_SelfTestFull 0x00000050
+#define TPM_ORD_SetCapability 0x0000003F
+#define TPM_ORD_SetOperatorAuth 0x00000074
+#define TPM_ORD_SetOrdinalAuditStatus 0x0000008D
+#define TPM_ORD_SetOwnerInstall 0x00000071
+#define TPM_ORD_SetOwnerPointer 0x00000075
+#define TPM_ORD_SetRedirection 0x0000009A
+#define TPM_ORD_SetTempDeactivated 0x00000073
+#define TPM_ORD_SHA1Complete 0x000000A2
+#define TPM_ORD_SHA1CompleteExtend 0x000000A3
+#define TPM_ORD_SHA1Start 0x000000A0
+#define TPM_ORD_SHA1Update 0x000000A1
+#define TPM_ORD_Sign 0x0000003C
+#define TPM_ORD_Startup 0x00000099
+#define TPM_ORD_StirRandom 0x00000047
+#define TPM_ORD_TakeOwnership 0x0000000D
+#define TPM_ORD_Terminate_Handle 0x00000096
+#define TPM_ORD_TickStampBlob 0x000000F2
+#define TPM_ORD_UnBind 0x0000001E
+#define TPM_ORD_Unseal 0x00000018
+
+#define TSC_ORD_PhysicalPresence 0x4000000A
+#define TSC_ORD_ResetEstablishmentBit 0x4000000B
+
+/* 19. NV storage structures */
+
+/* 19.1 TPM_NV_INDEX rev 110
+
+ The index provides the handle to identify the area of storage. The reserved bits allow for a
+ segregation of the index name space to avoid name collisions.
+
+ The TPM may check the resvd bits for zero. Thus, applications should set the bits to zero.
+
+ The TCG defines the space where the high order bits (T, P, U) are 0. The other spaces are
+ controlled by the indicated entity.
+
+ T is the TPM manufacturer reserved bit. 0 indicates a TCG defined value. 1 indicates a TPM
+ manufacturer specific value.
+
+ P is the platform manufacturer reserved bit. 0 indicates a TCG defined value. 1 indicates that
+ the index is controlled by the platform manufacturer.
+
+ U is for the platform user. 0 indicates a TCG defined value. 1 indicates that the index is
+ controlled by the platform user.
+
+ The TPM_NV_INDEX is a 32-bit value.
+ 3 2 1
+ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ |T|P|U|D| resvd | Purview | Index |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Where:
+
+ 1. The TPM MAY return an error if the reserved area bits are not set to 0.
+
+ 2. The TPM MUST accept all values for T, P, and U
+
+ 3. D indicates defined. 1 indicates that the index is permanently defined and that any
+ TPM_NV_DefineSpace operation will fail after nvLocked is set TRUE.
+
+ a. TCG reserved areas MAY have D set to 0 or 1
+
+ 4. Purview is the value used to indicate the platform specific area. This value is the
+ same as used for command ordinals.
+
+ a. The TPM MUST reject purview values that the TPM cannot support. This means that an
+ index value for a PDA MUST be rejected by a TPM designed to work only on the PC Client.
+*/
+
+#define TPM_NV_INDEX_T_BIT 0x80000000
+#define TPM_NV_INDEX_P_BIT 0x40000000
+#define TPM_NV_INDEX_U_BIT 0x20000000
+#define TPM_NV_INDEX_D_BIT 0x10000000
+/* added kgold */
+#define TPM_NV_INDEX_RESVD 0x0f000000
+#define TPM_NV_INDEX_PURVIEW_BIT 16
+#define TPM_NV_INDEX_PURVIEW_MASK 0x00ff0000
+
+/* 19.1.1 Required TPM_NV_INDEX values rev 97
+
+ The required index values must be found on each TPM regardless of platform. These areas are
+ always present and do not require a TPM_DefineSpace command to allocate.
+
+ A platform specific specification may add additional required index values for the platform.
+
+ The TPM MUST reserve the space as indicated for the required index values
+*/
+
+#define TPM_NV_INDEX_LOCK 0xFFFFFFFF /* This value turns on the NV authorization
+ protections. Once executed all NV areas use the
+ protections as defined. This value never resets.
+
+ Attempting to execute TPM_NV_DefineSpace on this value
+ with non-zero size MAY result in a TPM_BADINDEX
+ response.
+ */
+
+#define TPM_NV_INDEX0 0x00000000 /* This value allows for the setting of the bGlobalLock
+ flag, which is only reset on TPM_Startup(ST_Clear)
+
+ Attempting to execute TPM_NV_WriteValue with a size other
+ than zero MAY result in the TPM_BADINDEX error code.
+ */
+
+#define TPM_NV_INDEX_DIR 0x10000001 /* Size MUST be 20. This index points to the deprecated DIR
+ command area from 1.1. The TPM MUST map this reserved
+ space to be the area operated on by the 1.1 DIR commands.
+ */
+
+/* 19.1.2 Reserved Index values rev 116
+
+ The reserved values are defined to avoid index collisions. These values are not in each and every
+ TPM.
+
+ 1. The reserved index values are to avoid index value collisions.
+ 2. These index values require a TPM_DefineSpace to have the area for the index allocated
+ 3. A platform specific specification MAY indicate that reserved values are required.
+ 4. The reserved index values MAY have their D bit set by the TPM vendor to permanently
+*/
+
+#define TPM_NV_INDEX_TPM 0x0000Fxxx /* Reserved for TPM use */
+#define TPM_NV_INDEX_EKCert 0x1000F000 /* The Endorsement credential */
+
+#define TPM_NV_INDEX_TPM_CC 0x0000F001 /* The TPM Conformance credential */
+#define TPM_NV_INDEX_PlatformCert 0x0000F002 /* The platform credential */
+#define TPM_NV_INDEX_Platform_CC 0x0000F003 /* The Platform conformance credential */
+#define TPM_NV_INDEX_TRIAL 0x0000F004 /* To try TPM_NV_DefineSpace without
+ actually allocating NV space */
+
+#if 0
+#define TPM_NV_INDEX_PC 0x0001xxxx /* Reserved for PC Client use */
+#define TPM_NV_INDEX_GPIO_xx 0x000116xx /* Reserved for GPIO pins */
+#define TPM_NV_INDEX_PDA 0x0002xxxx /* Reserved for PDA use */
+#define TPM_NV_INDEX_MOBILE 0x0003xxxx /* Reserved for mobile use */
+#define TPM_NV_INDEX_SERVER 0x0004xxxx /* Reserved for Server use */
+#define TPM_NV_INDEX_PERIPHERAL 0x0005xxxx /* Reserved for peripheral use */
+#define TPM_NV_INDEX_TSS 0x0006xxxx /* Reserved for TSS use */
+#define TPM_NV_INDEX_GROUP_RESV 0x00xxxxxx /* Reserved for TCG WG use */
+#endif
+
+#define TPM_NV_INDEX_GPIO_00 0x00011600 /* GPIO-Express-00 */
+
+#define TPM_NV_INDEX_GPIO_START 0x00011600 /* Reserved for GPIO pins */
+#define TPM_NV_INDEX_GPIO_END 0x000116ff /* Reserved for GPIO pins */
+
+/* 19.2 TPM_NV_ATTRIBUTES rev 99
+
+ The attributes TPM_NV_PER_AUTHREAD and TPM_NV_PER_OWNERREAD cannot both be set to TRUE.
+ Similarly, the attributes TPM_NV_PER_AUTHWRITE and TPM_NV_PER_OWNERWRITE cannot both be set to
+ TRUE.
+*/
+
+#define TPM_NV_PER_READ_STCLEAR 0x80000000 /* 31: The value can be read until locked by a
+ read with a data size of 0. It can only be
+ unlocked by TPM_Startup(ST_Clear) or a
+ successful write. Lock held for each area in
+ bReadSTClear. */
+/* #define 30:19 Reserved */
+#define TPM_NV_PER_AUTHREAD 0x00040000 /* 18: The value requires authorization to read
+ */
+#define TPM_NV_PER_OWNERREAD 0x00020000 /* 17: The value requires TPM Owner authorization
+ to read. */
+#define TPM_NV_PER_PPREAD 0x00010000 /* 16: The value requires physical presence to
+ read */
+#define TPM_NV_PER_GLOBALLOCK 0x00008000 /* 15: The value is writable until a write to
+ index 0 is successful. The lock of this
+ attribute is reset by
+ TPM_Startup(ST_CLEAR). Lock held by SF ->
+ bGlobalLock */
+#define TPM_NV_PER_WRITE_STCLEAR 0x00004000 /* 14: The value is writable until a write to
+ the specified index with a datasize of 0 is
+ successful. The lock of this attribute is
+ reset by TPM_Startup(ST_CLEAR). Lock held for
+ each area in bWriteSTClear. */
+#define TPM_NV_PER_WRITEDEFINE 0x00002000 /* 13: Lock set by writing to the index with a
+ datasize of 0. Lock held for each area in
+ bWriteDefine. This is a persistent lock. */
+#define TPM_NV_PER_WRITEALL 0x00001000 /* 12: The value must be written in a single
+ operation */
+/* #define 11:3 Reserved for write additions */
+#define TPM_NV_PER_AUTHWRITE 0x00000004 /* 2: The value requires authorization to write
+ */
+#define TPM_NV_PER_OWNERWRITE 0x00000002 /* 1: The value requires TPM Owner authorization
+ to write */
+#define TPM_NV_PER_PPWRITE 0x00000001 /* 0: The value requires physical presence to
+ write */
+
+/* 20.2.1 Owner Permission Settings rev 87 */
+
+/* Per1 bits */
+
+#define TPM_DELEGATE_PER1_MASK 0xffffffff /* mask of legal bits */
+#define TPM_DELEGATE_KeyControlOwner 31
+#define TPM_DELEGATE_SetOrdinalAuditStatus 30
+#define TPM_DELEGATE_DirWriteAuth 29
+#define TPM_DELEGATE_CMK_ApproveMA 28
+#define TPM_DELEGATE_NV_WriteValue 27
+#define TPM_DELEGATE_CMK_CreateTicket 26
+#define TPM_DELEGATE_NV_ReadValue 25
+#define TPM_DELEGATE_Delegate_LoadOwnerDelegation 24
+#define TPM_DELEGATE_DAA_Join 23
+#define TPM_DELEGATE_AuthorizeMigrationKey 22
+#define TPM_DELEGATE_CreateMaintenanceArchive 21
+#define TPM_DELEGATE_LoadMaintenanceArchive 20
+#define TPM_DELEGATE_KillMaintenanceFeature 19
+#define TPM_DELEGATE_OwnerReadInternalPub 18
+#define TPM_DELEGATE_ResetLockValue 17
+#define TPM_DELEGATE_OwnerClear 16
+#define TPM_DELEGATE_DisableOwnerClear 15
+#define TPM_DELEGATE_NV_DefineSpace 14
+#define TPM_DELEGATE_OwnerSetDisable 13
+#define TPM_DELEGATE_SetCapability 12
+#define TPM_DELEGATE_MakeIdentity 11
+#define TPM_DELEGATE_ActivateIdentity 10
+#define TPM_DELEGATE_OwnerReadPubek 9
+#define TPM_DELEGATE_DisablePubekRead 8
+#define TPM_DELEGATE_SetRedirection 7
+#define TPM_DELEGATE_FieldUpgrade 6
+#define TPM_DELEGATE_Delegate_UpdateVerification 5
+#define TPM_DELEGATE_CreateCounter 4
+#define TPM_DELEGATE_ReleaseCounterOwner 3
+#define TPM_DELEGATE_Delegate_Manage 2
+#define TPM_DELEGATE_Delegate_CreateOwnerDelegation 1
+#define TPM_DELEGATE_DAA_Sign 0
+
+/* Per2 bits */
+#define TPM_DELEGATE_PER2_MASK 0x00000000 /* mask of legal bits */
+/* All reserved */
+
+/* 20.2.3 Key Permission settings rev 85 */
+
+/* Per1 bits */
+
+#define TPM_KEY_DELEGATE_PER1_MASK 0x1fffffff /* mask of legal bits */
+#define TPM_KEY_DELEGATE_CMK_ConvertMigration 28
+#define TPM_KEY_DELEGATE_TickStampBlob 27
+#define TPM_KEY_DELEGATE_ChangeAuthAsymStart 26
+#define TPM_KEY_DELEGATE_ChangeAuthAsymFinish 25
+#define TPM_KEY_DELEGATE_CMK_CreateKey 24
+#define TPM_KEY_DELEGATE_MigrateKey 23
+#define TPM_KEY_DELEGATE_LoadKey2 22
+#define TPM_KEY_DELEGATE_EstablishTransport 21
+#define TPM_KEY_DELEGATE_ReleaseTransportSigned 20
+#define TPM_KEY_DELEGATE_Quote2 19
+#define TPM_KEY_DELEGATE_Sealx 18
+#define TPM_KEY_DELEGATE_MakeIdentity 17
+#define TPM_KEY_DELEGATE_ActivateIdentity 16
+#define TPM_KEY_DELEGATE_GetAuditDigestSigned 15
+#define TPM_KEY_DELEGATE_Sign 14
+#define TPM_KEY_DELEGATE_CertifyKey2 13
+#define TPM_KEY_DELEGATE_CertifyKey 12
+#define TPM_KEY_DELEGATE_CreateWrapKey 11
+#define TPM_KEY_DELEGATE_CMK_CreateBlob 10
+#define TPM_KEY_DELEGATE_CreateMigrationBlob 9
+#define TPM_KEY_DELEGATE_ConvertMigrationBlob 8
+#define TPM_KEY_DELEGATE_Delegate_CreateKeyDelegation 7
+#define TPM_KEY_DELEGATE_ChangeAuth 6
+#define TPM_KEY_DELEGATE_GetPubKey 5
+#define TPM_KEY_DELEGATE_UnBind 4
+#define TPM_KEY_DELEGATE_Quote 3
+#define TPM_KEY_DELEGATE_Unseal 2
+#define TPM_KEY_DELEGATE_Seal 1
+#define TPM_KEY_DELEGATE_LoadKey 0
+
+/* Per2 bits */
+#define TPM_KEY_DELEGATE_PER2_MASK 0x00000000 /* mask of legal bits */
+/* All reserved */
+
+/* 20.3 TPM_FAMILY_FLAGS rev 87
+
+ These flags indicate the operational state of the delegation and family table. These flags
+ are additions to TPM_PERMANENT_FLAGS and are not stand alone values.
+*/
+
+#define TPM_DELEGATE_ADMIN_LOCK 0x00000002 /* TRUE: Some TPM_Delegate_XXX commands are locked and
+ return TPM_DELEGATE_LOCK
+
+ FALSE: TPM_Delegate_XXX commands are available
+
+ Default is FALSE */
+#define TPM_FAMFLAG_ENABLED 0x00000001 /* When TRUE the table is enabled. The default value is
+ FALSE. */
+
+/* 20.14 TPM_FAMILY_OPERATION Values rev 87
+
+ These are the opFlag values used by TPM_Delegate_Manage.
+*/
+
+#define TPM_FAMILY_CREATE 0x00000001 /* Create a new family */
+#define TPM_FAMILY_ENABLE 0x00000002 /* Set or reset the enable flag for this family. */
+#define TPM_FAMILY_ADMIN 0x00000003 /* Prevent administration of this family. */
+#define TPM_FAMILY_INVALIDATE 0x00000004 /* Invalidate a specific family row. */
+
+/* 21.9 TPM_DA_STATE rev 100
+
+ TPM_DA_STATE enumerates the possible states of the dictionary attack mitigation logic.
+*/
+
+#define TPM_DA_STATE_INACTIVE 0x00 /* The dictionary attack mitigation logic is currently
+ inactive */
+#define TPM_DA_STATE_ACTIVE 0x01 /* The dictionary attack mitigation logic is
+ active. TPM_DA_ACTION_TYPE (21.10) is in progress. */
+
+/* 21.10 TPM_DA_ACTION_TYPE rev 100
+ */
+
+/* 31-4 Reserved No information and MUST be FALSE */
+
+#define TPM_DA_ACTION_FAILURE_MODE 0x00000008 /* bit 3: The TPM is in failure mode. */
+#define TPM_DA_ACTION_DEACTIVATE 0x00000004 /* bit 2: The TPM is in the deactivated state. */
+#define TPM_DA_ACTION_DISABLE 0x00000002 /* bit 1: The TPM is in the disabled state. */
+#define TPM_DA_ACTION_TIMEOUT 0x00000001 /* bit 0: The TPM will be in a locked state for
+ TPM_DA_INFO -> actionDependValue seconds. This
+ value is dynamic, depending on the time the
+ lock has been active. */
+
+/* 22. DAA Structures rev 91
+
+ All byte and bit areas are byte arrays treated as large integers
+*/
+
+#define DAA_SIZE_r0 43
+#define DAA_SIZE_r1 43
+#define DAA_SIZE_r2 128
+#define DAA_SIZE_r3 168
+#define DAA_SIZE_r4 219
+#define DAA_SIZE_NT 20
+#define DAA_SIZE_v0 128
+#define DAA_SIZE_v1 192
+#define DAA_SIZE_NE 256
+#define DAA_SIZE_w 256
+#define DAA_SIZE_issuerModulus 256
+
+/* check that DAA_SIZE_issuerModulus will fit in DAA_scratch */
+#if (DAA_SIZE_issuerModulus != 256)
+#error "DAA_SIZE_issuerModulus must be 256"
+#endif
+
+/* 22.2 Constant definitions rev 91 */
+
+#define DAA_power0 104
+#define DAA_power1 1024
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmstructures12.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmstructures12.h
new file mode 100644
index 000000000..2d8169ba6
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmstructures12.h
@@ -0,0 +1,2482 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Structures */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TPMSTRUCTURES12_H
+#define TPMSTRUCTURES12_H
+
+#include <limits.h>
+#include "tpmconstants12.h"
+#include "tpmtypes12.h"
+
+/* Sanity check on build macros are centralized here, since any TPM will use this header */
+
+#if !defined (TPM_POSIX) && !defined (TPM_WINDOWS) && !defined(TPM_SKIBOOT)
+#error "Must define either TPM_POSIX TPM_SKIBOOT or TPM_WINDOWS"
+#endif
+
+#define TPM_REVISION_MAX 9999
+#ifndef TPM_REVISION
+#define TPM_REVISION TPM_REVISION_MAX
+#endif
+
+/* 5.1 TPM_STRUCT_VER rev 100
+
+ This indicates the version of the structure or TPM.
+
+ Version 1.2 deprecates the use of this structure in all other structures. The structure is not
+ deprecated as many of the structures that contain this structure are not deprecated.
+*/
+
+typedef struct tdTPM_STRUCT_VER {
+ BYTE major; /* This SHALL indicate the major version of the structure. MUST be 0x01 */
+ BYTE minor; /* This SHALL indicate the minor version of the structure. MUST be 0x01 */
+ BYTE revMajor; /* This MUST be 0x00 on output, ignored on input */
+ BYTE revMinor; /* This MUST be 0x00 on output, ignored on input */
+} TPM_STRUCT_VER;
+
+/* 5.2 TPM_VERSION_BYTE rev 87
+
+ Allocating a byte for the version information is wasteful of space. The current allocation does
+ not provide sufficient resolution to indicate completely the version of the TPM. To allow for
+ backwards compatibility the size of the structure does not change from 1.1.
+
+ To enable minor version, or revision, numbers with 2-digit resolution, the byte representing a
+ version splits into two BDC encoded nibbles. The ordering of the low and high order provides
+ backwards compatibility with existing numbering.
+
+ An example of an implementation of this is; a version of 1.23 would have the value 2 in bit
+ positions 3-0 and the value 3 in bit positions 7-4.
+
+ TPM_VERSION_BYTE is a byte. The byte is broken up according to the following rule
+
+ 7-4 leastSigVer Least significant nibble of the minor version. MUST be values within the range of
+ 0000-1001
+ 3-0 mostSigVer Most significant nibble of the minor version. MUST be values within the range of
+ 0000-1001
+*/
+
+/* 5.3 TPM_VERSION rev 116
+
+ This structure provides information relative the version of the TPM. This structure should only
+ be in use by TPM_GetCapability to provide the information relative to the TPM.
+*/
+
+typedef struct tdTPM_VERSION {
+ TPM_VERSION_BYTE major; /* This SHALL indicate the major version of the TPM, mostSigVer MUST
+ be 0x1, leastSigVer MUST be 0x0 */
+ TPM_VERSION_BYTE minor; /* This SHALL indicate the minor version of the TPM, mostSigVer MUST
+ be 0x1 or 0x2, leastSigVer MUST be 0x0 */
+ BYTE revMajor; /* This SHALL be the value of the TPM_PERMANENT_DATA -> revMajor */
+ BYTE revMinor; /* This SHALL be the value of the TPM_PERMANENT_DATA -> revMinor */
+} TPM_VERSION;
+
+/* 5.4 TPM_DIGEST rev 111
+
+ The digest value reports the result of a hash operation.
+
+ In version 1 the hash algorithm is SHA-1 with a resulting hash result being 20 bytes or 160 bits.
+
+ It is understood that algorithm agility is lost due to fixing the hash at 20 bytes and on
+ SHA-1. The reason for fixing is due to the internal use of the digest. It is the authorization
+ values, it provides the secrets for the HMAC and the size of 20 bytes determines the values that
+ can be stored and encrypted. For this reason, the size is fixed and any changes to this value
+ require a new version of the specification.
+
+ The digestSize parameter MUST indicate the block size of the algorithm and MUST be 20 or greater.
+
+ For all TPM v1 hash operations, the hash algorithm MUST be SHA-1 and the digestSize parameter is
+ therefore equal to 20.
+*/
+
+#define TPM_DIGEST_SIZE 20
+typedef BYTE TPM_DIGEST[TPM_DIGEST_SIZE];
+
+/* Redefinitions */
+
+typedef TPM_DIGEST TPM_CHOSENID_HASH; /* This SHALL be the digest of the chosen identityLabel and
+ privacyCA for a new TPM identity.*/
+
+typedef TPM_DIGEST TPM_COMPOSITE_HASH; /* This SHALL be the hash of a list of PCR indexes and PCR
+ values that a key or data is bound to. */
+
+typedef TPM_DIGEST TPM_DIRVALUE; /* This SHALL be the value of a DIR register */
+
+typedef TPM_DIGEST TPM_HMAC; /* This shall be the output of the HMAC algorithm */
+
+typedef TPM_DIGEST TPM_PCRVALUE; /* The value inside of the PCR */
+
+typedef TPM_DIGEST TPM_AUDITDIGEST; /* This SHALL be the value of the current internal audit
+ state */
+
+/* 5.5 TPM_NONCE rev 99
+
+ A nonce is a random value that provides protection from replay and other attacks. Many of the
+ commands and protocols in the specification require a nonce. This structure provides a consistent
+ view of what a nonce is.
+*/
+
+#define TPM_NONCE_SIZE 20
+typedef BYTE TPM_NONCE[TPM_NONCE_SIZE];
+
+typedef TPM_NONCE TPM_DAA_TPM_SEED; /* This SHALL be a random value generated by a TPM
+ immediately after the EK is installed in that TPM,
+ whenever an EK is installed in that TPM */
+typedef TPM_NONCE TPM_DAA_CONTEXT_SEED; /* This SHALL be a random value */
+
+/* 5.6 TPM_AUTHDATA rev 87
+
+ The authorization data is the information that is saved or passed to provide proof of ownership
+ of an entity. For version 1 this area is always 20 bytes.
+*/
+
+#define TPM_AUTHDATA_SIZE 20
+typedef BYTE TPM_AUTHDATA[TPM_AUTHDATA_SIZE];
+
+#define TPM_SECRET_SIZE 20
+typedef BYTE TPM_SECRET[TPM_SECRET_SIZE];
+
+typedef TPM_AUTHDATA TPM_ENCAUTH; /* A cipher text (encrypted) version of authorization data. The
+ encryption mechanism depends on the context. */
+
+#if 0 /* FIXME */
+/* 5.11 TPM_CHANGEAUTH_VALIDATE rev 87
+
+ This structure provides an area that will stores the new authorization data and the challenger's
+ nonce.
+*/
+
+typedef struct tdTPM_CHANGEAUTH_VALIDATE {
+ TPM_SECRET newAuthSecret; /* This SHALL be the new authorization data for the target entity */
+ TPM_NONCE n1; /* This SHOULD be a nonce, to enable the caller to verify that the
+ target TPM is on-line. */
+} TPM_CHANGEAUTH_VALIDATE;
+
+#endif
+
+
+/* PCR */
+
+/* NOTE: The TPM requires and the code assumes a multiple of CHAR_BIT (8). 48 registers (6 bytes)
+ may be a bad number, as it makes TPM_PCR_INFO and TPM_PCR_INFO_LONG indistinguishable in the
+ first two bytes. */
+
+#define TPM_NUM_PCR 24 /* Use PC Client specification values */
+
+#if (CHAR_BIT != 8)
+#error "CHAR_BIT must be 8"
+#endif
+
+#if ((TPM_NUM_PCR % 8) != 0)
+#error "TPM_NUM_PCR must be a multiple of 8"
+#endif
+
+#define TPM_DEBUG_PCR 16
+
+/* 8.1 TPM_PCR_SELECTION rev 110
+
+ This structure provides a standard method of specifying a list of PCR registers.
+*/
+
+typedef struct tdTPM_PCR_SELECTION {
+ uint16_t sizeOfSelect; /* The size in bytes of the pcrSelect structure */
+ BYTE pcrSelect[TPM_NUM_PCR/CHAR_BIT]; /* This SHALL be a bit map that indicates if a PCR
+ is active or not */
+} TPM_PCR_SELECTION;
+
+#if 0
+/* 8.2 TPM_PCR_COMPOSITE rev 97
+
+ The composite structure provides the index and value of the PCR register to be used when creating
+ the value that SEALS an entity to the composite.
+*/
+
+typedef struct tdTPM_PCR_COMPOSITE {
+ TPM_PCR_SELECTION select; /* This SHALL be the indication of which PCR values are active */
+#if 0
+ uint32_t valueSize; /* This SHALL be the size of the pcrValue field (not the number of
+ PCR's) */
+ TPM_PCRVALUE *pcrValue; /* This SHALL be an array of TPM_PCRVALUE structures. The values
+ come in the order specified by the select parameter and are
+ concatenated into a single blob */
+#endif
+ TPM_SIZED_BUFFER pcrValue;
+} TPM_PCR_COMPOSITE;
+
+/* 8.3 TPM_PCR_INFO rev 87
+
+ The TPM_PCR_INFO structure contains the information related to the wrapping of a key or the
+ sealing of data, to a set of PCRs.
+*/
+
+typedef struct tdTPM_PCR_INFO {
+ TPM_PCR_SELECTION pcrSelection; /* This SHALL be the selection of PCRs to which the
+ data or key is bound. */
+ TPM_COMPOSITE_HASH digestAtRelease; /* This SHALL be the digest of the PCR indices and
+ PCR values to verify when revealing Sealed Data
+ or using a key that was wrapped to PCRs. NOTE:
+ This is passed in by the host, and used as
+ authorization to use the key */
+ TPM_COMPOSITE_HASH digestAtCreation; /* This SHALL be the composite digest value of the
+ PCR values, at the time when the sealing is
+ performed. NOTE: This is generated at key
+ creation, but is just informative to the host,
+ not used for authorization */
+} TPM_PCR_INFO;
+
+#endif
+
+/* 8.6 TPM_LOCALITY_SELECTION rev 87
+
+ When used with localityAtCreation only one bit is set and it corresponds to the locality of the
+ command creating the structure.
+
+ When used with localityAtRelease the bits indicate which localities CAN perform the release.
+*/
+
+typedef BYTE TPM_LOCALITY_SELECTION;
+
+#define TPM_LOC_FOUR 0x10 /* Locality 4 */
+#define TPM_LOC_THREE 0x08 /* Locality 3 */
+#define TPM_LOC_TWO 0x04 /* Locality 2 */
+#define TPM_LOC_ONE 0x02 /* Locality 1 */
+#define TPM_LOC_ZERO 0x01 /* Locality 0. This is the same as the legacy interface. */
+
+#define TPM_LOC_ALL 0x1f /* kgold - added all localities */
+#define TPM_LOC_MAX 4 /* kgold - maximum value for TPM_MODIFIER_INDICATOR */
+
+/* 8.4 TPM_PCR_INFO_LONG rev 109
+
+ The TPM_PCR_INFO structure contains the information related to the wrapping of a key or the
+ sealing of data, to a set of PCRs.
+
+ The LONG version includes information necessary to properly define the configuration that creates
+ the blob using the PCR selection.
+*/
+
+/* Marshaled TPM_PCR_INFO_LONG */
+
+typedef struct tdTPM_PCR_INFO_LONG {
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_PCR_INFO_LONG */
+ TPM_LOCALITY_SELECTION localityAtCreation; /* This SHALL be the locality modifier of the
+ function that creates the PCR info structure */
+ TPM_LOCALITY_SELECTION localityAtRelease; /* This SHALL be the locality modifier required to
+ reveal Sealed Data or use a key that was wrapped
+ to PCRs */
+ TPM_PCR_SELECTION creationPCRSelection; /* This SHALL be the selection of PCRs active when
+ the blob is created */
+ TPM_PCR_SELECTION releasePCRSelection; /* This SHALL be the selection of PCRs to which the
+ data or key is bound. */
+ TPM_COMPOSITE_HASH digestAtCreation; /* This SHALL be the composite digest value of the
+ PCR values, at the time when the sealing is
+ performed. */
+ TPM_COMPOSITE_HASH digestAtRelease; /* This SHALL be the digest of the PCR indices and
+ PCR values to verify when revealing Sealed Data
+ or using a key that was wrapped to PCRs. */
+} TPM_PCR_INFO_LONG;
+
+#if 0
+typedef struct {
+ UINT32 PCRInfoSize;
+ TPM_PCR_INFO_LONG PCRInfo;
+} TPM4B_TPM_PCR_INFO_LONG;
+
+#endif
+
+/* 8.5 TPM_PCR_INFO_SHORT rev 87
+
+ This structure is for defining a digest at release when the only information that is necessary is
+ the release configuration.
+*/
+
+typedef struct tdTPM_PCR_INFO_SHORT {
+ TPM_PCR_SELECTION pcrSelection; /* This SHALL be the selection of PCRs that specifies the
+ digestAtRelease */
+ TPM_LOCALITY_SELECTION localityAtRelease; /* This SHALL be the locality modifier required to
+ release the information. This value must not be
+ zero (0). */
+ TPM_COMPOSITE_HASH digestAtRelease; /* This SHALL be the digest of the PCR indices and
+ PCR values to verify when revealing auth data */
+} TPM_PCR_INFO_SHORT;
+
+#if 0
+/* 8.8 TPM_PCR_ATTRIBUTES rev 107
+
+ These attributes are available on a per PCR basis.
+
+ The TPM is not required to maintain this structure internally to the TPM.
+
+ When a challenger evaluates a PCR an understanding of this structure is vital to the proper
+ understanding of the platform configuration. As this structure is static for all platforms of the
+ same type the structure does not need to be reported with each quote.
+*/
+
+typedef struct tdTPM_PCR_ATTRIBUTES {
+ TPM_BOOL pcrReset; /* A value of TRUE SHALL indicate that the PCR register can be reset
+ using the TPM_PCR_RESET command. */
+ TPM_LOCALITY_SELECTION pcrExtendLocal; /* An indication of which localities can perform
+ extends on the PCR. */
+ TPM_LOCALITY_SELECTION pcrResetLocal; /* An indication of which localities can reset the
+ PCR */
+} TPM_PCR_ATTRIBUTES;
+
+/*
+ 9. Storage Structures
+*/
+
+/* 9.1 TPM_STORED_DATA rev 87
+
+ The definition of this structure is necessary to ensure the enforcement of security properties.
+
+ This structure is in use by the TPM_Seal and TPM_Unseal commands to identify the PCR index and
+ values that must be present to properly unseal the data.
+
+ This structure only provides 1.1 data store and uses PCR_INFO
+
+ 1. This structure is created during the TPM_Seal process. The confidential data is encrypted
+ using a nonmigratable key. When the TPM_Unseal decrypts this structure the TPM_Unseal uses the
+ public information in the structure to validate the current configuration and release the
+ decrypted data
+
+ 2. When sealInfoSize is not 0 sealInfo MUST be TPM_PCR_INFO
+*/
+
+typedef struct tdTPM_STORED_DATA {
+ TPM_STRUCT_VER ver; /* This MUST be 1.1.0.0 */
+ TPM_SIZED_BUFFER sealInfo;
+#if 0
+ uint32_t sealInfoSize; /* Size of the sealInfo parameter */
+ BYTE* sealInfo; /* This SHALL be a structure of type TPM_PCR_INFO or a 0 length
+ array if the data is not bound to PCRs. */
+#endif
+ TPM_SIZED_BUFFER encData;
+#if 0
+ uint32_t encDataSize; /* This SHALL be the size of the encData parameter */
+ BYTE* encData; /* This shall be an encrypted TPM_SEALED_DATA structure containing
+ the confidential part of the data. */
+#endif
+ /* NOTE: kgold - Added this structure, a cache of PCRInfo when not NULL */
+ TPM_PCR_INFO *tpm_seal_info;
+} TPM_STORED_DATA;
+
+
+/* 9.2 TPM_STORED_DATA12 rev 101
+
+ The definition of this structure is necessary to ensure the enforcement of security properties.
+ This structure is in use by the TPM_Seal and TPM_Unseal commands to identify the PCR index and
+ values that must be present to properly unseal the data.
+
+ 1. This structure is created during the TPM_Seal process. The confidential data is encrypted
+ using a nonmigratable key. When the TPM_Unseal decrypts this structure the TPM_Unseal uses the
+ public information in the structure to validate the current configuration and release the
+ decrypted data.
+
+ 2. If sealInfoSize is not 0 then sealInfo MUST be TPM_PCR_INFO_LONG
+*/
+
+typedef struct tdTPM_STORED_DATA12 {
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_STORED_DATA12 */
+ TPM_ENTITY_TYPE et; /* The type of blob */
+ TPM_SIZED_BUFFER sealInfo;
+#if 0
+ uint32_t sealInfoSize; /* Size of the sealInfo parameter */
+ BYTE* sealInfo; /* This SHALL be a structure of type TPM_PCR_INFO_LONG or a 0 length
+ array if the data is not bound to PCRs. */
+#endif
+ TPM_SIZED_BUFFER encData;
+#if 0
+ uint32_t encDataSize; /* This SHALL be the size of the encData parameter */
+ BYTE* encData; /* This shall be an encrypted TPM_SEALED_DATA structure containing
+ the confidential part of the data. */
+#endif
+ /* NOTE: kgold - Added this structure, a cache of PCRInfo when not NULL */
+ TPM_PCR_INFO_LONG *tpm_seal_info_long;
+} TPM_STORED_DATA12;
+
+/* 9.3 TPM_SEALED_DATA rev 87
+
+ This structure contains confidential information related to sealed data, including the data
+ itself.
+
+ 1. To tie the TPM_STORED_DATA structure to the TPM_SEALED_DATA structure this structure contains
+ a digest of the containing TPM_STORED_DATA structure.
+
+ 2. The digest calculation does not include the encDataSize and encData parameters.
+*/
+
+typedef struct tdTPM_SEALED_DATA {
+ TPM_PAYLOAD_TYPE payload; /* This SHALL indicate the payload type of TPM_PT_SEAL */
+ TPM_SECRET authData; /* This SHALL be the authorization data for this value */
+ TPM_SECRET tpmProof; /* This SHALL be a copy of TPM_PERMANENT_FLAGS -> tpmProof */
+ TPM_DIGEST storedDigest; /* This SHALL be a digest of the TPM_STORED_DATA structure,
+ excluding the fields TPM_STORED_DATA -> encDataSize and
+ TPM_STORED_DATA -> encData. */
+ TPM_SIZED_BUFFER data; /* This SHALL be the data to be sealed */
+#if 0
+ uint32_t dataSize; /* This SHALL be the size of the data parameter */
+ BYTE* data; /* This SHALL be the data to be sealed */
+#endif
+} TPM_SEALED_DATA;
+
+#endif
+
+
+/* 9.4 TPM_SYMMETRIC_KEY rev 87
+
+ This structure describes a symmetric key, used during the process "Collating a Request for a
+ Trusted Platform Module Identity".
+*/
+
+typedef struct tdTPM_SYMMETRIC_KEY {
+ TPM_ALGORITHM_ID algId; /* This SHALL be the algorithm identifier of the symmetric key. */
+ TPM_ENC_SCHEME encScheme; /* This SHALL fully identify the manner in which the key will be
+ used for encryption operations. */
+ uint16_t size; /* This SHALL be the size of the data parameter in bytes */
+ BYTE data[MAX_SYM_KEY_BYTES]; /* This SHALL be the symmetric key data */
+} TPM_SYMMETRIC_KEY;
+
+#if 0
+
+/* 9.5 TPM_BOUND_DATA rev 87
+
+ This structure is defined because it is used by a TPM_UnBind command in a consistency check.
+
+ The intent of TCG is to promote "best practice" heuristics for the use of keys: a signing key
+ shouldn't be used for storage, and so on. These heuristics are used because of the potential
+ threats that arise when the same key is used in different ways. The heuristics minimize the
+ number of ways in which a given key can be used.
+
+ One such heuristic is that a key of type TPM_KEY_BIND, and no other type of key, should always be
+ used to create the blob that is unwrapped by TPM_UnBind. Binding is not a TPM function, so the
+ only choice is to perform a check for the correct payload type when a blob is unwrapped by a key
+ of type TPM_KEY_BIND. This requires the blob to have internal structure.
+
+ Even though payloadData has variable size, TPM_BOUND_DATA deliberately does not include the size
+ of payloadData. This is to maximise the size of payloadData that can be encrypted when
+ TPM_BOUND_DATA is encrypted in a single block. When using TPM-UnBind to obtain payloadData, the
+ size of payloadData is deduced as a natural result of the (RSA) decryption process.
+
+ 1. This structure MUST be used for creating data when (wrapping with a key of type TPM_KEY_BIND)
+ or (wrapping using the encryption algorithm TPM_ES_RSAESOAEP_SHA1_MGF1). If it is not, the
+ TPM_UnBind command will fail.
+*/
+
+typedef struct tdTPM_BOUND_DATA {
+ TPM_STRUCT_VER ver; /* This MUST be 1.1.0.0 */
+ TPM_PAYLOAD_TYPE payload; /* This SHALL be the value TPM_PT_BIND */
+ uint32_t payloadDataSize; /* NOTE: added, not part of serialization */
+ BYTE *payloadData; /* The bound data */
+} TPM_BOUND_DATA;
+
+#endif
+
+/*
+ 10. TPM_KEY Complex
+*/
+
+/* 10.1.1 TPM_RSA_KEY_PARMS rev 87
+
+ This structure describes the parameters of an RSA key.
+*/
+
+typedef struct tdTPM_RSA_KEY_PARMS {
+ uint32_t keyLength; /* This specifies the size of the RSA key in bits */
+ uint32_t numPrimes; /* This specifies the number of prime factors used by this RSA key. */
+ uint32_t exponentSize; /* This SHALL be the size of the exponent. If the key is using the
+ the default public exponent then the exponentSize MUST be 0. */
+ uint8_t exponent[4]; /* The public exponent of this key */
+} TPM_RSA_KEY_PARMS;
+
+/* 10.1.2 TPM_SYMMETRIC_KEY_PARMS rev 87
+
+ This structure describes the parameters for symmetric algorithms
+*/
+
+typedef struct tdTPM_SYMMETRIC_KEY_PARMS {
+ uint32_t keyLength; /* This SHALL indicate the length of the key in bits */
+ uint32_t blockSize; /* This SHALL indicate the block size of the algorithm*/
+ TPM2B_IV iv; /* The initialization vector */
+} TPM_SYMMETRIC_KEY_PARMS;
+
+/* 10.1 TPM_KEY_PARMS rev 87
+
+ This provides a standard mechanism to define the parameters used to generate a key pair, and to
+ store the parts of a key shared between the public and private key parts.
+*/
+
+typedef union {
+ TPM_RSA_KEY_PARMS rsaParms;
+ TPM_SYMMETRIC_KEY_PARMS symParms;
+} TPMU_PARMS;
+
+/* Marshaled TPMU_PARMS */
+
+#if 0
+typedef struct {
+ UINT32 parmSize;
+ TPMU_PARMS parms;
+} TPM4B_PARMS;
+#endif
+
+typedef struct {
+ TPM_ALGORITHM_ID algorithmID; /* This SHALL be the key algorithm in use */
+ TPM_ENC_SCHEME encScheme; /* This SHALL be the encryption scheme that the key uses to encrypt
+ information */
+ TPM_SIG_SCHEME sigScheme; /* This SHALL be the signature scheme that the key uses to perform
+ digital signatures */
+ TPMU_PARMS parms;
+} TPM_KEY_PARMS;
+
+#if 0
+
+/* 10.7 TPM_STORE_PRIVKEY rev 87
+
+ This structure can be used in conjunction with a corresponding TPM_PUBKEY to construct a private
+ key which can be unambiguously used.
+*/
+
+#if 0
+typedef struct tdTPM_STORE_PRIVKEY {
+ uint32_t keyLength; /* This SHALL be the length of the key field. */
+ BYTE* key; /* This SHALL be a structure interpreted according to the algorithm Id in
+ the corresponding TPM_KEY structure. */
+} TPM_STORE_PRIVKEY;
+#endif
+
+/* NOTE: Hard coded for RSA keys. This will change if other algorithms are supported */
+
+typedef struct tdTPM_STORE_PRIVKEY {
+ TPM_SIZED_BUFFER d_key; /* private key */
+ TPM_SIZED_BUFFER p_key; /* private prime factor */
+ TPM_SIZED_BUFFER q_key; /* private prime factor */
+} TPM_STORE_PRIVKEY;
+
+/* 10.6 TPM_STORE_ASYMKEY rev 87
+
+ The TPM_STORE_ASYMKEY structure provides the area to identify the confidential information
+ related to a key. This will include the private key factors for an asymmetric key.
+
+ The structure is designed so that encryption of a TPM_STORE_ASYMKEY structure containing a 2048
+ bit RSA key can be done in one operation if the encrypting key is 2048 bits.
+
+ Using typical RSA notation the structure would include P, and when loading the key include the
+ unencrypted P*Q which would be used to recover the Q value.
+
+ To accommodate the future use of multiple prime RSA keys the specification of additional prime
+ factors is an optional capability.
+
+ This structure provides the basis of defining the protection of the private key. Changes in this
+ structure MUST be reflected in the TPM_MIGRATE_ASYMKEY structure (section 10.8).
+*/
+
+typedef struct tdTPM_STORE_ASYMKEY {
+ TPM_PAYLOAD_TYPE payload; /* This SHALL set to TPM_PT_ASYM to indicate an asymmetric
+ key. If used in TPM_CMK_ConvertMigration the value SHALL
+ be TPM_PT_MIGRATE_EXTERNAL. If used in TPM_CMK_CreateKey
+ the value SHALL be TPM_PT_MIGRATE_RESTRICTED */
+ TPM_SECRET usageAuth; /* This SHALL be the authorization data necessary to
+ authorize the use of this value */
+ TPM_SECRET migrationAuth; /* This SHALL be the migration authorization data for a
+ migratable key, or the TPM secret value tpmProof for a
+ non-migratable key created by the TPM.
+
+ If the TPM sets this parameter to the value tpmProof,
+ then the TPM_KEY.keyFlags.migratable of the corresponding
+ TPM_KEY structure MUST be set to 0.
+
+ If this parameter is set to the migration authorization
+ data for the key in parameter PrivKey, then the
+ TPM_KEY.keyFlags.migratable of the corresponding TPM_KEY
+ structure SHOULD be set to 1. */
+ TPM_DIGEST pubDataDigest; /* This SHALL be the digest of the corresponding TPM_KEY
+ structure, excluding the fields TPM_KEY.encSize and
+ TPM_KEY.encData.
+
+ When TPM_KEY -> pcrInfoSize is 0 then the digest
+ calculation has no input from the pcrInfo field. The
+ pcrInfoSize field MUST always be part of the digest
+ calculation.
+ */
+ TPM_STORE_PRIVKEY privKey; /* This SHALL be the private key data. The privKey can be a
+ variable length which allows for differences in the key
+ format. The maximum size of the area would be 151
+ bytes. */
+} TPM_STORE_ASYMKEY;
+
+/* 10.8 TPM_MIGRATE_ASYMKEY rev 87
+
+ The TPM_MIGRATE_ASYMKEY structure provides the area to identify the private key factors of a
+ asymmetric key while the key is migrating between TPM's.
+
+ This structure provides the basis of defining the protection of the private key.
+
+ k1k2 - 132 privkey.key (128 + 4)
+ k1 - 20, OAEP seed
+ k2 - 112, partPrivKey
+ TPM_STORE_PRIVKEY 4 partPrivKey.keyLength
+ 108 partPrivKey.key (128 - 20)
+*/
+
+typedef struct tdTPM_MIGRATE_ASYMKEY {
+ TPM_PAYLOAD_TYPE payload; /* This SHALL set to TPM_PT_MIGRATE or TPM_PT_CMK_MIGRATE to
+ indicate an migrating asymmetric key or TPM_PT_MAINT to indicate
+ a maintenance key. */
+ TPM_SECRET usageAuth; /* This SHALL be a copy of the usageAuth from the TPM_STORE_ASYMKEY
+ structure. */
+ TPM_DIGEST pubDataDigest; /* This SHALL be a copy of the pubDataDigest from the
+ TPM_STORE_ASYMKEY structure. */
+#if 0
+ uint32_t partPrivKeyLen; /* This SHALL be the size of the partPrivKey field */
+ BYTE *partPrivKey; /* This SHALL be the k2 area as described in TPM_CreateMigrationBlob
+ */
+#endif
+ TPM_SIZED_BUFFER partPrivKey;
+} TPM_MIGRATE_ASYMKEY;
+
+#endif
+
+/* 10.4 TPM_STORE_PUBKEY
+
+ This structure can be used in conjunction with a corresponding TPM_KEY_PARMS to 1382 construct a
+ public key which can be unambiguously used.
+*/
+
+typedef struct tdTPM_STORE_PUBKEY {
+ UINT32 keyLength; /* This SHALL be the length of the key field. */
+ BYTE key[MAX_RSA_KEY_BYTES]; /* This SHALL be a structure interpreted according to the
+ algorithm Id in the corresponding TPM_KEY_PARMS
+ structure. */
+} TPM_STORE_PUBKEY;
+
+/* 10.3 TPM_KEY12 rev 87
+
+ This provides the same functionality as TPM_KEY but uses the new PCR_INFO_LONG structures and the
+ new structure tagging. In all other aspects this is the same structure.
+*/
+
+typedef struct tdTPM_KEY12 {
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_KEY12 */
+ uint16_t fill; /* MUST be 0x0000 */
+ TPM_KEY_USAGE keyUsage; /* This SHALL be the TPM key usage that determines the operations
+ permitted with this key */
+ TPM_KEY_FLAGS keyFlags; /* This SHALL be the indication of migration, redirection etc. */
+ TPM_AUTH_DATA_USAGE authDataUsage; /* This SHALL Indicate the conditions where it is required
+ that authorization be presented. */
+ TPM_KEY_PARMS algorithmParms; /* This SHALL be the information regarding the algorithm for
+ this key */
+ TPM_PCR_INFO_LONG PCRInfo;
+ TPM_STORE_PUBKEY pubKey; /* This SHALL be the public portion of the key */
+ TPM_STORE_PUBKEY encData; /* This SHALL be an encrypted TPM_STORE_ASYMKEY structure
+ TPM_MIGRATE_ASYMKEY structure */
+} TPM_KEY12;
+
+/* 10.5 TPM_PUBKEY rev 99
+
+ The TPM_PUBKEY structure contains the public portion of an asymmetric key pair. It contains all
+ the information necessary for its unambiguous usage. It is possible to construct this structure
+ from a TPM_KEY, using the algorithmParms and pubKey fields.
+
+ The pubKey member of this structure shall contain the public key for a specific algorithm.
+*/
+
+typedef struct tdTPM_PUBKEY {
+ TPM_KEY_PARMS algorithmParms; /* This SHALL be the information regarding this key */
+ TPM_STORE_PUBKEY pubKey; /* This SHALL be the public key information */
+} TPM_PUBKEY;
+
+#if 0
+
+/* 5.b. The TPM must support a minimum of 2 key slots. */
+
+#define TPM_KEY_HANDLES 16 /* entries in global TPM_KEY_HANDLE_ENTRY array */
+
+/* TPM_GetCapability uses a uint_16 for the number of key slots */
+
+#if (TPM_KEY_HANDLES > 0xffff)
+#error "TPM_KEY_HANDLES must be less than 0x10000"
+#endif
+
+/* The TPM does not have to support any minumum number of owner evict keys. Adjust this value to
+ match the amount of NV space available. An owner evict key consumes about 512 bytes.
+
+ A value greater than (TPM_KEY_HANDLES - 2) is useless, as the TPM reserves 2 key slots for
+ non-owner evict keys to avoid blocking.
+*/
+
+#define TPM_OWNER_EVICT_KEY_HANDLES 2
+#if (TPM_OWNER_EVICT_KEY_HANDLES > (TPM_KEY_HANDLES - 2))
+#error "TPM_OWNER_EVICT_KEY_HANDLES too large for TPM_KEY_HANDLES"
+#endif
+
+/* This is the version used by the TPM implementation. It is part of the global TPM state */
+
+/* kgold: Added TPM_KEY member. There needs to be a mapping between a key handle
+ and the pointer to TPM_KEY objects, and this seems to be the right place for it. */
+
+typedef struct tdTPM_KEY_HANDLE_ENTRY {
+ TPM_KEY_HANDLE handle; /* Handles for a key currently loaded in the TPM */
+ TPM_KEY *key; /* Pointer to the key object */
+ TPM_BOOL parentPCRStatus; /* TRUE if parent of this key uses PCR's */
+ TPM_KEY_CONTROL keyControl; /* Attributes that can control various aspects of key usage and
+ manipulation. */
+} TPM_KEY_HANDLE_ENTRY;
+
+/* 5.12 TPM_MIGRATIONKEYAUTH rev 87
+
+ This structure provides the proof that the associated public key has TPM Owner authorization to
+ be a migration key.
+*/
+
+typedef struct tdTPM_MIGRATIONKEYAUTH {
+ TPM_PUBKEY migrationKey; /* This SHALL be the public key of the migration facility */
+ TPM_MIGRATE_SCHEME migrationScheme; /* This shall be the type of migration operation.*/
+ TPM_DIGEST digest; /* This SHALL be the digest value of the concatenation of
+ migration key, migration scheme and tpmProof */
+} TPM_MIGRATIONKEYAUTH;
+
+/* 5.13 TPM_COUNTER_VALUE rev 87
+
+ This structure returns the counter value. For interoperability, the value size should be 4 bytes.
+*/
+
+#define TPM_COUNTER_LABEL_SIZE 4
+#define TPM_COUNT_ID_NULL 0xffffffff /* unused value TPM_CAP_PROP_ACTIVE_COUNTER expects this
+ value if no counter is active */
+#define TPM_COUNT_ID_ILLEGAL 0xfffffffe /* after releasing an active counter */
+
+typedef struct tdTPM_COUNTER_VALUE {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_COUNTER_VALUE */
+#endif
+ BYTE label[TPM_COUNTER_LABEL_SIZE]; /* The label for the counter */
+ TPM_ACTUAL_COUNT counter; /* The 32-bit counter value. */
+ /* NOTE: Added. TPMWG email says the specification structure is the public part, but these are
+ vendor specific private members. */
+ TPM_SECRET authData; /* Authorization secret for counter */
+ TPM_BOOL valid;
+ TPM_DIGEST digest; /* for OSAP comparison */
+} TPM_COUNTER_VALUE;
+
+/* 5.14 TPM_SIGN_INFO Structure rev 102
+
+ This is an addition in 1.2 and is the structure signed for certain commands (e.g.,
+ TPM_ReleaseTransportSigned). Some commands have a structure specific to that command (e.g.,
+ TPM_Quote uses TPM_QUOTE_INFO) and do not use TPM_SIGN_INFO.
+
+ TPM_Sign uses this structure when the signature scheme is TPM_SS_RSASSAPKCS1v15_INFO.
+*/
+
+#define TPM_SIGN_INFO_FIXED_SIZE 4
+
+typedef struct tdTPM_SIGN_INFO {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_SIGNINFO */
+#endif
+ BYTE fixed[TPM_SIGN_INFO_FIXED_SIZE]; /* The ASCII text that identifies what function was
+ performing the signing operation*/
+ TPM_NONCE replay; /* Nonce provided by caller to prevent replay attacks */
+#if 0
+ uint32_t dataLen; /* The length of the data area */
+ BYTE* data; /* The data that is being signed */
+#endif
+ TPM_SIZED_BUFFER data; /* The data that is being signed */
+} TPM_SIGN_INFO;
+
+/* 5.15 TPM_MSA_COMPOSITE Structure rev 87
+
+ TPM_MSA_COMPOSITE contains an arbitrary number of digests of public keys belonging to Migration
+ Authorities. An instance of TPM_MSA_COMPOSITE is incorporated into the migrationAuth value of a
+ certified-migration-key (CMK), and any of the Migration Authorities specified in that instance is
+ able to approve the migration of that certified-migration-key.
+
+ TPMs MUST support TPM_MSA_COMPOSITE structures with MSAlist of four (4) or less, and MAY support
+ larger values of MSAlist.
+*/
+
+typedef struct tdTPM_MSA_COMPOSITE {
+ uint32_t MSAlist; /* The number of migAuthDigests. MSAlist MUST be one (1) or
+ greater. */
+ TPM_DIGEST *migAuthDigest; /* An arbitrary number of digests of public keys belonging
+ to Migration Authorities. */
+} TPM_MSA_COMPOSITE;
+
+/* 5.16 TPM_CMK_AUTH
+
+ The signed digest of TPM_CMK_AUTH is a ticket to prove that the entity with public key
+ "migrationAuthority" has approved the public key "destination Key" as a migration destination for
+ the key with public key "sourceKey".
+
+ Normally the digest of TPM_CMK_AUTH is signed by the private key corresponding to
+ "migrationAuthority".
+
+ To reduce data size, TPM_CMK_AUTH contains just the digests of "migrationAuthority",
+ "destinationKey" and "sourceKey".
+*/
+
+typedef struct tdTPM_CMK_AUTH {
+ TPM_DIGEST migrationAuthorityDigest; /* The digest of the public key of a Migration
+ Authority */
+ TPM_DIGEST destinationKeyDigest; /* The digest of a TPM_PUBKEY structure that is an
+ approved destination key for the private key
+ associated with "sourceKey"*/
+ TPM_DIGEST sourceKeyDigest; /* The digest of a TPM_PUBKEY structure whose
+ corresponding private key is approved by the
+ Migration Authority to be migrated as a child to
+ the destinationKey. */
+} TPM_CMK_AUTH;
+
+#endif
+
+/* 5.18 TPM_SELECT_SIZE rev 87
+
+ This structure provides the indication for the version and sizeOfSelect structure in GetCapability
+*/
+
+typedef struct tdTPM_SELECT_SIZE {
+ BYTE major; /* This SHALL indicate the major version of the TPM. This MUST be 0x01 */
+ BYTE minor; /* This SHALL indicate the minor version of the TPM. This MAY be 0x01 or
+ 0x02 */
+ uint16_t reqSize; /* This SHALL indicate the value for a sizeOfSelect field in the
+ TPM_SELECTION structure */
+} TPM_SELECT_SIZE;
+
+#if 0
+
+/* 5.19 TPM_CMK_MIGAUTH rev 89
+
+ Structure to keep track of the CMK migration authorization
+*/
+
+typedef struct tdTPM_CMK_MIGAUTH {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* Set to TPM_TAG_CMK_MIGAUTH */
+#endif
+ TPM_DIGEST msaDigest; /* The digest of a TPM_MSA_COMPOSITE structure containing the
+ migration authority public key and parameters. */
+ TPM_DIGEST pubKeyDigest; /* The hash of the associated public key */
+} TPM_CMK_MIGAUTH;
+
+/* 5.20 TPM_CMK_SIGTICKET rev 87
+
+ Structure to keep track of the CMK migration authorization
+*/
+
+typedef struct tdTPM_CMK_SIGTICKET {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* Set to TPM_TAG_CMK_SIGTICKET */
+#endif
+ TPM_DIGEST verKeyDigest; /* The hash of a TPM_PUBKEY structure containing the public key and
+ parameters of the key that can verify the ticket */
+ TPM_DIGEST signedData; /* The ticket data */
+} TPM_CMK_SIGTICKET;
+
+/* 5.21 TPM_CMK_MA_APPROVAL rev 87
+
+ Structure to keep track of the CMK migration authorization
+*/
+
+typedef struct tdTPM_CMK_MA_APPROVAL {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* Set to TPM_TAG_CMK_MA_APPROVAL */
+#endif
+ TPM_DIGEST migrationAuthorityDigest; /* The hash of a TPM_MSA_COMPOSITE structure
+ containing the hash of one or more migration
+ authority public keys and parameters. */
+} TPM_CMK_MA_APPROVAL;
+
+/* 20.2 Delegate Definitions rev 101
+
+ The delegations are in a 64-bit field. Each bit describes a capability that the TPM Owner can
+ delegate to a trusted process by setting that bit. Each delegation bit setting is independent of
+ any other delegation bit setting in a row.
+
+ If a TPM command is not listed in the following table, then the TPM Owner cannot delegate that
+ capability to a trusted process. For the TPM commands that are listed in the following table, if
+ the bit associated with a TPM command is set to zero in the row of the table that identifies a
+ trusted process, then that process has not been delegated to use that TPM command.
+
+ The minimum granularity for delegation is at the ordinal level. It is not possible to delegate an
+ option of an ordinal. This implies that if the options present a difficulty and there is a need
+ to separate the delegations then there needs to be a split into two separate ordinals.
+*/
+
+#define TPM_DEL_OWNER_BITS 0x00000001
+#define TPM_DEL_KEY_BITS 0x00000002
+
+typedef struct tdTPM_DELEGATIONS {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_DELEGATIONS */
+#endif
+ uint32_t delegateType; /* Owner or key */
+ uint32_t per1; /* The first block of permissions */
+ uint32_t per2; /* The second block of permissions */
+} TPM_DELEGATIONS;
+
+/* 20.4 TPM_FAMILY_LABEL rev 85
+
+ Used in the family table to hold a one-byte numeric value (sequence number) that software can map
+ to a string of bytes that can be displayed or used by applications.
+
+ This is not sensitive data.
+*/
+
+#if 0
+typedef struct tdTPM_FAMILY_LABEL {
+ BYTE label; /* A sequence number that software can map to a string of bytes that can be
+ displayed or used by the applications. This MUST not contain sensitive
+ information. */
+} TPM_FAMILY_LABEL;
+#endif
+
+typedef BYTE TPM_FAMILY_LABEL; /* NOTE: No need for a structure here */
+
+/* 20.5 TPM_FAMILY_TABLE_ENTRY rev 101
+
+ The family table entry is an individual row in the family table. There are no sensitive values in
+ a family table entry.
+
+ Each family table entry contains values to facilitate table management: the familyID sequence
+ number value that associates a family table row with one or more delegate table rows, a
+ verification sequence number value that identifies when rows in the delegate table were last
+ verified, and BYTE family label value that software can map to an ASCII text description of the
+ entity using the family table entry
+*/
+
+typedef struct tdTPM_FAMILY_TABLE_ENTRY {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_FAMILY_TABLE_ENTRY */
+#endif
+ TPM_FAMILY_LABEL familyLabel; /* A sequence number that software can map to a string of
+ bytes that can be displayed of used by the applications.
+ This MUST not contain sensitive informations. */
+ TPM_FAMILY_ID familyID; /* The family ID in use to tie values together. This is not
+ a sensitive value. */
+ TPM_FAMILY_VERIFICATION verificationCount; /* The value inserted into delegation rows to
+ indicate that they are the current generation of
+ rows. Used to identify when a row in the delegate
+ table was last verified. This is not a sensitive
+ value. */
+ TPM_FAMILY_FLAGS flags; /* See section on TPM_FAMILY_FLAGS. */
+ /* NOTE Added */
+ TPM_BOOL valid;
+} TPM_FAMILY_TABLE_ENTRY;
+
+/* 20.6 TPM_FAMILY_TABLE rev 87
+
+ The family table is stored in a TPM shielded location. There are no confidential values in the
+ family table. The family table contains a minimum of 8 rows.
+*/
+
+#define TPM_NUM_FAMILY_TABLE_ENTRY_MIN 8
+
+typedef struct tdTPM_FAMILY_TABLE {
+ TPM_FAMILY_TABLE_ENTRY famTableRow[TPM_NUM_FAMILY_TABLE_ENTRY_MIN];
+} TPM_FAMILY_TABLE;
+
+/* 20.7 TPM_DELEGATE_LABEL rev 87
+
+ Used in both the delegate table and the family table to hold a string of bytes that can be
+ displayed or used by applications. This is not sensitive data.
+*/
+
+#if 0
+typedef struct tdTPM_DELEGATE_LABEL {
+ BYTE label; /* A byte that can be displayed or used by the applications. This MUST not
+ contain sensitive information. */
+} TPM_DELEGATE_LABEL;
+#endif
+
+typedef BYTE TPM_DELEGATE_LABEL; /* NOTE: No need for structure */
+
+/* 20.8 TPM_DELEGATE_PUBLIC rev 101
+
+ The information of a delegate row that is public and does not have any sensitive information.
+
+ PCR_INFO_SHORT is appropriate here as the command to create this is done using owner
+ authorization, hence the owner authorized the command and the delegation. There is no need to
+ validate what configuration was controlling the platform during the blob creation.
+*/
+
+typedef struct tdTPM_DELEGATE_PUBLIC {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_DELEGATE_PUBLIC */
+#endif
+ TPM_DELEGATE_LABEL rowLabel; /* This SHALL be the label for the row. It
+ MUST not contain any sensitive information. */
+ TPM_PCR_INFO_SHORT pcrInfo; /* This SHALL be the designation of the process that can use
+ the permission. This is a not sensitive
+ value. PCR_SELECTION may be NULL.
+
+ If selected the pcrInfo MUST be checked on each use of
+ the delegation. Use of the delegation is where the
+ delegation is passed as an authorization handle. */
+ TPM_DELEGATIONS permissions; /* This SHALL be the permissions that are allowed to the
+ indicated process. This is not a sensitive value. */
+ TPM_FAMILY_ID familyID; /* This SHALL be the family ID that identifies which family
+ the row belongs to. This is not a sensitive value. */
+ TPM_FAMILY_VERIFICATION verificationCount; /* A copy of verificationCount from the associated
+ family table. This is not a sensitive value. */
+} TPM_DELEGATE_PUBLIC;
+
+
+/* 20.9 TPM_DELEGATE_TABLE_ROW rev 101
+
+ A row of the delegate table.
+*/
+
+typedef struct tdTPM_DELEGATE_TABLE_ROW {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_DELEGATE_TABLE_ROW */
+#endif
+ TPM_DELEGATE_PUBLIC pub; /* This SHALL be the public information for a table row. */
+ TPM_SECRET authValue; /* This SHALL be the authorization value that can use the
+ permissions. This is a sensitive value. */
+ /* NOTE Added */
+ TPM_BOOL valid;
+} TPM_DELEGATE_TABLE_ROW;
+
+/* 20.10 TPM_DELEGATE_TABLE rev 87
+
+ This is the delegate table. The table contains a minimum of 2 rows.
+
+ This will be an entry in the TPM_PERMANENT_DATA structure.
+*/
+
+#define TPM_NUM_DELEGATE_TABLE_ENTRY_MIN 2
+
+typedef struct tdTPM_DELEGATE_TABLE {
+ TPM_DELEGATE_TABLE_ROW delRow[TPM_NUM_DELEGATE_TABLE_ENTRY_MIN]; /* The array of delegations */
+} TPM_DELEGATE_TABLE;
+
+/* 20.11 TPM_DELEGATE_SENSITIVE rev 115
+
+ The TPM_DELEGATE_SENSITIVE structure is the area of a delegate blob that contains sensitive
+ information.
+
+ This structure is normative for loading unencrypted blobs before there is an owner. It is
+ informative for TPM_CreateOwnerDelegation and TPM_LoadOwnerDelegation after there is an owner and
+ encrypted blobs are used, since the structure is under complete control of the TPM.
+*/
+
+typedef struct tdTPM_DELEGATE_SENSITIVE {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This MUST be TPM_TAG_DELEGATE_SENSITIVE */
+#endif
+ TPM_SECRET authValue; /* AuthData value */
+} TPM_DELEGATE_SENSITIVE;
+
+/* 20.12 TPM_DELEGATE_OWNER_BLOB rev 87
+
+ This data structure contains all the information necessary to externally store a set of owner
+ delegation rights that can subsequently be loaded or used by this TPM.
+
+ The encryption mechanism for the sensitive area is a TPM choice. The TPM may use asymmetric
+ encryption and the SRK for the key. The TPM may use symmetric encryption and a secret key known
+ only to the TPM.
+*/
+
+typedef struct tdTPM_DELEGATE_OWNER_BLOB {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This MUST be TPM_TAG_DELG_OWNER_BLOB */
+#endif
+ TPM_DELEGATE_PUBLIC pub; /* The public information for this blob */
+ TPM_DIGEST integrityDigest; /* The HMAC to guarantee the integrity of the entire structure */
+ TPM_SIZED_BUFFER additionalArea; /* An area that the TPM can add to the blob which MUST NOT
+ contain any sensitive information. This would include any
+ IV material for symmetric encryption */
+ TPM_SIZED_BUFFER sensitiveArea; /* The area that contains the encrypted
+ TPM_DELEGATE_SENSITIVE */
+} TPM_DELEGATE_OWNER_BLOB;
+
+/* 20.13 TPM_DELEGATE_KEY_BLOB rev 87
+
+ A structure identical to TPM_DELEGATE_OWNER_BLOB but which stores delegation information for user
+ keys. As compared to TPM_DELEGATE_OWNER_BLOB, it adds a hash of the corresponding public key
+ value to the public information.
+*/
+
+typedef struct tdTPM_DELEGATE_KEY_BLOB {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This MUST be TPM_TAG_DELG_KEY_BLOB */
+#endif
+ TPM_DELEGATE_PUBLIC pub; /* The public information for this blob */
+ TPM_DIGEST integrityDigest; /* The HMAC to guarantee the integrity of the entire
+ structure */
+ TPM_DIGEST pubKeyDigest; /* The digest, that uniquely identifies the key for which
+ this usage delegation applies. */
+ TPM_SIZED_BUFFER additionalArea; /* An area that the TPM can add to the blob which MUST NOT
+ contain any sensitive information. This would include any
+ IV material for symmetric encryption */
+ TPM_SIZED_BUFFER sensitiveArea; /* The area that contains the encrypted
+ TPM_DELEGATE_SENSITIVE */
+} TPM_DELEGATE_KEY_BLOB;
+
+/* 15.1 TPM_CURRENT_TICKS rev 110
+
+ This structure holds the current number of time ticks in the TPM. The value is the number of time
+ ticks from the start of the current session. Session start is a variable function that is
+ platform dependent. Some platforms may have batteries or other power sources and keep the TPM
+ clock session across TPM initialization sessions.
+
+ The <tickRate> element of the TPM_CURRENT_TICKS structure provides the number of microseconds per
+ tick. The platform manufacturer must satisfy input clock requirements set by the TPM vendor to
+ ensure the accuracy of the tickRate.
+
+ No external entity may ever set the current number of time ticks held in TPM_CURRENT_TICKS. This
+ value is always reset to 0 when a new clock session starts and increments under control of the
+ TPM.
+
+ Maintaining the relationship between the number of ticks counted by the TPM and some real world
+ clock is a task for external software.
+*/
+
+/* This is not a true UINT64, but a special structure to hold currentTicks */
+
+typedef struct tdTPM_UINT64 {
+ uint32_t sec;
+ uint32_t usec;
+} TPM_UINT64;
+
+typedef struct tdTPM_CURRENT_TICKS {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_CURRENT_TICKS */
+#endif
+ TPM_UINT64 currentTicks; /* The number of ticks since the start of this tick session */
+ /* upper is seconds, lower is useconds */
+ uint16_t tickRate; /* The number of microseconds per tick. The maximum resolution of
+ the TPM tick counter is thus 1 microsecond. The minimum
+ resolution SHOULD be 1 millisecond. */
+ TPM_NONCE tickNonce; /* TPM_NONCE tickNonce The nonce created by the TPM when resetting
+ the currentTicks to 0. This indicates the beginning of a time
+ session. This value MUST be valid before the first use of
+ TPM_CURRENT_TICKS. The value can be set at TPM_Startup or just
+ prior to first use. */
+ /* NOTE Added */
+ TPM_UINT64 initialTime; /* Time from TPM_GetTimeOfDay() */
+} TPM_CURRENT_TICKS;
+
+/*
+ 13. Transport Structures
+*/
+
+/* 13.1 TPM _TRANSPORT_PUBLIC rev 87
+
+ The public information relative to a transport session
+*/
+
+typedef struct tdTPM_TRANSPORT_PUBLIC {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_TRANSPORT_PUBLIC */
+#endif
+ TPM_TRANSPORT_ATTRIBUTES transAttributes; /* The attributes of this session */
+ TPM_ALGORITHM_ID algId; /* This SHALL be the algorithm identifier of the
+ symmetric key. */
+ TPM_ENC_SCHEME encScheme; /* This SHALL fully identify the manner in which the
+ key will be used for encryption operations. */
+} TPM_TRANSPORT_PUBLIC;
+
+/* 13.2 TPM_TRANSPORT_INTERNAL rev 88
+
+ The internal information regarding transport session
+*/
+
+#define TPM_MIN_TRANS_SESSIONS 3
+
+typedef struct tdTPM_TRANSPORT_INTERNAL {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_TRANSPORT_INTERNAL */
+#endif
+ TPM_AUTHDATA authData; /* The shared secret for this session */
+ TPM_TRANSPORT_PUBLIC transPublic; /* The public information of this session */
+ TPM_TRANSHANDLE transHandle; /* The handle for this session */
+ TPM_NONCE transNonceEven; /* The even nonce for the rolling protocol */
+ TPM_DIGEST transDigest; /* The log of transport events */
+ /* added kgold */
+ TPM_BOOL valid; /* entry is valid */
+} TPM_TRANSPORT_INTERNAL;
+
+/* 13.3 TPM_TRANSPORT_LOG_IN rev 87
+
+ The logging of transport commands occurs in two steps, before execution with the input
+ parameters and after execution with the output parameters.
+
+ This structure is in use for input log calculations.
+*/
+
+typedef struct tdTPM_TRANSPORT_LOG_IN {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_TRANSPORT_LOG_IN */
+#endif
+ TPM_DIGEST parameters; /* The actual parameters contained in the digest are subject to the
+ rules of the command using this structure. To find the exact
+ calculation refer to the actions in the command using this
+ structure. */
+ TPM_DIGEST pubKeyHash; /* The hash of any keys in the transport command */
+} TPM_TRANSPORT_LOG_IN;
+
+/* 13.4 TPM_TRANSPORT_LOG_OUT rev 88
+
+ The logging of transport commands occurs in two steps, before execution with the input parameters
+ and after execution with the output parameters.
+
+ This structure is in use for output log calculations.
+
+ This structure is in use for the INPUT logging during releaseTransport.
+*/
+
+typedef struct tdTPM_TRANSPORT_LOG_OUT {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_TRANSPORT_LOG_OUT */
+#endif
+ TPM_CURRENT_TICKS currentTicks; /* The current tick count. This SHALL be the value of the
+ current TPM tick counter. */
+ TPM_DIGEST parameters; /* The actual parameters contained in the digest are subject
+ to the rules of the command using this structure. To find
+ the exact calculation refer to the actions in the command
+ using this structure. */
+ TPM_MODIFIER_INDICATOR locality; /* The locality that called TPM_ExecuteTransport */
+} TPM_TRANSPORT_LOG_OUT;
+
+/* 13.5 TPM_TRANSPORT_AUTH structure rev 87
+
+ This structure provides the validation for the encrypted AuthData value.
+*/
+
+typedef struct tdTPM_TRANSPORT_AUTH {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_TRANSPORT_AUTH */
+#endif
+ TPM_AUTHDATA authData; /* The AuthData value */
+} TPM_TRANSPORT_AUTH;
+
+/* 22.3 TPM_DAA_ISSUER rev 91
+
+ This structure is the abstract representation of non-secret settings controlling a DAA
+ context. The structure is required when loading public DAA data into a TPM. TPM_DAA_ISSUER
+ parameters are normally held outside the TPM as plain text data, and loaded into a TPM when a DAA
+ session is required. A TPM_DAA_ISSUER structure contains no integrity check: the TPM_DAA_ISSUER
+ structure at time of JOIN is indirectly verified by the issuer during the JOIN process, and a
+ digest of the verified TPM_DAA_ISSUER structure is held inside the TPM_DAA_TPM structure created
+ by the JOIN process. Parameters DAA_digest_X are digests of public DAA_generic_X parameters, and
+ used to verify that the correct value of DAA_generic_X has been loaded. DAA_generic_q is stored
+ in its native form to reduce command complexity.
+*/
+
+typedef struct tdTPM_DAA_ISSUER {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DAA_ISSUER */
+#endif
+ TPM_DIGEST DAA_digest_R0; /* A digest of the parameter "R0", which is not secret and may be
+ common to many TPMs. */
+ TPM_DIGEST DAA_digest_R1; /* A digest of the parameter "R1", which is not secret and may be
+ common to many TPMs. */
+ TPM_DIGEST DAA_digest_S0; /* A digest of the parameter "S0", which is not secret and may be
+ common to many TPMs. */
+ TPM_DIGEST DAA_digest_S1; /* A digest of the parameter "S1", which is not secret and may be
+ common to many TPMs. */
+ TPM_DIGEST DAA_digest_n; /* A digest of the parameter "n", which is not secret and may be
+ common to many TPMs. */
+ TPM_DIGEST DAA_digest_gamma; /* A digest of the parameter "gamma", which is not secret
+ and may be common to many TPMs. */
+ BYTE DAA_generic_q[26]; /* The parameter q, which is not secret and may be common to
+ many TPMs. Note that q is slightly larger than a digest,
+ but is stored in its native form to simplify the
+ TPM_DAA_join command. Otherwise, JOIN requires 3 input
+ parameters. */
+} TPM_DAA_ISSUER;
+
+/* 22.4 TPM_DAA_TPM rev 91
+
+ This structure is the abstract representation of TPM specific parameters used during a DAA
+ context. TPM-specific DAA parameters may be stored outside the TPM, and hence this
+ structure is needed to save private DAA data from a TPM, or load private DAA data into a
+ TPM.
+
+ If a TPM_DAA_TPM structure is stored outside the TPM, it is stored in a confidential format that
+ can be interpreted only by the TPM created it. This is to ensure that secret parameters are
+ rendered confidential, and that both secret and non-secret data in TPM_DAA_TPM form a
+ self-consistent set.
+
+ TPM_DAA_TPM includes a digest of the public DAA parameters that were used during creation of the
+ TPM_DAA_TPM structure. This is needed to verify that a TPM_DAA_TPM is being used with the public
+ DAA parameters used to create the TPM_DAA_TPM structure. Parameters DAA_digest_v0 and
+ DAA_digest_v1 are digests of public DAA_private_v0 and DAA_private_v1 parameters, and used to
+ verify that the correct private parameters have been loaded.
+
+ Parameter DAA_count is stored in its native form, because it is smaller than a digest, and is
+ required to enforce consistency.
+*/
+
+typedef struct tdTPM_DAA_TPM {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DAA_TPM */
+#endif
+ TPM_DIGEST DAA_digestIssuer; /* A digest of a TPM_DAA_ISSUER structure that contains the
+ parameters used to generate this TPM_DAA_TPM
+ structure. */
+ TPM_DIGEST DAA_digest_v0; /* A digest of the parameter "v0", which is secret and specific to
+ this TPM. "v0" is generated during a JOIN phase. */
+ TPM_DIGEST DAA_digest_v1; /* A digest of the parameter "v1", which is secret and specific to
+ this TPM. "v1" is generated during a JOIN phase. */
+ TPM_DIGEST DAA_rekey; /* A digest related to the rekeying process, which is not secret but
+ is specific to this TPM, and must be consistent across JOIN/SIGN
+ sessions. "rekey" is generated during a JOIN phase. */
+ uint32_t DAA_count; /* The parameter "count", which is not secret but must be consistent
+ across JOIN/SIGN sessions. "count" is an input to the TPM from
+ the host system. */
+} TPM_DAA_TPM;
+
+/* 22.5 TPM_DAA_CONTEXT rev 91
+
+ TPM_DAA_CONTEXT structure is created and used inside a TPM, and never leaves the TPM. This
+ entire section is informative as the TPM does not expose this structure. TPM_DAA_CONTEXT
+ includes a digest of the public and private DAA parameters that were used during creation of the
+ TPM_DAA_CONTEXT structure. This is needed to verify that a TPM_DAA_CONTEXT is being used with the
+ public and private DAA parameters used to create the TPM_DAA_CONTEXT structure.
+*/
+
+typedef struct tdTPM_DAA_CONTEXT {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DAA_CONTEXT */
+#endif
+ TPM_DIGEST DAA_digestContext; /* A digest of parameters used to generate this
+ structure. The parameters vary, depending on whether the
+ session is a JOIN session or a SIGN session. */
+ TPM_DIGEST DAA_digest; /* A running digest of certain parameters generated during DAA
+ computation; operationally the same as a PCR (which holds a
+ running digest of integrity metrics). */
+ TPM_DAA_CONTEXT_SEED DAA_contextSeed; /* The seed used to generate other DAA
+ session parameters */
+ BYTE DAA_scratch[256]; /* Memory used to hold different parameters at different
+ times of DAA computation, but only one parameter at a
+ time. The maximum size of this field is 256 bytes */
+ BYTE DAA_stage; /* A counter, indicating the stage of DAA computation that was most
+ recently completed. The value of the counter is zero if the TPM
+ currently contains no DAA context.
+
+ When set to zero (0) the TPM MUST clear all other fields in this
+ structure.
+
+ The TPM MUST set DAA_stage to 0 on TPM_Startup(ANY) */
+ TPM_BOOL DAA_scratch_null;
+} TPM_DAA_CONTEXT;
+
+/* 22.6 TPM_DAA_JOINDATA rev 91
+
+ This structure is the abstract representation of data that exists only during a specific JOIN
+ session.
+*/
+
+typedef struct tdTPM_DAA_JOINDATA {
+ BYTE DAA_join_u0[128]; /* A TPM-specific secret "u0", used during the JOIN phase,
+ and discarded afterwards. */
+ BYTE DAA_join_u1[138]; /* A TPM-specific secret "u1", used during the JOIN phase,
+ and discarded afterwards. */
+ TPM_DIGEST DAA_digest_n0; /* A digest of the parameter "n0", which is an RSA public key with
+ exponent 2^16 +1 */
+} TPM_DAA_JOINDATA;
+
+/* DAA Session structure
+
+*/
+
+#define TPM_MIN_DAA_SESSIONS 2
+
+typedef struct tdTPM_DAA_SESSION_DATA {
+ TPM_DAA_ISSUER DAA_issuerSettings; /* A set of DAA issuer parameters controlling a DAA
+ session. (non-secret) */
+ TPM_DAA_TPM DAA_tpmSpecific; /* A set of DAA parameters associated with a
+ specific TPM. (secret) */
+ TPM_DAA_CONTEXT DAA_session; /* A set of DAA parameters associated with a DAA
+ session. (secret) */
+ TPM_DAA_JOINDATA DAA_joinSession; /* A set of DAA parameters used only during the JOIN
+ phase of a DAA session, and generated by the
+ TPM. (secret) */
+ /* added kgold */
+ TPM_HANDLE daaHandle; /* DAA session handle */
+ TPM_BOOL valid; /* array entry is valid */
+ /* FIXME should have handle type Join or Sign */
+} TPM_DAA_SESSION_DATA;
+
+/* 22.8 TPM_DAA_BLOB rev 98
+
+ The structure passed during the join process
+*/
+
+typedef struct tdTPM_DAA_BLOB {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DAA_BLOB */
+#endif
+ TPM_RESOURCE_TYPE resourceType; /* The resource type: enc(DAA_tpmSpecific) or enc(v0) or
+ enc(v1) */
+ BYTE label[16]; /* Label for identification of the blob. Free format
+ area. */
+ TPM_DIGEST blobIntegrity; /* The integrity of the entire blob including the sensitive
+ area. This is a HMAC calculation with the entire
+ structure (including sensitiveData) being the hash and
+ daaProof is the secret */
+ TPM_SIZED_BUFFER additionalData; /* Additional information set by the TPM that helps define
+ and reload the context. The information held in this area
+ MUST NOT expose any information held in shielded
+ locations. This should include any IV for symmetric
+ encryption */
+ TPM_SIZED_BUFFER sensitiveData; /* A TPM_DAA_SENSITIVE structure */
+#if 0
+ uint32_t additionalSize;
+ [size_is(additionalSize)] BYTE* additionalData;
+ uint32_t sensitiveSize;
+ [size_is(sensitiveSize)] BYTE* sensitiveData;
+#endif
+} TPM_DAA_BLOB;
+
+/* 22.9 TPM_DAA_SENSITIVE rev 91
+
+ The encrypted area for the DAA parameters
+*/
+
+typedef struct tdTPM_DAA_SENSITIVE {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DAA_SENSITIVE */
+#endif
+ TPM_SIZED_BUFFER internalData; /* DAA_tpmSpecific or DAA_private_v0 or DAA_private_v1 */
+#if 0
+ uint32_t internalSize;
+ [size_is(internalSize)] BYTE* internalData;
+#endif
+} TPM_DAA_SENSITIVE;
+
+#endif
+
+/* 7.1 TPM_PERMANENT_FLAGS rev 110
+
+ These flags maintain state information for the TPM. The values are not affected by any
+ TPM_Startup command.
+
+ The flag history includes:
+
+ Rev 62 specLevel 1 errataRev 0: 15 BOOLs
+ Rev 85 specLevel 2 errataRev 0: 19 BOOLs
+ Added: nvLocked, readSRKPub, tpmEstablished, maintenanceDone
+ Rev 94 specLevel 2 errataRev 1: 19 BOOLs
+ Rev 103 specLevel 2 errataRev 2: 20 BOOLs
+ Added: disableFullDALogicInfo
+*/
+
+typedef struct tdTPM_PERMANENT_FLAGS {
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_PERMANENT_FLAGS */
+ TPM_BOOL disable; /* disable The state of the disable flag. The default state is TRUE
+ */
+ TPM_BOOL ownership; /* The ability to install an owner. The default state is TRUE. */
+ TPM_BOOL deactivated; /* The state of the inactive flag. The default state is TRUE. */
+ TPM_BOOL readPubek; /* The ability to read the PUBEK without owner authorization. The
+ default state is TRUE.
+
+ set TRUE on owner clear
+ set FALSE on take owner, disablePubekRead
+ */
+ TPM_BOOL disableOwnerClear; /* Whether the owner authorized clear commands are active. The
+ default state is FALSE. */
+ TPM_BOOL allowMaintenance; /* Whether the TPM Owner may create a maintenance archive. The
+ default state is TRUE. */
+ TPM_BOOL physicalPresenceLifetimeLock; /* This bit can only be set to TRUE; it cannot be set to
+ FALSE except during the manufacturing process.
+
+ FALSE: The state of either physicalPresenceHWEnable or
+ physicalPresenceCMDEnable MAY be changed. (DEFAULT)
+
+ TRUE: The state of either physicalPresenceHWEnable or
+ physicalPresenceCMDEnable MUST NOT be changed for the
+ life of the TPM. */
+ TPM_BOOL physicalPresenceHWEnable; /* FALSE: Disable the hardware signal indicating physical
+ presence. (DEFAULT)
+
+ TRUE: Enables the hardware signal indicating physical
+ presence. */
+ TPM_BOOL physicalPresenceCMDEnable; /* FALSE: Disable the command indicating physical
+ presence. (DEFAULT)
+
+ TRUE: Enables the command indicating physical
+ presence. */
+ TPM_BOOL CEKPUsed; /* TRUE: The PRIVEK and PUBEK were created using
+ TPM_CreateEndorsementKeyPair.
+
+ FALSE: The PRIVEK and PUBEK were created using a manufacturer's
+ process. NOTE: This flag has no default value as the key pair
+ MUST be created by one or the other mechanism. */
+ TPM_BOOL TPMpost; /* TRUE: After TPM_Startup, if there is a call to
+ TPM_ContinueSelfTest the TPM MUST execute the actions of
+ TPM_SelfTestFull
+
+ FALSE: After TPM_Startup, if there is a call to
+ TPM_ContinueSelfTest the TPM MUST execute TPM_ContinueSelfTest
+
+ If the TPM supports the implicit invocation of
+ TPM_ContinueSelftTest upon the use of an untested resource, the
+ TPM MUST use the TPMPost flag to call either TPM_ContinueSelfTest
+ or TPM_SelfTestFull
+
+ The TPM manufacturer sets this bit during TPM manufacturing and
+ the bit is unchangeable after shipping the TPM
+
+ The default state is FALSE */
+ TPM_BOOL TPMpostLock; /* With the clarification of TPMPost TPMpostLock is now
+ unnecessary.
+ This flag is now deprecated */
+ TPM_BOOL FIPS; /* TRUE: This TPM operates in FIPS mode
+ FALSE: This TPM does NOT operate in FIPS mode */
+ TPM_BOOL tpmOperator; /* TRUE: The operator authorization value is valid
+ FALSE: the operator authorization value is not set */
+ TPM_BOOL enableRevokeEK; /* TRUE: The TPM_RevokeTrust command is active
+ FALSE: the TPM RevokeTrust command is disabled */
+ TPM_BOOL nvLocked; /* TRUE: All NV area authorization checks are active
+ FALSE: No NV area checks are performed, except for maxNVWrites.
+ FALSE is the default value */
+ TPM_BOOL readSRKPub; /* TRUE: GetPubKey will return the SRK pub key
+ FALSE: GetPubKey will not return the SRK pub key
+ Default SHOULD be FALSE */
+ TPM_BOOL tpmEstablished; /* TRUE: TPM_HASH_START has been executed at some time
+ FALSE: TPM_HASH_START has not been executed at any time
+ Default is FALSE - resets using TPM_ResetEstablishmentBit */
+ TPM_BOOL maintenanceDone; /* TRUE: A maintenance archive has been created for the current
+ SRK */
+ TPM_BOOL disableFullDALogicInfo; /* TRUE: The full dictionary attack TPM_GetCapability info is
+ deactivated. The returned structure is TPM_DA_INFO_LIMITED.
+ FALSE: The full dictionary attack TPM_GetCapability info is
+ activated. The returned structure is TPM_DA_INFO.
+ Default is FALSE.
+ */
+ /* NOTE: Cannot add vendor specific flags here, since TPM_GetCapability() returns the serialized
+ structure */
+} TPM_PERMANENT_FLAGS;
+
+/* 7.2 TPM_STCLEAR_FLAGS rev 109
+
+ These flags maintain state that is reset on each TPM_Startup(ST_Clear) command. The values are
+ not affected by TPM_Startup(ST_State) commands.
+*/
+
+typedef struct tdTPM_STCLEAR_FLAGS {
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_STCLEAR_FLAGS */
+ TPM_BOOL deactivated; /* Prevents the operation of most capabilities. There is no
+ default state. It is initialized by TPM_Startup to the
+ same value as TPM_PERMANENT_FLAGS ->
+ deactivated. TPM_SetTempDeactivated sets it to TRUE. */
+ TPM_BOOL disableForceClear; /* Prevents the operation of TPM_ForceClear when TRUE. The
+ default state is FALSE. TPM_DisableForceClear sets it to
+ TRUE. */
+ TPM_BOOL physicalPresence; /* Command assertion of physical presence. The default state
+ is FALSE. This flag is affected by the
+ TSC_PhysicalPresence command but not by the hardware
+ signal. */
+ TPM_BOOL physicalPresenceLock; /* Indicates whether changes to the TPM_STCLEAR_FLAGS ->
+ physicalPresence flag are permitted.
+ TPM_Startup(ST_CLEAR) sets PhysicalPresenceLock to its
+ default state of FALSE (allow changes to the
+ physicalPresence flag). When TRUE, the physicalPresence
+ flag is FALSE. TSC_PhysicalPresence can change the state
+ of physicalPresenceLock. */
+ TPM_BOOL bGlobalLock; /* Set to FALSE on each TPM_Startup(ST_CLEAR). Set to TRUE
+ when a write to NV_Index =0 is successful */
+ /* NOTE: Cannot add vendor specific flags here, since TPM_GetCapability() returns the serialized
+ structure */
+} TPM_STCLEAR_FLAGS;
+
+#if 0
+
+
+/* 7.3 TPM_STANY_FLAGS rev 87
+
+ These flags reset on any TPM_Startup command.
+*/
+
+typedef struct tdTPM_STANY_FLAGS {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_STANY_FLAGS */
+#endif
+ TPM_BOOL postInitialise; /* Prevents the operation of most capabilities. There is no default
+ state. It is initialized by TPM_Init to TRUE. TPM_Startup sets it
+ to FALSE. */
+ TPM_MODIFIER_INDICATOR localityModifier; /*This SHALL indicate for each command the presence of
+ a locality modifier for the command. It MUST be set
+ to NULL after the TPM executes each command. */
+#if 0
+ TPM_BOOL transportExclusive; /* Defaults to FALSE. TRUE when there is an exclusive transport
+ session active. Execution of ANY command other than
+ TPM_ExecuteTransport or TPM_ReleaseTransportSigned MUST
+ invalidate the exclusive transport session.
+ */
+#endif
+ TPM_TRANSHANDLE transportExclusive; /* Defaults to 0x00000000, Set to the handle when an
+ exclusive transport session is active */
+ TPM_BOOL TOSPresent; /* Defaults to FALSE
+ Set to TRUE on TPM_HASH_START
+ set to FALSE using setCapability */
+ /* NOTE: Added kgold */
+ TPM_BOOL stateSaved; /* Defaults to FALSE
+ Set to TRUE on TPM_SaveState
+ Set to FALSE on any other ordinal
+
+ This is an optimization flag, so the file need not be deleted if
+ it does not exist.
+ */
+} TPM_STANY_FLAGS;
+
+/* 7.4 TPM_PERMANENT_DATA rev 105
+
+ This structure contains the data fields that are permanently held in the TPM and not affected by
+ TPM_Startup(any).
+
+ Many of these fields contain highly confidential and privacy sensitive material. The TPM must
+ maintain the protections around these fields.
+*/
+
+#define TPM_MIN_COUNTERS 4 /* the minimum number of counters is 4 */
+#define TPM_DELEGATE_KEY TPM_KEY
+#define TPM_MAX_NV_WRITE_NOOWNER 64
+
+/* Although the ordinal is 32 bits, only the lower 8 bits seem to be used. So for now, define an
+ array of 256/8 bytes for ordinalAuditStatus - kgold */
+
+#define TPM_ORDINALS_MAX 256 /* assumes a multiple of CHAR_BIT */
+#define TPM_AUTHDIR_SIZE 1 /* Number of DIR registers */
+
+#ifdef TPM_VTPM
+
+/* Substructure of TPM_PERMANENT_DATA for VTPM instance data
+
+ */
+
+typedef struct tdTPM_PERMANENT_INSTANCE_DATA {
+ uint32_t creationMask; /* creationMask from TPM_CreateInstance */
+ TPM_INSTANCE_HANDLE parentHandle; /* instance handle of this instance's parent instance */
+ TPM_SIZED_BUFFER childHandles; /* instance handle list of this instance's children */
+ TPM_NONCE migrationNonce; /* Controls state import using TPM_SetInstanceData */
+ TPM_DIGEST migrationDigest; /* Digest of all migrated data structures */
+ TPM_BOOL sourceLock; /* Lock instance before export migration */
+ TPM_BOOL destinationLock; /* Lock instance before import migration */
+
+} TPM_PERMANENT_INSTANCE_DATA;
+
+#endif /* TPM_VTPM */
+
+#ifdef TPM_VENDOR
+
+/*
+ WEC_CFG_STRUCT
+*/
+
+/* Winbond preconfiguration */
+
+typedef struct tdTPM_WEC_CFG_STRUCT {
+ BYTE lowBaseAddress; /* reserved - keep FFh value */
+ BYTE highBaseAddress; /* reserved - keep FFh value */
+ BYTE altCfg; /* GPIO alternate configuration */
+ BYTE direction; /* direction (input/output) of GPIO pins */
+ BYTE pullUp; /* pull-up of GPIO input pins */
+ BYTE pushPull; /* push-pull of open drain of GPIO output pins */
+ BYTE cfg_a; /* hardware physical presence, 32 khz clock */
+ BYTE cfg_b; /* reserved - keep FFh value */
+ BYTE cfg_c; /* reserved - keep FFh value */
+ BYTE cfg_d; /* reserved - keep FFh value */
+ BYTE cfg_e; /* reserved - keep FFh value */
+ BYTE cfg_f; /* software binding */
+ BYTE cfg_g; /* tplPost flagm N_FAILS and WEC_GetTpmStatus */
+ BYTE cfg_h; /* LpcSelfTest and FIPS flags */
+ BYTE cfg_i; /* reserved - keep FFh value */
+ BYTE cfg_j; /* reserved - keep FFh value */
+} TPM_WEC_CFG_STRUCT;
+
+#endif /*TPM_VENDOR */
+
+
+typedef struct tdTPM_PERMANENT_DATA {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_PERMANENT_DATA */
+#endif
+ BYTE revMajor; /* This is the TPM major revision indicator. This SHALL be set by
+ the TPME, only. The default value is manufacturer-specific. */
+ BYTE revMinor; /* This is the TPM minor revision indicator. This SHALL be set by
+ the TPME, only. The default value is manufacturer-specific. */
+ TPM_SECRET tpmProof; /* This is a random number that each TPM maintains to validate blobs
+ in the SEAL and other processes. The default value is
+ manufacturer-specific. */
+ TPM_NONCE EKReset; /* Nonce held by TPM to validate TPM_RevokeTrust. This value is set
+ as the next 20 bytes from the TPM RNG when the EK is set
+ (was fipsReset - kgold) */
+ TPM_SECRET ownerAuth; /* This is the TPM-Owner's authorization data. The default value is
+ manufacturer-specific. */
+ TPM_SECRET operatorAuth; /* The value that allows the execution of the SetTempDeactivated
+ command */
+ TPM_DIRVALUE authDIR; /* The array of TPM Owner authorized DIR. Points to the same
+ location as the NV index value. (kgold - was array of 1) */
+#ifndef TPM_NOMAINTENANCE
+ TPM_PUBKEY manuMaintPub; /* This is the manufacturer's public key to use in the maintenance
+ operations. The default value is manufacturer-specific. */
+#endif
+ TPM_KEY endorsementKey; /* This is the TPM's endorsement key pair. */
+ TPM_KEY srk; /* This is the TPM's StorageRootKey. */
+ TPM_SYMMETRIC_KEY_TOKEN contextKey; /* This is the key in use to perform context saves. The key
+ may be symmetric or asymmetric. The key size is
+ predicated by the algorithm in use. */
+ TPM_SYMMETRIC_KEY_TOKEN delegateKey; /* This key encrypts delegate rows that are stored
+ outside the TPM. */
+ TPM_COUNTER_VALUE auditMonotonicCounter; /* This SHALL be the audit monotonic counter for the
+ TPM. This value starts at 0 and increments
+ according to the rules of auditing */
+ TPM_COUNTER_VALUE monotonicCounter[TPM_MIN_COUNTERS]; /* This SHALL be the monotonic
+ counters for the TPM. The
+ individual counters start and
+ increment according to the rules
+ of monotonic counters. */
+ TPM_PCR_ATTRIBUTES pcrAttrib[TPM_NUM_PCR]; /* The attributes for all of the PCR registers
+ supported by the TPM. */
+ BYTE ordinalAuditStatus[TPM_ORDINALS_MAX/CHAR_BIT]; /* Table indicating which ordinals are being
+ audited. */
+#if 0
+ /* kgold - The xcrypto RNG is good enough that this is not needed */
+ BYTE* rngState; /* State information describing the random number
+ generator. */
+#endif
+ TPM_FAMILY_TABLE familyTable; /* The family table in use for delegations */
+ TPM_DELEGATE_TABLE delegateTable; /* The delegate table */
+ uint32_t lastFamilyID; /* A value that sets the high water mark for family ID's. Set to 0
+ during TPM manufacturing and never reset. */
+ uint32_t noOwnerNVWrite; /* The count of NV writes that have occurred when there is no TPM
+ Owner.
+
+ This value starts at 0 in manufacturing and after each
+ TPM_OwnerClear. If the value exceeds 64 the TPM returns
+ TPM_MAXNVWRITES to any command attempting to manipulate the NV
+ storage. */
+ TPM_CMK_DELEGATE restrictDelegate; /* The settings that allow for the delegation and
+ use on CMK keys. Default value is false. */
+ TPM_DAA_TPM_SEED tpmDAASeed; /* This SHALL be a random value generated after generation
+ of the EK.
+
+ tpmDAASeed does not change during TPM Owner changes. If
+ the EK is removed (RevokeTrust) then the TPM MUST
+ invalidate the tpmDAASeed. The owner can force a change
+ in the value through TPM_SetCapability.
+
+ (linked to daaProof) */
+ TPM_NONCE daaProof; /* This is a random number that each TPM maintains to validate blobs
+ in the DAA processes. The default value is manufacturer-specific.
+
+ The value is not changed when the owner is changed. It is
+ changed when the EK changes. The owner can force a change in the
+ value through TPM_SetCapability. */
+ unsigned char *daaBlobKey; /* This is the key in use to perform DAA encryption and decryption.
+ The key may be symmetric or asymmetric. The key size is
+ predicated by the algorithm in use.
+
+ This value MUST be changed when daaProof changes.
+
+ This key MUST NOT be a copy of the EK or SRK.
+
+ (linked to daaProof) */
+ /* NOTE: added kgold */
+ TPM_BOOL ownerInstalled; /* TRUE: The TPM has an owner installed.
+ FALSE: The TPM has no owner installed. (default) */
+ BYTE tscOrdinalAuditStatus; /* extra byte to track TSC ordinals */
+#ifdef TPM_VTPM /* VTPM specific ordinals */
+ uint32_t instanceOrdinalAuditStatus1; /* extra longs to track vendor specific ordinals */
+ uint32_t instanceOrdinalAuditStatus2;
+#endif
+ TPM_BOOL allowLoadMaintPub; /* TRUE allows the TPM_LoadManuMaintPub command */
+
+#ifdef TPM_VTPM
+ TPM_PERMANENT_INSTANCE_DATA instanceData; /* substructure for VTPM instance data */
+#endif
+#ifdef TPM_VENDOR
+ TPM_WEC_CFG_STRUCT wecPreConfig; /* Winbond preconfiguration data */
+ TPM_BOOL preConfigSet; /* TRUE if the structure has been set through
+ WEC_PreConfig */
+#endif
+} TPM_PERMANENT_DATA;
+
+#define TPM_MIN_AUTH_SESSIONS 3
+
+/* NOTE: Vendor specific */
+
+typedef struct tdTPM_AUTH_SESSION_DATA {
+ /* vendor specific */
+ TPM_AUTHHANDLE handle; /* Handle for a session */
+ TPM_PROTOCOL_ID protocolID; /* TPM_PID_OIAP, TPM_PID_OSAP, TPM_PID_DSAP */
+ TPM_ENT_TYPE entityTypeByte; /* The type of entity in use (TPM_ET_SRK, TPM_ET_OWNER,
+ TPM_ET_KEYHANDLE ... */
+ TPM_ADIP_ENC_SCHEME adipEncScheme; /* ADIP encryption scheme */
+ TPM_NONCE nonceEven; /* OIAP, OSAP, DSAP */
+ TPM_SECRET sharedSecret; /* OSAP */
+ TPM_DIGEST entityDigest; /* OSAP tracks which entity established the OSAP session */
+ TPM_DELEGATE_PUBLIC pub; /* DSAP */
+ TPM_BOOL valid; /* added kgold: array entry is valid */
+} TPM_AUTH_SESSION_DATA;
+
+#ifdef TPM_VTPM
+/* 3.3.2 TPM_PCR_LIST
+
+ TPM_PCR_LIST is a structure saved by TPM_SetupInstance and returned by TPM_GetCapability.
+*/
+
+typedef struct tdTPM_PCR_LIST {
+ TPM_PCRINDEX pcrIndex; /* Index to a PCR register */
+ TPM_DIGEST inDigest; /* The digest representing the event to be recorded. */
+ BYTE eventID; /* Identifier for measurements */
+#if 0
+ uint32_t nameSize; /* The size of the name area */
+ BYTE* name; /* Name of an initial measurement */
+#endif
+ TPM_SIZED_BUFFER name;
+} TPM_PCR_LIST;
+
+/* TPM_PCR_LIST_TIMESTAMP
+
+ TPM_PCR_LIST_TIMESTAMP is a structure saved by the TPM when logging PCR extensions and returned
+ by TPM_GetCapability.
+*/
+
+typedef struct tdTPM_PCR_LIST_TIMESTAMP {
+ TPM_COMMAND_CODE ordinal; /* The ordinal that altered the PCR */
+ TPM_PCRINDEX pcrIndex; /* Index to a PCR register */
+ TPM_DIGEST digest; /* The digest representing the recorded PCR Extension */
+ uint32_t timestamp_hi; /* time of the log entry */
+ uint32_t timestamp_lo;
+} TPM_PCR_LIST_TIMESTAMP;
+
+/* TPM_PCR_LIST_TIMESTAMP_INST
+
+ TPM_PCR_LIST_TIMESTAMP_INST is a structure created by the TPM when notifying clients of PCR
+ extensions.
+*/
+
+typedef struct tdTPM_PCR_LIST_TIMESTAMP_INST {
+ TPM_INSTANCE_HANDLE instance; /* instance handle */
+ TPM_COMMAND_CODE ordinal; /* The ordinal that altered the PCR */
+ TPM_PCRINDEX pcrIndex; /* Index to a PCR register */
+ TPM_DIGEST digest; /* The digest representing the recorded PCR Extensions. */
+ uint32_t timestamp_hi; /* time of the log entry */
+ uint32_t timestamp_lo;
+} TPM_PCR_LIST_TIMESTAMP_INST;
+
+/* Added for virtual TPM support */
+
+typedef struct tdTPM_VTPM_INSTANCE {
+ TPM_SYMMETRIC_KEY_TOKEN instanceEncKey; /* symmetric key to encrypt instance migration
+ blobs */
+ TPM_SECRET instanceHmacKey; /* secret used to MAC instance migration blobs */
+ TPM_SIZED_BUFFER pcrList; /* PCR lists from TPM_SetupInstance */
+ TPM_PCR_SELECTION logPCRSelection; /* Indices of PCRs that should be saved for logging */
+ TPM_PCR_SELECTION subscribePCRSelection; /* Indices of PCRs that should be reported to a
+ subscriber */
+ uint32_t logLengthMax; /* Upper limit on the length of the buffer (number of
+ measurements) used for logging of measurements */
+ uint32_t logLength; /* number of measurements in the log */
+ TPM_BOOL logOverflow; /* pcrMeasurementLog has overflowed */
+ uint32_t subscribeSequenceNumber; /* count of measurements sent to subscriber */
+} TPM_VTPM_INSTANCE;
+
+#endif /* TPM_VTPM */
+
+/* 3. contextList MUST support a minimum of 16 entries, it MAY support more. */
+#define TPM_MIN_SESSION_LIST 16
+
+/* 7.5 TPM_STCLEAR_DATA rev 101
+
+ This is an informative structure and not normative. It is purely for convenience of writing the
+ spec.
+
+ Most of the data in this structure resets on TPM_Startup(ST_Clear). A TPM may implement rules
+ that provide longer-term persistence for the data. The TPM reflects how it handles the data in
+ various TPM_GetCapability fields including startup effects.
+*/
+
+typedef struct tdTPM_STCLEAR_DATA {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_STCLEAR_DATA */
+#endif
+ TPM_NONCE contextNonceKey; /* This is the nonce in use to properly identify saved key context
+ blobs This SHALL be set to all zeros on each TPM_Startup
+ (ST_Clear).
+ */
+ TPM_COUNT_ID countID; /* This is the handle for the current monotonic counter. This SHALL
+ be set to zero on each TPM_Startup(ST_Clear). */
+ uint32_t ownerReference; /* Points to where to obtain the owner secret in OIAP and OSAP
+ commands. This allows a TSS to manage 1.1 applications on a 1.2
+ TPM where delegation is in operation. */
+ TPM_BOOL disableResetLock; /* Disables TPM_ResetLockValue upon authorization failure.
+ The value remains TRUE for the timeout period.
+
+ Default is FALSE.
+
+ The value is in the STCLEAR_DATA structure as the
+ implementation of this flag is TPM vendor specific. */
+ TPM_PCRVALUE PCRS[TPM_NUM_PCR]; /* Platform configuration registers */
+#if (TPM_REVISION >= 103) /* added for rev 103 */
+ uint32_t deferredPhysicalPresence; /* The value can save the assertion of physicalPresence.
+ Individual bits indicate to its ordinal that
+ physicalPresence was previously asserted when the
+ software state is such that it can no longer be asserted.
+ Set to zero on each TPM_Startup(ST_Clear). */
+#endif
+ /* NOTE: Added for dictionary attack mitigation */
+ uint32_t authFailCount; /* number of authorization failures without a TPM_ResetLockValue */
+ uint32_t authFailTime; /* time of threshold failure in seconds */
+ /* NOTE: Moved from TPM_STANY_DATA. Saving this state is optional. This implementation
+ does. */
+ TPM_AUTH_SESSION_DATA authSessions[TPM_MIN_AUTH_SESSIONS]; /* List of current
+ sessions. Sessions can be OSAP,
+ OIAP, DSAP and Transport */
+ /* NOTE: Added for transport */
+ TPM_TRANSPORT_INTERNAL transSessions[TPM_MIN_TRANS_SESSIONS];
+ /* 22.7 TPM_STANY_DATA Additions (for DAA) - moved to TPM_STCLEAR_DATA for startup state */
+ TPM_DAA_SESSION_DATA daaSessions[TPM_MIN_DAA_SESSIONS];
+ /* 1. The group of contextNonceSession, contextCount, contextList MUST reset at the same
+ time. */
+ TPM_NONCE contextNonceSession; /* This is the nonce in use to properly identify saved
+ session context blobs. This MUST be set to all zeros on
+ each TPM_Startup (ST_Clear). The nonce MAY be set to
+ null on TPM_Startup( any). */
+ uint32_t contextCount; /* This is the counter to avoid session context blob replay
+ attacks. This MUST be set to 0 on each TPM_Startup
+ (ST_Clear). The value MAY be set to 0 on TPM_Startup
+ (any). */
+ uint32_t contextList[TPM_MIN_SESSION_LIST]; /* This is the list of outstanding session blobs.
+ All elements of this array MUST be set to 0 on
+ each TPM_Startup (ST_Clear). The values MAY be
+ set to 0 on TPM_Startup (any). */
+ /* NOTE Added auditDigest effect, saved with ST_STATE */
+ TPM_DIGEST auditDigest; /* This is the extended value that is the audit log. This
+ SHALL be set to all zeros at the start of each audit
+ session. */
+ /* NOTE Storage for the ordinal response */
+ TPM_STORE_BUFFER ordinalResponse; /* outgoing response buffer for this ordinal */
+ uint32_t responseCount; /* increments after each response */
+} TPM_STCLEAR_DATA;
+
+/* 7.6 TPM_STANY_DATA rev 87
+
+ This is an informative structure and not normative. It is purely for convenience of writing the
+ spec.
+
+ Most of the data in this structure resets on TPM_Startup(ST_State). A TPM may implement rules
+ that provide longer-term persistence for the data. The TPM reflects how it handles the data in
+ various getcapability fields including startup effects.
+*/
+
+typedef struct tdTPM_STANY_DATA {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_STANY_DATA */
+#endif
+ TPM_CURRENT_TICKS currentTicks; /* This is the current tick counter. This is reset to 0
+ according to the rules when the TPM can tick. See the
+ section on the tick counter for details. */
+} TPM_STANY_DATA;
+
+/* 11. Signed Structures */
+
+/* 11.1 TPM_CERTIFY_INFO rev 101
+
+ When the TPM certifies a key, it must provide a signature with a TPM identity key on information
+ that describes that key. This structure provides the mechanism to do so.
+
+ Key usage and keyFlags must have their upper byte set to zero to avoid collisions with the other
+ signature headers.
+*/
+
+typedef struct tdTPM_CERTIFY_INFO {
+ TPM_STRUCT_VER version; /* This MUST be 1.1.0.0 */
+ TPM_KEY_USAGE keyUsage; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified. The
+ upper byte MUST be zero */
+ TPM_KEY_FLAGS keyFlags; /* This SHALL be set to the same value as the corresponding
+ parameter in the TPM_KEY structure that describes the
+ public key that is being certified. The upper byte MUST
+ be zero */
+ TPM_AUTH_DATA_USAGE authDataUsage; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified */
+ TPM_KEY_PARMS algorithmParms; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified */
+ TPM_DIGEST pubkeyDigest; /* This SHALL be a digest of the value TPM_KEY -> pubKey ->
+ key in a TPM_KEY representation of the key to be
+ certified */
+ TPM_NONCE data; /* This SHALL be externally provided data. */
+ TPM_BOOL parentPCRStatus; /* This SHALL indicate if any parent key was wrapped to a
+ PCR */
+ TPM_SIZED_BUFFER pcrInfo; /* */
+#if 0
+ uint32_t PCRInfoSize; /* This SHALL be the size of the pcrInfo parameter. A value
+ of zero indicates that the key is not wrapped to a PCR */
+ BYTE* PCRInfo; /* This SHALL be the TPM_PCR_INFO structure. */
+#endif
+ /* NOTE: kgold - Added this structure, a cache of PCRInfo when not NULL */
+ TPM_PCR_INFO *tpm_pcr_info;
+} TPM_CERTIFY_INFO;
+
+/* 11.2 TPM_CERTIFY_INFO2 rev 101
+
+ When the TPM certifies a key, it must provide a signature with a TPM identity key on information
+ that describes that key. This structure provides the mechanism to do so.
+
+ Key usage and keyFlags must have their upper byte set to zero to avoid collisions with the other
+ signature headers.
+*/
+
+typedef struct tdTPM_CERTIFY_INFO2 {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_CERTIFY_INFO2 */
+#endif
+ BYTE fill; /* MUST be 0x00 */
+ TPM_PAYLOAD_TYPE payloadType; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified */
+ TPM_KEY_USAGE keyUsage; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified. The
+ upper byte MUST be zero */
+ TPM_KEY_FLAGS keyFlags; /* This SHALL be set to the same value as the corresponding
+ parameter in the TPM_KEY structure that describes the
+ public key that is being certified. The upper byte MUST
+ be zero. */
+ TPM_AUTH_DATA_USAGE authDataUsage; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified */
+ TPM_KEY_PARMS algorithmParms; /* This SHALL be the same value that would be set in a
+ TPM_KEY representation of the key to be certified */
+ TPM_DIGEST pubkeyDigest; /* This SHALL be a digest of the value TPM_KEY -> pubKey ->
+ key in a TPM_KEY representation of the key to be
+ certified */
+ TPM_NONCE data; /* This SHALL be externally provided data. */
+ TPM_BOOL parentPCRStatus; /* This SHALL indicate if any parent key was wrapped to a
+ PCR */
+#if 0
+ uint32_t PCRInfoSize; /* This SHALL be the size of the pcrInfo parameter. A value
+ of zero indicates that the key is not wrapped to a PCR */
+ BYTE* PCRInfo; /* This SHALL be the TPM_PCR_INFO_SHORT structure. */
+#endif
+ TPM_SIZED_BUFFER pcrInfo;
+#if 0
+ uint32_t migrationAuthoritySize; /* This SHALL be the size of migrationAuthority */
+ BYTE *migrationAuthority; /* If the key to be certified has [payload ==
+ TPM_PT_MIGRATE_RESTRICTED or payload
+ ==TPM_PT_MIGRATE_EXTERNAL], migrationAuthority is the
+ digest of the TPM_MSA_COMPOSITE and has TYPE ==
+ TPM_DIGEST. Otherwise it is NULL. */
+#endif
+ TPM_SIZED_BUFFER migrationAuthority;
+ /* NOTE: kgold - Added this structure, a cache of PCRInfo when not NULL */
+ TPM_PCR_INFO_SHORT *tpm_pcr_info_short;
+} TPM_CERTIFY_INFO2;
+
+/* 11.3 TPM_QUOTE_INFO rev 87
+
+ This structure provides the mechanism for the TPM to quote the current values of a list of PCRs.
+*/
+
+typedef struct tdTPM_QUOTE_INFO {
+ TPM_STRUCT_VER version; /* This MUST be 1.1.0.0 */
+ BYTE fixed[4]; /* This SHALL always be the string 'QUOT' */
+ TPM_COMPOSITE_HASH digestValue; /* This SHALL be the result of the composite hash algorithm
+ using the current values of the requested PCR indices. */
+ TPM_NONCE externalData; /* 160 bits of externally supplied data */
+} TPM_QUOTE_INFO;
+
+#endif
+
+/* 11.4 TPM_QUOTE_INFO2 rev 87
+
+ This structure provides the mechanism for the TPM to quote the current values of a list of PCRs.
+*/
+
+typedef struct tdTPM_QUOTE_INFO2 {
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_QUOTE_INFO2 */
+ BYTE fixed[4]; /* This SHALL always be the string 'QUT2' */
+ TPM_NONCE externalData; /* 160 bits of externally supplied data */
+ TPM_PCR_INFO_SHORT infoShort; /* */
+} TPM_QUOTE_INFO2;
+
+/* 12.1 TPM_EK_BLOB rev 87
+
+ This structure provides a wrapper to each type of structure that will be in use when the
+ endorsement key is in use.
+*/
+
+typedef struct tdTPM_EK_BLOB {
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_EK_BLOB */
+ TPM_EK_TYPE ekType; /* This SHALL be set to reflect the type of blob in use */
+ uint32_t blobSize; /* The size of the blob field */
+ BYTE blob[MAX_COMMAND_SIZE]; /* The blob of information depending on the type */
+} TPM_EK_BLOB;
+
+/* 12.2 TPM_EK_BLOB_ACTIVATE rev 87
+
+ This structure contains the symmetric key to encrypt the identity credential. This structure
+ always is contained in a TPM_EK_BLOB.
+*/
+
+typedef struct tdTPM_EK_BLOB_ACTIVATE {
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_EK_BLOB_ACTIVATE */
+ TPM_SYMMETRIC_KEY sessionKey; /* This SHALL be the session key used by the CA to encrypt
+ the TPM_IDENTITY_CREDENTIAL */
+ TPM_DIGEST idDigest; /* This SHALL be the digest of the TPM identity public key
+ that is being certified by the CA */
+ TPM_PCR_INFO_SHORT pcrInfo; /* This SHALL indicate the PCR's and localities */
+} TPM_EK_BLOB_ACTIVATE;
+
+#if 0
+
+/* 12.3 TPM_EK_BLOB_AUTH rev 87
+
+ This structure contains the symmetric key to encrypt the identity credential. This structure
+ always is contained in a TPM_EK_BLOB.
+*/
+
+typedef struct tdTPM_EK_BLOB_AUTH {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_EK_BLOB_AUTH */
+#endif
+ TPM_SECRET authValue; /* This SHALL be the authorization value */
+} TPM_EK_BLOB_AUTH;
+
+/* 12.5 TPM_IDENTITY_CONTENTS rev 87
+
+ TPM_MakeIdentity uses this structure and the signature of this structure goes to a privacy CA
+ during the certification process.
+*/
+
+typedef struct tdTPM_IDENTITY_CONTENTS {
+ TPM_STRUCT_VER ver; /* This MUST be 1.1.0.0 */
+ uint32_t ordinal; /* This SHALL be the ordinal of the TPM_MakeIdentity
+ command. */
+ TPM_CHOSENID_HASH labelPrivCADigest; /* This SHALL be the result of hashing the chosen
+ identityLabel and privacyCA for the new TPM
+ identity */
+ TPM_PUBKEY identityPubKey; /* This SHALL be the public key structure of the identity
+ key */
+} TPM_IDENTITY_CONTENTS;
+
+/* 12.8 TPM_ASYM_CA_CONTENTS rev 87
+
+ This structure contains the symmetric key to encrypt the identity credential.
+*/
+
+typedef struct tdTPM_ASYM_CA_CONTENTS {
+ TPM_SYMMETRIC_KEY sessionKey; /* This SHALL be the session key used by the CA to encrypt
+ the TPM_IDENTITY_CREDENTIAL */
+ TPM_DIGEST idDigest; /* This SHALL be the digest of the TPM_PUBKEY of the key
+ that is being certified by the CA */
+} TPM_ASYM_CA_CONTENTS;
+
+/*
+ 14. Audit Structures
+*/
+
+/* 14.1 TPM_AUDIT_EVENT_IN rev 87
+
+ This structure provides the auditing of the command upon receipt of the command. It provides the
+ information regarding the input parameters.
+*/
+
+typedef struct tdTPM_AUDIT_EVENT_IN {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_AUDIT_EVENT_IN */
+#endif
+ TPM_DIGEST inputParms; /* Digest value according to the HMAC digest rules of the
+ "above the line" parameters (i.e. the first HMAC digest
+ calculation). When there are no HMAC rules, the input
+ digest includes all parameters including and after the
+ ordinal. */
+ TPM_COUNTER_VALUE auditCount; /* The current value of the audit monotonic counter */
+} TPM_AUDIT_EVENT_IN;
+
+/* 14.2 TPM_AUDIT_EVENT_OUT rev 87
+
+ This structure reports the results of the command execution. It includes the return code and the
+ output parameters.
+*/
+
+typedef struct tdTPM_AUDIT_EVENT_OUT {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_AUDIT_EVENT_OUT */
+#endif
+ TPM_DIGEST outputParms; /* Digest value according to the HMAC digest rules of the
+ "above the line" parameters (i.e. the first HMAC digest
+ calculation). When there are no HMAC rules, the output
+ digest includes the return code, the ordinal, and all
+ parameters after the return code. */
+ TPM_COUNTER_VALUE auditCount; /* The current value of the audit monotonic counter */
+} TPM_AUDIT_EVENT_OUT;
+
+/*
+ 18. Context structures
+*/
+
+/* 18.1 TPM_CONTEXT_BLOB rev 102
+
+ This is the header for the wrapped context. The blob contains all information necessary to reload
+ the context back into the TPM.
+
+ The additional data is used by the TPM manufacturer to save information that will assist in the
+ reloading of the context. This area must not contain any shielded data. For instance, the field
+ could contain some size information that allows the TPM more efficient loads of the context. The
+ additional area could not contain one of the primes for a RSA key.
+
+ To ensure integrity of the blob when using symmetric encryption the TPM vendor could use some
+ valid cipher chaining mechanism. To ensure the integrity without depending on correct
+ implementation, the TPM_CONTEXT_BLOB structure uses a HMAC of the entire structure using tpmProof
+ as the secret value.
+
+ Since both additionalData and sensitiveData are informative, any or all of additionalData
+ could be moved to sensitiveData.
+*/
+
+#define TPM_CONTEXT_LABEL_SIZE 16
+
+typedef struct tdTPM_CONTEXT_BLOB {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_CONTEXTBLOB */
+#endif
+ TPM_RESOURCE_TYPE resourceType; /* The resource type */
+ TPM_HANDLE handle; /* Previous handle of the resource */
+ BYTE label[TPM_CONTEXT_LABEL_SIZE]; /* Label for identification of the blob. Free format
+ area. */
+ uint32_t contextCount; /* MUST be TPM_STANY_DATA -> contextCount when creating the
+ structure. This value is ignored for context blobs that
+ reference a key. */
+ TPM_DIGEST integrityDigest; /* The integrity of the entire blob including the sensitive
+ area. This is a HMAC calculation with the entire
+ structure (including sensitiveData) being the hash and
+ tpmProof is the secret */
+#if 0
+ uint32_t additionalSize;
+ [size_is(additionalSize)] BYTE* additionalData;
+ uint32_t sensitiveSize;
+ [size_is(sensitiveSize)] BYTE* sensitiveData;
+#endif
+ TPM_SIZED_BUFFER additionalData; /* Additional information set by the TPM that helps define
+ and reload the context. The information held in this area
+ MUST NOT expose any information held in shielded
+ locations. This should include any IV for symmetric
+ encryption */
+ TPM_SIZED_BUFFER sensitiveData; /* The normal information for the resource that can be
+ exported */
+} TPM_CONTEXT_BLOB;
+
+/* 18.2 TPM_CONTEXT_SENSITIVE rev 87
+
+ The internal areas that the TPM needs to encrypt and store off the TPM.
+
+ This is an informative structure and the TPM can implement in any manner they wish.
+*/
+
+typedef struct tdTPM_CONTEXT_SENSITIVE {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_CONTEXT_SENSITIVE */
+#endif
+ TPM_NONCE contextNonce; /* On context blobs other than keys this MUST be
+ TPM_STANY_DATA - > contextNonceSession For keys the value
+ is TPM_STCLEAR_DATA -> contextNonceKey */
+#if 0
+ uint32_t internalSize;
+ [size_is(internalSize)] BYTE* internalData;
+#endif
+ TPM_SIZED_BUFFER internalData; /* The internal data area */
+} TPM_CONTEXT_SENSITIVE;
+
+#endif
+
+/* 19.2 TPM_NV_ATTRIBUTES rev 99
+
+ This structure allows the TPM to keep track of the data and permissions to manipulate the area.
+*/
+
+typedef struct tdTPM_NV_ATTRIBUTES {
+ TPM_STRUCTURE_TAG tag; /* TPM_TAG_NV_ATTRIBUTES */
+ uint32_t attributes; /* The attribute area */
+} TPM_NV_ATTRIBUTES;
+
+/* 19.3 TPM_NV_DATA_PUBLIC rev 110
+
+ This structure represents the public description and controls on the NV area.
+
+ bReadSTClear and bWriteSTClear are volatile, in that they are set FALSE at TPM_Startup(ST_Clear).
+ bWriteDefine is persistent, in that it remains TRUE through startup.
+
+ A pcrSelect of 0 indicates that the digestAsRelease is not checked. In this case, the TPM is not
+ required to consume NVRAM space to store the digest, although it may do so. When
+ TPM_GetCapability (TPM_CAP_NV_INDEX) returns the structure, a TPM that does not store the digest
+ can return zero. A TPM that does store the digest may return either the digest or zero.
+*/
+
+typedef struct tdTPM_NV_DATA_PUBLIC {
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_NV_DATA_PUBLIC */
+ TPM12_NV_INDEX nvIndex; /* The index of the data area */
+ TPM_PCR_INFO_SHORT pcrInfoRead; /* The PCR selection that allows reading of the area */
+ TPM_PCR_INFO_SHORT pcrInfoWrite; /* The PCR selection that allows writing of the area */
+ TPM_NV_ATTRIBUTES permission; /* The permissions for manipulating the area */
+ TPM_BOOL bReadSTClear; /* Set to FALSE on each TPM_Startup(ST_Clear) and set to
+ TRUE after a ReadValuexxx with datasize of 0 */
+ TPM_BOOL bWriteSTClear; /* Set to FALSE on each TPM_Startup(ST_CLEAR) and set to
+ TRUE after a WriteValuexxx with a datasize of 0. */
+ TPM_BOOL bWriteDefine; /* Set to FALSE after TPM_NV_DefineSpace and set to TRUE
+ after a successful WriteValuexxx with a datasize of 0 */
+ uint32_t dataSize; /* The size of the data area in bytes */
+} TPM_NV_DATA_PUBLIC;
+
+#if 0
+
+/* 19.4 TPM_NV_DATA_SENSITIVE rev 101
+
+ This is an internal structure that the TPM uses to keep the actual NV data and the controls
+ regarding the area.
+*/
+
+typedef struct tdTPM_NV_DATA_SENSITIVE {
+#ifdef TPM_USE_TAG_IN_STRUCTURE
+ TPM_STRUCTURE_TAG tag; /* This SHALL be TPM_TAG_NV_DATA_SENSITIVE */
+#endif
+ TPM_NV_DATA_PUBLIC pubInfo; /* The public information regarding this area */
+ TPM_AUTHDATA authValue; /* The authorization value to manipulate the value */
+ BYTE *data; /* The data area. This MUST not contain any sensitive information as
+ the TPM does not provide any confidentiality on the data. */
+ /* NOTE Added kg */
+ TPM_DIGEST digest; /* for OSAP comparison */
+} TPM_NV_DATA_SENSITIVE;
+
+typedef struct tdTPM_NV_INDEX_ENTRIES {
+ uint32_t nvIndexCount; /* number of entries */
+ TPM_NV_DATA_SENSITIVE *tpm_nvindex_entry; /* array of TPM_NV_DATA_SENSITIVE */
+} TPM_NV_INDEX_ENTRIES;
+
+/* TPM_NV_DATA_ST
+
+ This is a cache of the the NV defined space volatile flags, used during error rollback
+*/
+
+typedef struct tdTPM_NV_DATA_ST {
+ TPM12_NV_INDEX nvIndex; /* The index of the data area */
+ TPM_BOOL bReadSTClear;
+ TPM_BOOL bWriteSTClear;
+} TPM_NV_DATA_ST;
+
+#endif
+
+/*
+ 21. Capability areas
+*/
+
+/* 21.6 TPM_CAP_VERSION_INFO rev 99
+
+ This structure is an output from a TPM_GetCapability -> TPM_CAP_VERSION_VAL request. TPM returns
+ the current version and revision of the TPM.
+
+ The specLevel and errataRev are defined in the document "Specification and File Naming
+ Conventions"
+
+ The tpmVendorID is a value unique to each vendor. It is defined in the document "TCG Vendor
+ Naming".
+
+ The vendor specific area allows the TPM vendor to provide support for vendor options. The TPM
+ vendor may define the area to the TPM vendor's needs.
+*/
+
+typedef struct tdTPM_CAP_VERSION_INFO {
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_CAP_VERSION_INFO */
+ TPM_VERSION version; /* The version and revision */
+ uint16_t specLevel; /* A number indicating the level of ordinals supported */
+ BYTE errataRev; /* A number indicating the errata version of the specification */
+ BYTE tpmVendorID[4]; /* The vendor ID unique to each TPM manufacturer. */
+ uint16_t vendorSpecificSize; /* The size of the vendor specific area */
+ BYTE vendorSpecific[MAX_COMMAND_SIZE]; /* Vendor specific information */
+} TPM_CAP_VERSION_INFO;
+
+/* 21.10 TPM_DA_ACTION_TYPE rev 100
+
+ This structure indicates the action taken when the dictionary attack mitigation logic is active,
+ when TPM_DA_STATE is TPM_DA_STATE_ACTIVE.
+*/
+
+typedef struct tdTPM_DA_ACTION_TYPE {
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DA_ACTION_TYPE */
+ uint32_t actions; /* The action taken when TPM_DA_STATE is TPM_DA_STATE_ACTIVE. */
+} TPM_DA_ACTION_TYPE;
+
+/* 21.7 TPM_DA_INFO rev 100
+
+ This structure is an output from a TPM_GetCapability -> TPM_CAP_DA_LOGIC request if
+ TPM_PERMANENT_FLAGS -> disableFullDALogicInfo is FALSE.
+
+ It returns static information describing the TPM response to authorization failures that might
+ indicate a dictionary attack and dynamic information regarding the current state of the
+ dictionary attack mitigation logic.
+*/
+
+typedef struct tdTPM_DA_INFO {
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DA_INFO */
+ TPM_DA_STATE state; /* Dynamic. The actual state of the dictionary attack mitigation
+ logic. See 21.9. */
+ uint16_t currentCount; /* Dynamic. The actual count of the authorization failure counter
+ for the selected entity type */
+ uint16_t thresholdCount; /* Static. Dictionary attack mitigation threshold count for the
+ selected entity type */
+ TPM_DA_ACTION_TYPE actionAtThreshold; /* Static Action of the TPM when currentCount passes
+ thresholdCount. See 21.10. */
+ uint32_t actionDependValue; /* Dynamic. Action being taken when the dictionary attack
+ mitigation logic is active. E.g., when actionAtThreshold is
+ TPM_DA_ACTION_TIMEOUT, this is the lockout time remaining in
+ seconds. */
+ uint32_t vendorDataSize;
+ uint8_t vendorData[2048]; /* Vendor specific data field */
+} TPM_DA_INFO;
+
+/* 21.8 TPM_DA_INFO_LIMITED rev 100
+
+ This structure is an output from a TPM_GetCapability -> TPM_CAP_DA_LOGIC request if
+ TPM_PERMANENT_FLAGS -> disableFullDALogicInfo is TRUE.
+
+ It returns static information describing the TPM response to authorization failures that might
+ indicate a dictionary attack and dynamic information regarding the current state of the
+ dictionary attack mitigation logic. This structure omits information that might aid an attacker.
+*/
+
+typedef struct tdTPM_DA_INFO_LIMITED {
+ TPM_STRUCTURE_TAG tag; /* MUST be TPM_TAG_DA_INFO_LIMITED */
+ TPM_DA_STATE state; /* Dynamic. The actual state of the dictionary attack mitigation
+ logic. See 21.9. */
+ TPM_DA_ACTION_TYPE actionAtThreshold; /* Static Action of the TPM when currentCount passes
+ thresholdCount. See 21.10. */
+ uint32_t vendorDataSize;
+ uint8_t vendorData[2048]; /* Vendor specific data field */
+} TPM_DA_INFO_LIMITED;
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmtypes12.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmtypes12.h
new file mode 100644
index 000000000..0b1ed083a
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tpmtypes12.h
@@ -0,0 +1,148 @@
+/********************************************************************************/
+/* */
+/* TPM Types */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: tpmtypes12.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2006, 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TPMTYPES12_H
+#define TPMTYPES12_H
+
+#include <stdint.h>
+
+#ifdef TPM_WINDOWS
+#include <winsock2.h>
+#include <windows.h>
+#endif
+#if defined (TPM_POSIX) || defined (TPM_SYSTEM_P)
+#include <netinet/in.h> /* for byte order conversions */
+#endif
+
+#include <ibmtss/BaseTypes.h>
+
+/* 2.2.1 Basic data types rev 87 */
+//typedef unsigned char BYTE; /* Basic byte used to transmit all character fields. */
+typedef unsigned char TPM_BOOL; /* TRUE/FALSE field. TRUE = 0x01, FALSE = 0x00 Use TPM_BOOL
+ because MS VC++ defines BOOL on Windows */
+
+/* 2.2.2 Boolean types rev 107 */
+
+#undef TRUE
+#define TRUE 0x01 /* Assertion */
+#undef FALSE
+#define FALSE 0x00 /* Contradiction */
+
+/* 2.2.3 Helper redefinitions rev 101
+
+ The following definitions are to make the definitions more explicit and easier to read.
+
+ NOTE: They cannot be changed without breaking the serialization.
+*/
+
+typedef BYTE TPM_AUTH_DATA_USAGE; /* Indicates the conditions where it is required that
+ authorization be presented. */
+typedef BYTE TPM_PAYLOAD_TYPE; /* The information as to what the payload is in an encrypted
+ structure */
+typedef BYTE TPM_VERSION_BYTE; /* The version info breakdown */
+typedef BYTE TPM_DA_STATE; /* The state of the dictionary attack mitigation logic */
+
+/* added kgold */
+typedef BYTE TPM_ENT_TYPE; /* LSB of TPM_ENTITY_TYPE */
+typedef BYTE TPM_ADIP_ENC_SCHEME; /* MSB of TPM_ENTITY_TYPE */
+
+typedef uint16_t TPM_PROTOCOL_ID; /* The protocol in use. */
+typedef uint16_t TPM_STARTUP_TYPE; /* Indicates the start state. */
+typedef uint16_t TPM_ENC_SCHEME; /* The definition of the encryption scheme. */
+typedef uint16_t TPM_SIG_SCHEME; /* The definition of the signature scheme. */
+typedef uint16_t TPM_MIGRATE_SCHEME; /* The definition of the migration scheme */
+typedef uint16_t TPM_PHYSICAL_PRESENCE; /* Sets the state of the physical presence mechanism. */
+typedef uint16_t TPM_ENTITY_TYPE; /* Indicates the types of entity that are supported by the
+ TPM. */
+typedef uint16_t TPM_KEY_USAGE; /* Indicates the permitted usage of the key. */
+typedef uint16_t TPM_EK_TYPE; /* The type of asymmetric encrypted structure in use by the
+ endorsement key */
+typedef uint16_t TPM_STRUCTURE_TAG; /* The tag for the structure */
+typedef uint16_t TPM_PLATFORM_SPECIFIC; /* The platform specific spec to which the information
+ relates to */
+typedef uint32_t TPM_COMMAND_CODE; /* The command ordinal. */
+typedef uint32_t TPM_CAPABILITY_AREA; /* Identifies a TPM capability area. */
+typedef uint32_t TPM_KEY_FLAGS; /* Indicates information regarding a key. */
+//typedef uint32_t TPM_ALGORITHM_ID; /* Indicates the type of algorithm. */
+//typedef uint32_t TPM_MODIFIER_INDICATOR; /* The locality modifier */
+typedef uint32_t TPM_ACTUAL_COUNT; /* The actual number of a counter. */
+typedef uint32_t TPM_TRANSPORT_ATTRIBUTES; /* Attributes that define what options are in use
+ for a transport session */
+typedef uint32_t TPM_AUTHHANDLE; /* Handle to an authorization session */
+typedef uint32_t TPM_DIRINDEX; /* Index to a DIR register */
+typedef uint32_t TPM_KEY_HANDLE; /* The area where a key is held assigned by the TPM. */
+typedef uint32_t TPM_PCRINDEX; /* Index to a PCR register */
+typedef uint32_t TPM_RESULT; /* The return code from a function */
+typedef uint32_t TPM_RESOURCE_TYPE; /* The types of resources that a TPM may have using internal
+ resources */
+typedef uint32_t TPM_KEY_CONTROL; /* Allows for controlling of the key when loaded and how to
+ handle TPM_Startup issues */
+typedef uint32_t TPM12_NV_INDEX; /* The index into the NV storage area */
+typedef uint32_t TPM_FAMILY_ID; /* The family ID. Families ID's are automatically assigned a
+ sequence number by the TPM. A trusted process can set the
+ FamilyID value in an individual row to zero, which
+ invalidates that row. The family ID resets to zero on
+ each change of TPM Owner. */
+typedef uint32_t TPM_FAMILY_VERIFICATION; /* A value used as a label for the most recent
+ verification of this family. Set to zero when not
+ in use. */
+typedef uint32_t TPM_STARTUP_EFFECTS; /* How the TPM handles var */
+typedef uint32_t TPM_SYM_MODE; /* The mode of a symmetric encryption */
+typedef uint32_t TPM_FAMILY_FLAGS; /* The family flags */
+typedef uint32_t TPM_DELEGATE_INDEX; /* The index value for the delegate NV table */
+typedef uint32_t TPM_CMK_DELEGATE; /* The restrictions placed on delegation of CMK
+ commands */
+typedef uint32_t TPM_COUNT_ID; /* The ID value of a monotonic counter */
+typedef uint32_t TPM_REDIT_COMMAND; /* A command to execute */
+typedef uint32_t TPM_TRANSHANDLE; /* A transport session handle */
+//typedef uint32_t TPM_HANDLE; /* A generic handle could be key, transport etc. */
+typedef uint32_t TPM_FAMILY_OPERATION; /* What operation is happening */
+#ifdef TPM_VTPM
+typedef uint32_t TPM_INSTANCE_HANDLE; /* Handle to a virtual TPM instance */
+typedef uint32_t TPM_CREATION_MASK; /* TPM_CreateInstance creation mask */
+#endif
+
+/* Not in specification */
+
+typedef uint16_t TPM_TAG; /* The command and response tags */
+
+typedef unsigned char * TPM_SYMMETRIC_KEY_TOKEN; /* abstract symmetric key token */
+typedef unsigned char * TPM_BIGNUM; /* abstract bignum */
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tss.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tss.h
new file mode 100644
index 000000000..36816d6d4
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tss.h
@@ -0,0 +1,112 @@
+/********************************************************************************/
+/* */
+/* TSS Primary API */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2019. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TSS_H
+#define TSS_H
+
+#include <ibmtss/TPM_Types.h>
+#include <ibmtss/Parameters.h>
+#include <ibmtss/Parameters12.h>
+
+/* include this as a convenience to applications */
+#include <ibmtss/tsserror.h>
+#include <ibmtss/tssprint.h>
+
+typedef struct TSS_CONTEXT TSS_CONTEXT;
+
+#define TPM_TRACE_LEVEL 1
+#define TPM_DATA_DIR 2
+#define TPM_COMMAND_PORT 3
+#define TPM_PLATFORM_PORT 4
+#define TPM_SERVER_NAME 5
+#define TPM_INTERFACE_TYPE 6
+#define TPM_DEVICE 7
+#define TPM_ENCRYPT_SESSIONS 8
+#define TPM_SERVER_TYPE 9
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* extra parameters as required */
+
+ /* TPM 2.0 */
+
+ typedef struct {
+ const char *bindPassword;
+ TPM2B_DIGEST salt;
+ } StartAuthSession_Extra;
+
+ typedef union {
+ StartAuthSession_Extra StartAuthSession;
+ } EXTRA_PARAMETERS;
+
+ /* TPM 1.2 */
+
+ typedef struct {
+ const char *usagePassword;
+ } OSAP_Extra;
+
+ typedef union {
+ OSAP_Extra OSAP;
+ } EXTRA12_PARAMETERS;
+
+ LIB_EXPORT
+ TPM_RC TSS_Create(TSS_CONTEXT **tssContext);
+
+ LIB_EXPORT
+ TPM_RC TSS_Delete(TSS_CONTEXT *tssContext);
+
+ LIB_EXPORT
+ TPM_RC TSS_Execute(TSS_CONTEXT *tssContext,
+ RESPONSE_PARAMETERS *out,
+ COMMAND_PARAMETERS *in,
+ EXTRA_PARAMETERS *extra,
+ TPM_CC commandCode,
+ ...);
+
+ LIB_EXPORT
+ TPM_RC TSS_SetProperty(TSS_CONTEXT *tssContext,
+ int property,
+ const char *value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscrypto.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscrypto.h
new file mode 100644
index 000000000..5bf559106
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscrypto.h
@@ -0,0 +1,164 @@
+/********************************************************************************/
+/* */
+/* TSS Library Dependent Crypto Support */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2019. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API should be stable, but is less guaranteed.
+
+ It is useful for applications that need some basic crypto functions.
+*/
+
+#ifndef TSSCRYPTO_H
+#define TSSCRYPTO_H
+
+#include <stdint.h>
+#include <stdio.h>
+
+#ifndef TPM_TSS_NORSA
+#include <openssl/rsa.h>
+#endif
+#ifndef TPM_TSS_NOECC
+#include <openssl/ec.h>
+#endif
+
+#include <ibmtss/tss.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ LIB_EXPORT
+ TPM_RC TSS_Crypto_Init(void);
+
+ LIB_EXPORT
+ TPM_RC TSS_Hash_Generate_valist(TPMT_HA *digest,
+ va_list ap);
+ LIB_EXPORT
+ TPM_RC TSS_HMAC_Generate_valist(TPMT_HA *digest,
+ const TPM2B_KEY *hmacKey,
+ va_list ap);
+ LIB_EXPORT void TSS_XOR(unsigned char *out,
+ const unsigned char *in1,
+ const unsigned char *in2,
+ size_t length);
+ LIB_EXPORT
+ TPM_RC TSS_RandBytes(unsigned char *buffer, uint32_t size);
+
+ LIB_EXPORT
+ TPM_RC TSS_RSA_padding_add_PKCS1_OAEP(unsigned char *em, uint32_t emLen,
+ const unsigned char *from, uint32_t fLen,
+ const unsigned char *p,
+ int plen,
+ TPMI_ALG_HASH halg);
+#ifndef TPM_TSS_NORSA
+ LIB_EXPORT
+ void TSS_RsaFree(void *rsaKey);
+
+ LIB_EXPORT
+ TPM_RC TSS_RSAPublicEncrypt(unsigned char* encrypt_data,
+ size_t encrypt_data_size,
+ const unsigned char *decrypt_data,
+ size_t decrypt_data_size,
+ unsigned char *narr,
+ uint32_t nbytes,
+ unsigned char *earr,
+ uint32_t ebytes,
+ unsigned char *p,
+ int pl,
+ TPMI_ALG_HASH halg);
+ /*
+ deprecated OpenSSL specific functions
+ */
+#ifndef TPM_TSS_NO_OPENSSL
+
+ LIB_EXPORT
+ TPM_RC TSS_RsaNew(void **rsaKey);
+
+ LIB_EXPORT
+ TPM_RC TSS_RSAGeneratePublicToken(RSA **rsa_pub_key, /* freed by caller */
+ const unsigned char *narr, /* public modulus */
+ uint32_t nbytes,
+ const unsigned char *earr, /* public exponent */
+ uint32_t ebytes);
+#endif /* TPM_TSS_NO_OPENSSL */
+
+ /* crypto library independent */
+ LIB_EXPORT
+ TPM_RC TSS_RSAGeneratePublicTokenI(void **rsa_pub_key, /* freed by caller */
+ const unsigned char *narr, /* public modulus */
+ uint32_t nbytes,
+ const unsigned char *earr, /* public exponent */
+ uint32_t ebytes);
+
+#endif
+#ifndef TPM_TSS_NOECC
+ TPM_RC TSS_ECC_Salt(TPM2B_DIGEST *salt,
+ TPM2B_ENCRYPTED_SECRET *encryptedSalt,
+ TPMT_PUBLIC *publicArea);
+
+#endif
+ TPM_RC TSS_AES_GetEncKeySize(size_t *tssSessionEncKeySize);
+ TPM_RC TSS_AES_GetDecKeySize(size_t *tssSessionDecKeySize);
+ TPM_RC TSS_AES_KeyGenerate(void *tssSessionEncKey,
+ void *tssSessionDecKey);
+ TPM_RC TSS_AES_Encrypt(void *tssSessionEncKey,
+ unsigned char **encrypt_data,
+ uint32_t *encrypt_length,
+ const unsigned char *decrypt_data,
+ uint32_t decrypt_length);
+ TPM_RC TSS_AES_Decrypt(void *tssSessionDecKey,
+ unsigned char **decrypt_data,
+ uint32_t *decrypt_length,
+ const unsigned char *encrypt_data,
+ uint32_t encrypt_length);
+ TPM_RC TSS_AES_EncryptCFB(uint8_t *dOut,
+ uint32_t keySizeInBits,
+ uint8_t *key,
+ uint8_t *iv,
+ uint32_t dInSize,
+ uint8_t *dIn);
+ TPM_RC TSS_AES_DecryptCFB(uint8_t *dOut,
+ uint32_t keySizeInBits,
+ uint8_t *key,
+ uint8_t *iv,
+ uint32_t dInSize,
+ uint8_t *dIn);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscryptoh.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscryptoh.h
new file mode 100644
index 000000000..1628d7746
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsscryptoh.h
@@ -0,0 +1,100 @@
+/********************************************************************************/
+/* */
+/* TSS Library Independent Crypto Support */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2019. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API should be stable, but is less guaranteed.
+
+ It is useful for applications that need some basic crypto functions.
+*/
+
+#ifndef TSSCRYPTOH_H
+#define TSSCRYPTOH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ LIB_EXPORT
+ uint16_t TSS_GetDigestBlockSize(TPM_ALG_ID hashAlg)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+
+ LIB_EXPORT
+ TPM_RC TSS_Hash_Generate(TPMT_HA *digest,
+ ...);
+
+ LIB_EXPORT
+ TPM_RC TSS_HMAC_Generate(TPMT_HA *digest,
+ const TPM2B_KEY *hmacKey,
+ ...);
+ LIB_EXPORT
+ TPM_RC TSS_HMAC_Verify(TPMT_HA *expect,
+ const TPM2B_KEY *hmacKey,
+ UINT32 sizeInBytes,
+ ...);
+ LIB_EXPORT
+ TPM_RC TSS_KDFA(uint8_t *keyStream,
+ TPM_ALG_ID hashAlg,
+ const TPM2B *key,
+ const char *label,
+ const TPM2B *contextU,
+ const TPM2B *contextV,
+ uint32_t sizeInBits);
+
+ LIB_EXPORT
+ TPM_RC TSS_KDFE(uint8_t *keyStream,
+ TPM_ALG_ID hashAlg,
+ const TPM2B *key,
+ const char *label,
+ const TPM2B *contextU,
+ const TPM2B *contextV,
+ uint32_t sizeInBits);
+
+ uint16_t TSS_Sym_GetBlockSize(TPM_ALG_ID symmetricAlg,
+ uint16_t keySizeInBits)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror.h
new file mode 100644
index 000000000..a53074416
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror.h
@@ -0,0 +1,115 @@
+/********************************************************************************/
+/* */
+/* TSS Error Codes */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2019. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a public header. That defines TSS error codes.
+
+ tss.h includes it for convenience.
+*/
+
+#ifndef TSSERROR_H
+#define TSSERROR_H
+
+/* the base for these errors is 11 << 16 = 000bxxxx */
+
+#define TSS_RC_OUT_OF_MEMORY 0x000b0001 /* Out of memory,(malloc failed) */
+#define TSS_RC_ALLOC_INPUT 0x000b0002 /* The input to an allocation is not NULL */
+#define TSS_RC_MALLOC_SIZE 0x000b0003 /* The malloc size is too large or zero */
+#define TSS_RC_INSUFFICIENT_BUFFER 0x000b0004 /* A buffer was insufficient for a copy */
+#define TSS_RC_BAD_PROPERTY 0x000b0005 /* The property parameter is out of range */
+#define TSS_RC_BAD_PROPERTY_VALUE 0x000b0006 /* The property value is invalid */
+#define TSS_RC_INSUPPORTED_INTERFACE 0x000b0007 /* The TPM interface type is not supported */
+#define TSS_RC_NO_CONNECTION 0x000b0008 /* Failure connecting to lower layer */
+#define TSS_RC_BAD_CONNECTION 0x000b0009 /* Failure communicating with lower layer */
+#define TSS_RC_MALFORMED_RESPONSE 0x000b000a /* A response packet was fundamentally malformed */
+#define TSS_RC_NULL_PARAMETER 0x000b000b /* A required parameter was NULL */
+#define TSS_RC_NOT_IMPLEMENTED 0x000b000c /* TSS function is not implemented */
+#define TSS_RC_BAD_READ_VALUE 0x000b000d /* Actual read value different from expected */
+#define TSS_RC_FILE_OPEN 0x000b0010 /* The file could not be opened */
+#define TSS_RC_FILE_SEEK 0x000b0011 /* A file seek failed */
+#define TSS_RC_FILE_FTELL 0x000b0012 /* A file ftell failed */
+#define TSS_RC_FILE_READ 0x000b0013 /* A file read failed */
+#define TSS_RC_FILE_CLOSE 0x000b0014 /* A file close failed */
+#define TSS_RC_FILE_WRITE 0x000b0015 /* A file write failed */
+#define TSS_RC_FILE_REMOVE 0x000b0016 /* A file remove failed */
+#define TSS_RC_RNG_FAILURE 0x000b0020 /* Random number generator failed */
+#define TSS_RC_BAD_PWAP_NONCE 0x000b0030 /* Bad PWAP response nonce */
+#define TSS_RC_BAD_PWAP_ATTRIBUTES 0x000b0031 /* Bad PWAP response attributes */
+#define TSS_RC_BAD_PWAP_HMAC 0x000b0032 /* Bad PWAP response HMAC */
+#define TSS_RC_NAME_NOT_IMPLEMENTED 0x000b0040 /* Name calculation not implemented for handle type */
+#define TSS_RC_MALFORMED_NV_PUBLIC 0x000b0041 /* The NV public structure does not match the name */
+#define TSS_RC_NAME_FILENAME 0x000b0042 /* The name filename function has inconsistent arguments */
+#define TSS_RC_MALFORMED_PUBLIC 0x000b0043 /* The public structure does not match the name */
+#define TSS_RC_DECRYPT_SESSIONS 0x000b0050 /* More than one command decrypt session */
+#define TSS_RC_ENCRYPT_SESSIONS 0x000b0051 /* More than one response encrypt session */
+#define TSS_RC_NO_DECRYPT_PARAMETER 0x000b0052 /* Command has no decrypt parameter */
+#define TSS_RC_NO_ENCRYPT_PARAMETER 0x000b0053 /* Response has no encrypt parameter */
+#define TSS_RC_BAD_DECRYPT_ALGORITHM 0x000b0054 /* Session had an unimplemented decrypt symmetric algorithm */
+#define TSS_RC_BAD_ENCRYPT_ALGORITHM 0x000b0055 /* Session had an unimplemented encrypt symmetric algorithm */
+#define TSS_RC_AES_ENCRYPT_FAILURE 0x000b0056 /* AES encryption failed */
+#define TSS_RC_AES_DECRYPT_FAILURE 0x000b0057 /* AES decryption failed */
+#define TSS_RC_BAD_ENCRYPT_SIZE 0x000b0058 /* Parameter encryption size mismatch */
+#define TSS_RC_AES_KEYGEN_FAILURE 0x000b0059 /* AES key generation failed */
+#define TSS_RC_SESSION_NUMBER 0x000b005a /* session number out of range */
+#define TSS_RC_BAD_SALT_KEY 0x000b0060 /* tpmKey is unsuitable for salt */
+#define TSS_RC_KDFA_FAILED 0x000b0070 /* KDFa function failed */
+#define TSS_RC_HMAC 0x000b0071 /* An HMAC calculation failed */
+#define TSS_RC_HMAC_SIZE 0x000b0072 /* Response HMAC is the wrong size */
+#define TSS_RC_HMAC_VERIFY 0x000b0073 /* HMAC does not verify */
+#define TSS_RC_BAD_HASH_ALGORITHM 0x000b0074 /* Unimplemented hash algorithm */
+#define TSS_RC_HASH 0x000b0075 /* A hash calculation failed */
+#define TSS_RC_RSA_KEY_CONVERT 0x000b0076 /* RSA key conversion failed */
+#define TSS_RC_RSA_PADDING 0x000b0077 /* RSA add padding failed */
+#define TSS_RC_RSA_ENCRYPT 0x000b0078 /* RSA public encrypt failed */
+#define TSS_RC_BIGNUM 0x000b0079 /* BIGNUM operation failed */
+#define TSS_RC_RSA_SIGNATURE 0x000b007a /* RSA signature is bad */
+#define TSS_RC_EC_SIGNATURE 0x000b007b /* EC signature is bad */
+#define TSS_RC_EC_KEY_CONVERT 0x000b007c /* EC key conversion failed */
+#define TSS_RC_BAD_SIGNATURE_ALGORITHM 0x000b007d /* Unimplemented signature algorithm */
+#define TSS_RC_X509_ERROR 0x000b007e /* X509 parse error */
+#define TSS_RC_PEM_ERROR 0x000b007f /* PEM parse error */
+#define TSS_RC_COMMAND_UNIMPLEMENTED 0x000b0080 /* Unimplemented command */
+#define TSS_RC_IN_PARAMETER 0x000b0081 /* Bad in parameter to TSS_Execute */
+#define TSS_RC_OUT_PARAMETER 0x000b0082 /* Bad out parameter to TSS_Execute */
+#define TSS_RC_BAD_HANDLE_NUMBER 0x000b0083 /* Bad handle number for this command */
+#define TSS_RC_KDFE_FAILED 0x000b0084 /* KDFe function failed */
+#define TSS_RC_EC_EPHEMERAL_FAILURE 0x000b0085 /* Failed while making or using EC ephemeral key */
+#define TSS_RC_FAIL 0x000b0086 /* TSS internal failure */
+#define TSS_RC_NO_SESSION_SLOT 0x000b0090 /* TSS context has no session slot for handle */
+#define TSS_RC_NO_OBJECTPUBLIC_SLOT 0x000b0091 /* TSS context has no object public slot for handle */
+#define TSS_RC_NO_NVPUBLIC_SLOT 0x000b0092 /* TSS context has no NV public slot for handle */
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror12.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror12.h
new file mode 100644
index 000000000..46d2e3f67
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsserror12.h
@@ -0,0 +1,248 @@
+/********************************************************************************/
+/* */
+/* TPM 1.2 Error Response */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2006, 2010. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TPM_ERROR_H
+#define TPM_ERROR_H
+
+/* 16. Return codes rev 99
+
+ The TPM has five types of return code. One indicates successful operation and four indicate
+ failure. TPM_SUCCESS (00000000) indicates successful execution. The failure reports are:
+ TPM defined fatal errors (00000001 to 000003FF), vendor defined fatal errors (00000400 to
+ 000007FF), TPM defined non-fatal errors (00000800 to 00000BFF), and vendor defined
+ non-fatal errors (00000C00 to 00000FFF).
+
+ The range of vendor defined non-fatal errors was determined by the TSS-WG, which defined
+ XXXX YCCC with XXXX as OS specific and Y defining the TSS SW stack layer (0: TPM layer)
+
+ All failure cases return only a non-authenticated fixed set of information. This is because
+ the failure may have been due to authentication or other factors, and there is no possibility
+ of producing an authenticated response.
+
+ Fatal errors also terminate any authorization sessions. This is a result of returning only the
+ error code, as there is no way to return the nonces necessary to maintain an authorization
+ session. Non-fatal errors do not terminate authorization sessions.
+
+ The return code MUST use the following base. The return code MAY be TCG defined or vendor
+ defined. */
+
+#define TPM_BASE 0x0 /* The start of TPM return codes */
+#define TPM_SUCCESS TPM_BASE /* Successful completion of the operation */
+#define TPM_VENDOR_ERROR TPM_Vendor_Specific32 /* Mask to indicate that the error code is
+ vendor specific for vendor specific
+ commands. */
+#define TPM_NON_FATAL 0x00000800 /* Mask to indicate that the error code is a non-fatal
+ failure. */
+
+/* TPM-defined fatal error codes */
+
+#define TPM_AUTHFAIL TPM_BASE + 1 /* Authentication failed */
+#define TPM_BADINDEX TPM_BASE + 2 /* The index to a PCR, DIR or other register is
+ incorrect */
+#define TPM_BAD_PARAMETER TPM_BASE + 3 /* One or more parameter is bad */
+#define TPM_AUDITFAILURE TPM_BASE + 4 /* An operation completed successfully but the auditing
+ of that operation failed. */
+#define TPM_CLEAR_DISABLED TPM_BASE + 5 /* The clear disable flag is set and all clear
+ operations now require physical access */
+#define TPM_DEACTIVATED TPM_BASE + 6 /* The TPM is deactivated */
+#define TPM_DISABLED TPM_BASE + 7 /* The TPM is disabled */
+#define TPM_DISABLED_CMD TPM_BASE + 8 /* The target command has been disabled */
+#define TPM_FAIL TPM_BASE + 9 /* The operation failed */
+#define TPM_BAD_ORDINAL TPM_BASE + 10 /* The ordinal was unknown or inconsistent */
+#define TPM_INSTALL_DISABLED TPM_BASE + 11 /* The ability to install an owner is disabled */
+#define TPM_INVALID_KEYHANDLE TPM_BASE + 12 /* The key handle presented was invalid */
+#define TPM_KEYNOTFOUND TPM_BASE + 13 /* The target key was not found */
+#define TPM_INAPPROPRIATE_ENC TPM_BASE + 14 /* Unacceptable encryption scheme */
+#define TPM_MIGRATEFAIL TPM_BASE + 15 /* Migration authorization failed */
+#define TPM_INVALID_PCR_INFO TPM_BASE + 16 /* PCR information could not be interpreted */
+#define TPM_NOSPACE TPM_BASE + 17 /* No room to load key. */
+#define TPM_NOSRK TPM_BASE + 18 /* There is no SRK set */
+#define TPM_NOTSEALED_BLOB TPM_BASE + 19 /* An encrypted blob is invalid or was not created by
+ this TPM */
+#define TPM_OWNER_SET TPM_BASE + 20 /* There is already an Owner */
+#define TPM_RESOURCES TPM_BASE + 21 /* The TPM has insufficient internal resources to
+ perform the requested action. */
+#define TPM_SHORTRANDOM TPM_BASE + 22 /* A random string was too short */
+#define TPM_SIZE TPM_BASE + 23 /* The TPM does not have the space to perform the
+ operation. */
+#define TPM_WRONGPCRVAL TPM_BASE + 24 /* The named PCR value does not match the current PCR
+ value. */
+#define TPM_BAD_PARAM_SIZE TPM_BASE + 25 /* The paramSize argument to the command has the
+ incorrect value */
+#define TPM_SHA_THREAD TPM_BASE + 26 /* There is no existing SHA-1 thread. */
+#define TPM_SHA_ERROR TPM_BASE + 27 /* The calculation is unable to proceed because the
+ existing SHA-1 thread has already encountered an
+ error. */
+#define TPM_FAILEDSELFTEST TPM_BASE + 28 /* Self-test has failed and the TPM has shutdown. */
+#define TPM_AUTH2FAIL TPM_BASE + 29 /* The authorization for the second key in a 2 key
+ function failed authorization */
+#define TPM_BADTAG TPM_BASE + 30 /* The tag value sent to for a command is invalid */
+#define TPM_IOERROR TPM_BASE + 31 /* An IO error occurred transmitting information to
+ the TPM */
+#define TPM_ENCRYPT_ERROR TPM_BASE + 32 /* The encryption process had a problem. */
+#define TPM_DECRYPT_ERROR TPM_BASE + 33 /* The decryption process did not complete. */
+#define TPM_INVALID_AUTHHANDLE TPM_BASE + 34 /* An invalid handle was used. */
+#define TPM_NO_ENDORSEMENT TPM_BASE + 35 /* The TPM does not a EK installed */
+#define TPM_INVALID_KEYUSAGE TPM_BASE + 36 /* The usage of a key is not allowed */
+#define TPM_WRONG_ENTITYTYPE TPM_BASE + 37 /* The submitted entity type is not allowed */
+#define TPM_INVALID_POSTINIT TPM_BASE + 38 /* The command was received in the wrong sequence
+ relative to TPM_Init and a subsequent TPM_Startup
+ */
+#define TPM_INAPPROPRIATE_SIG TPM_BASE + 39 /* Signed data cannot include additional DER
+ information */
+#define TPM_BAD_KEY_PROPERTY TPM_BASE + 40 /* The key properties in TPM_KEY_PARMs are not
+ supported by this TPM */
+#define TPM_BAD_MIGRATION TPM_BASE + 41 /* The migration properties of this key are incorrect.
+ */
+#define TPM_BAD_SCHEME TPM_BASE + 42 /* The signature or encryption scheme for this key is
+ incorrect or not permitted in this situation. */
+#define TPM_BAD_DATASIZE TPM_BASE + 43 /* The size of the data (or blob) parameter is bad or
+ inconsistent with the referenced key */
+#define TPM_BAD_MODE TPM_BASE + 44 /* A mode parameter is bad, such as capArea or
+ subCapArea for TPM_GetCapability, physicalPresence
+ parameter for TPM_PhysicalPresence, or
+ migrationType for TPM_CreateMigrationBlob. */
+#define TPM_BAD_PRESENCE TPM_BASE + 45 /* Either the physicalPresence or physicalPresenceLock
+ bits have the wrong value */
+#define TPM_BAD_VERSION TPM_BASE + 46 /* The TPM cannot perform this version of the
+ capability */
+#define TPM_NO_WRAP_TRANSPORT TPM_BASE + 47 /* The TPM does not allow for wrapped transport
+ sessions */
+#define TPM_AUDITFAIL_UNSUCCESSFUL TPM_BASE + 48 /* TPM audit construction failed and the
+ underlying command was returning a failure
+ code also */
+#define TPM_AUDITFAIL_SUCCESSFUL TPM_BASE + 49 /* TPM audit construction failed and the underlying
+ command was returning success */
+#define TPM_NOTRESETABLE TPM_BASE + 50 /* Attempt to reset a PCR register that does not have
+ the resettable attribute */
+#define TPM_NOTLOCAL TPM_BASE + 51 /* Attempt to reset a PCR register that requires
+ locality and locality modifier not part of command
+ transport */
+#define TPM_BAD_TYPE TPM_BASE + 52 /* Make identity blob not properly typed */
+#define TPM_INVALID_RESOURCE TPM_BASE + 53 /* When saving context identified resource type does
+ not match actual resource */
+#define TPM_NOTFIPS TPM_BASE + 54 /* The TPM is attempting to execute a command only
+ available when in FIPS mode */
+#define TPM_INVALID_FAMILY TPM_BASE + 55 /* The command is attempting to use an invalid family
+ ID */
+#define TPM_NO_NV_PERMISSION TPM_BASE + 56 /* The permission to manipulate the NV storage is not
+ available */
+#define TPM_REQUIRES_SIGN TPM_BASE + 57 /* The operation requires a signed command */
+#define TPM_KEY_NOTSUPPORTED TPM_BASE + 58 /* Wrong operation to load an NV key */
+#define TPM_AUTH_CONFLICT TPM_BASE + 59 /* NV_LoadKey blob requires both owner and blob
+ authorization */
+#define TPM_AREA_LOCKED TPM_BASE + 60 /* The NV area is locked and not writable */
+#define TPM_BAD_LOCALITY TPM_BASE + 61 /* The locality is incorrect for the attempted
+ operation */
+#define TPM_READ_ONLY TPM_BASE + 62 /* The NV area is read only and can't be written to
+ */
+#define TPM_PER_NOWRITE TPM_BASE + 63 /* There is no protection on the write to the NV area
+ */
+#define TPM_FAMILYCOUNT TPM_BASE + 64 /* The family count value does not match */
+#define TPM_WRITE_LOCKED TPM_BASE + 65 /* The NV area has already been written to */
+#define TPM_BAD_ATTRIBUTES TPM_BASE + 66 /* The NV area attributes conflict */
+#define TPM_INVALID_STRUCTURE TPM_BASE + 67 /* The structure tag and version are invalid or
+ inconsistent */
+#define TPM_KEY_OWNER_CONTROL TPM_BASE + 68 /* The key is under control of the TPM Owner and can
+ only be evicted by the TPM Owner. */
+#define TPM_BAD_COUNTER TPM_BASE + 69 /* The counter handle is incorrect */
+#define TPM_NOT_FULLWRITE TPM_BASE + 70 /* The write is not a complete write of the area */
+#define TPM_CONTEXT_GAP TPM_BASE + 71 /* The gap between saved context counts is too large
+ */
+#define TPM_MAXNVWRITES TPM_BASE + 72 /* The maximum number of NV writes without an owner
+ has been exceeded */
+#define TPM_NOOPERATOR TPM_BASE + 73 /* No operator authorization value is set */
+#define TPM_RESOURCEMISSING TPM_BASE + 74 /* The resource pointed to by context is not loaded
+ */
+#define TPM_DELEGATE_LOCK TPM_BASE + 75 /* The delegate administration is locked */
+#define TPM_DELEGATE_FAMILY TPM_BASE + 76 /* Attempt to manage a family other then the delegated
+ family */
+#define TPM_DELEGATE_ADMIN TPM_BASE + 77 /* Delegation table management not enabled */
+#define TPM_TRANSPORT_NOTEXCLUSIVE TPM_BASE + 78 /* There was a command executed outside of an
+ exclusive transport session */
+#define TPM_OWNER_CONTROL TPM_BASE + 79 /* Attempt to context save a owner evict controlled
+ key */
+#define TPM_DAA_RESOURCES TPM_BASE + 80 /* The DAA command has no resources available to
+ execute the command */
+#define TPM_DAA_INPUT_DATA0 TPM_BASE + 81 /* The consistency check on DAA parameter inputData0
+ has failed. */
+#define TPM_DAA_INPUT_DATA1 TPM_BASE + 82 /* The consistency check on DAA parameter inputData1
+ has failed. */
+#define TPM_DAA_ISSUER_SETTINGS TPM_BASE + 83 /* The consistency check on DAA_issuerSettings has
+ failed. */
+#define TPM_DAA_TPM_SETTINGS TPM_BASE + 84 /* The consistency check on DAA_tpmSpecific has
+ failed. */
+#define TPM_DAA_STAGE TPM_BASE + 85 /* The atomic process indicated by the submitted DAA
+ command is not the expected process. */
+#define TPM_DAA_ISSUER_VALIDITY TPM_BASE + 86 /* The issuer's validity check has detected an
+ inconsistency */
+#define TPM_DAA_WRONG_W TPM_BASE + 87 /* The consistency check on w has failed. */
+#define TPM_BAD_HANDLE TPM_BASE + 88 /* The handle is incorrect */
+#define TPM_BAD_DELEGATE TPM_BASE + 89 /* Delegation is not correct */
+#define TPM_BADCONTEXT TPM_BASE + 90 /* The context blob is invalid */
+#define TPM_TOOMANYCONTEXTS TPM_BASE + 91 /* Too many contexts held by the TPM */
+#define TPM_MA_TICKET_SIGNATURE TPM_BASE + 92 /* Migration authority signature validation failure
+ */
+#define TPM_MA_DESTINATION TPM_BASE + 93 /* Migration destination not authenticated */
+#define TPM_MA_SOURCE TPM_BASE + 94 /* Migration source incorrect */
+#define TPM_MA_AUTHORITY TPM_BASE + 95 /* Incorrect migration authority */
+#define TPM_PERMANENTEK TPM_BASE + 97 /* Attempt to revoke the EK and the EK is not revocable */
+#define TPM_BAD_SIGNATURE TPM_BASE + 98 /* Bad signature of CMK ticket */
+#define TPM_NOCONTEXTSPACE TPM_BASE + 99 /* There is no room in the context list for additional
+ contexts */
+
+/* As error codes are added here, they should also be added to lib/miscfunc.c */
+
+/* TPM-defined non-fatal errors */
+
+#define TPM_RETRY TPM_BASE + TPM_NON_FATAL /* The TPM is too busy to respond to the
+ command immediately, but the command
+ could be submitted at a later time */
+#define TPM_NEEDS_SELFTEST TPM_BASE + TPM_NON_FATAL + 1 /* TPM_ContinueSelfTest has has not
+ been run*/
+#define TPM_DOING_SELFTEST TPM_BASE + TPM_NON_FATAL + 2 /* The TPM is currently executing the
+ actions of TPM_ContinueSelfTest
+ because the ordinal required
+ resources that have not been
+ tested. */
+#define TPM_DEFEND_LOCK_RUNNING TPM_BASE + TPM_NON_FATAL + 3
+ /* The TPM is defending against dictionary
+ attacks and is in some time-out
+ period. */
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssfile.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssfile.h
new file mode 100644
index 000000000..a75a4ed35
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssfile.h
@@ -0,0 +1,95 @@
+/********************************************************************************/
+/* */
+/* TSS and Application File Utilities */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: tssfile.h 1324 2018-08-31 16:36:12Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2015, 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API is subject to change.
+
+ It is useful rapid application development, and as sample code. It is risky for production code.
+
+*/
+
+#ifndef TSSFILE_H
+#define TSSFILE_H
+
+#include <stdio.h>
+
+#include <ibmtss/TPM_Types.h>
+#include <ibmtss/tssutils.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ LIB_EXPORT
+ int TSS_File_Open(FILE **file,
+ const char *filename,
+ const char* mode);
+ LIB_EXPORT
+ TPM_RC TSS_File_ReadBinaryFile(unsigned char **data,
+ size_t *length,
+ const char *filename);
+ LIB_EXPORT
+ TPM_RC TSS_File_WriteBinaryFile(const unsigned char *data,
+ size_t length,
+ const char *filename);
+
+ LIB_EXPORT
+ TPM_RC TSS_File_ReadStructure(void *structure,
+ UnmarshalFunction_t unmarshalFunction,
+ const char *filename);
+ LIB_EXPORT
+ TPM_RC TSS_File_ReadStructureFlag(void *structure,
+ UnmarshalFunctionFlag_t unmarshalFunction,
+ BOOL allowNull,
+ const char *filename);
+ LIB_EXPORT
+ TPM_RC TSS_File_WriteStructure(void *structure,
+ MarshalFunction_t marshalFunction,
+ const char *filename);
+ LIB_EXPORT
+ TPM_RC TSS_File_Read2B(TPM2B *tpm2b,
+ uint16_t targetSize,
+ const char *filename);
+ LIB_EXPORT
+ TPM_RC TSS_File_DeleteFile(const char *filename);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal.h
new file mode 100644
index 000000000..52227a8a0
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal.h
@@ -0,0 +1,1628 @@
+/********************************************************************************/
+/* */
+/* TSS Marshal and Unmarshal */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2019. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API should be stable, but is less guaranteed.
+
+ It is useful for applications that have to marshal / unmarshal
+ structures for file save / load.
+*/
+
+#ifndef TSSMARSHAL_H
+#define TSSMARSHAL_H
+
+#include "BaseTypes.h"
+#include <ibmtss/TPM_Types.h>
+
+#include "ActivateCredential_fp.h"
+#include "CertifyCreation_fp.h"
+#include "CertifyX509_fp.h"
+#include "Certify_fp.h"
+#include "ChangeEPS_fp.h"
+#include "ChangePPS_fp.h"
+#include "ClearControl_fp.h"
+#include "Clear_fp.h"
+#include "ClockRateAdjust_fp.h"
+#include "ClockSet_fp.h"
+#include "Commit_fp.h"
+#include "Commit_fp.h"
+#include "ContextLoad_fp.h"
+#include "ContextSave_fp.h"
+#include "CreatePrimary_fp.h"
+#include "Create_fp.h"
+#include "CreateLoaded_fp.h"
+#include "DictionaryAttackLockReset_fp.h"
+#include "DictionaryAttackParameters_fp.h"
+#include "Duplicate_fp.h"
+#include "ECC_Parameters_fp.h"
+#include "ECDH_KeyGen_fp.h"
+#include "ECDH_ZGen_fp.h"
+#include "EC_Ephemeral_fp.h"
+#include "EncryptDecrypt_fp.h"
+#include "EncryptDecrypt2_fp.h"
+#include "EventSequenceComplete_fp.h"
+#include "EvictControl_fp.h"
+#include "FlushContext_fp.h"
+#include "GetCapability_fp.h"
+#include "GetCommandAuditDigest_fp.h"
+#include "GetRandom_fp.h"
+#include "GetSessionAuditDigest_fp.h"
+#include "GetTestResult_fp.h"
+#include "GetTime_fp.h"
+#include "HMAC_Start_fp.h"
+#include "HMAC_fp.h"
+#include "HashSequenceStart_fp.h"
+#include "Hash_fp.h"
+#include "HierarchyChangeAuth_fp.h"
+#include "HierarchyControl_fp.h"
+#include "Import_fp.h"
+#include "IncrementalSelfTest_fp.h"
+#include "LoadExternal_fp.h"
+#include "Load_fp.h"
+#include "MakeCredential_fp.h"
+#include "NV_Certify_fp.h"
+#include "NV_ChangeAuth_fp.h"
+#include "NV_DefineSpace_fp.h"
+#include "NV_Extend_fp.h"
+#include "NV_GlobalWriteLock_fp.h"
+#include "NV_Increment_fp.h"
+#include "NV_ReadLock_fp.h"
+#include "NV_ReadPublic_fp.h"
+#include "NV_Read_fp.h"
+#include "NV_SetBits_fp.h"
+#include "NV_UndefineSpaceSpecial_fp.h"
+#include "NV_UndefineSpace_fp.h"
+#include "NV_WriteLock_fp.h"
+#include "NV_Write_fp.h"
+#include "ObjectChangeAuth_fp.h"
+#include "PCR_Allocate_fp.h"
+#include "PCR_Event_fp.h"
+#include "PCR_Extend_fp.h"
+#include "PCR_Read_fp.h"
+#include "PCR_Reset_fp.h"
+#include "PCR_SetAuthPolicy_fp.h"
+#include "PCR_SetAuthValue_fp.h"
+#include "PP_Commands_fp.h"
+#include "PolicyAuthValue_fp.h"
+#include "PolicyAuthorize_fp.h"
+#include "PolicyAuthorizeNV_fp.h"
+#include "PolicyCommandCode_fp.h"
+#include "PolicyCounterTimer_fp.h"
+#include "PolicyCpHash_fp.h"
+#include "PolicyDuplicationSelect_fp.h"
+#include "PolicyGetDigest_fp.h"
+#include "PolicyLocality_fp.h"
+#include "PolicyNV_fp.h"
+#include "PolicyAuthorizeNV_fp.h"
+#include "PolicyNvWritten_fp.h"
+#include "PolicyNameHash_fp.h"
+#include "PolicyOR_fp.h"
+#include "PolicyPCR_fp.h"
+#include "PolicyPassword_fp.h"
+#include "PolicyPhysicalPresence_fp.h"
+#include "PolicyRestart_fp.h"
+#include "PolicySecret_fp.h"
+#include "PolicySigned_fp.h"
+#include "PolicyTemplate_fp.h"
+#include "PolicyTicket_fp.h"
+#include "Quote_fp.h"
+#include "RSA_Decrypt_fp.h"
+#include "RSA_Encrypt_fp.h"
+#include "ReadClock_fp.h"
+#include "ReadPublic_fp.h"
+#include "Rewrap_fp.h"
+#include "SelfTest_fp.h"
+#include "SequenceComplete_fp.h"
+#include "SequenceUpdate_fp.h"
+#include "SetAlgorithmSet_fp.h"
+#include "SetCommandCodeAuditStatus_fp.h"
+#include "SetPrimaryPolicy_fp.h"
+#include "Shutdown_fp.h"
+#include "Sign_fp.h"
+#include "StartAuthSession_fp.h"
+#include "Startup_fp.h"
+#include "StirRandom_fp.h"
+#include "TestParms_fp.h"
+#include "Unseal_fp.h"
+#include "VerifySignature_fp.h"
+#include "ZGen_2Phase_fp.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* Recommended functions */
+
+ TPM_RC
+ TSS_Startup_In_Marshalu(const Startup_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Shutdown_In_Marshalu(const Shutdown_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SelfTest_In_Marshalu(const SelfTest_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_IncrementalSelfTest_In_Marshalu(const IncrementalSelfTest_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_StartAuthSession_In_Marshalu(const StartAuthSession_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyRestart_In_Marshalu(const PolicyRestart_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Create_In_Marshalu(const Create_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Load_In_Marshalu(const Load_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_LoadExternal_In_Marshalu(const LoadExternal_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ReadPublic_In_Marshalu(const ReadPublic_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ActivateCredential_In_Marshalu(const ActivateCredential_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_MakeCredential_In_Marshalu(const MakeCredential_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Unseal_In_Marshalu(const Unseal_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ObjectChangeAuth_In_Marshalu(const ObjectChangeAuth_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreateLoaded_In_Marshalu(const CreateLoaded_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Duplicate_In_Marshalu(const Duplicate_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Rewrap_In_Marshalu(const Rewrap_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Import_In_Marshalu(const Import_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_RSA_Encrypt_In_Marshalu(const RSA_Encrypt_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_RSA_Decrypt_In_Marshalu(const RSA_Decrypt_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ECDH_KeyGen_In_Marshalu(const ECDH_KeyGen_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ECDH_ZGen_In_Marshalu(const ECDH_ZGen_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ECC_Parameters_In_Marshalu(const ECC_Parameters_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ZGen_2Phase_In_Marshalu(const ZGen_2Phase_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EncryptDecrypt_In_Marshalu(const EncryptDecrypt_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EncryptDecrypt2_In_Marshalu(const EncryptDecrypt2_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Hash_In_Marshalu(const Hash_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HMAC_In_Marshalu(const HMAC_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetRandom_In_Marshalu(const GetRandom_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_StirRandom_In_Marshalu(const StirRandom_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HMAC_Start_In_Marshalu(const HMAC_Start_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HashSequenceStart_In_Marshalu(const HashSequenceStart_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SequenceUpdate_In_Marshalu(const SequenceUpdate_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SequenceComplete_In_Marshalu(const SequenceComplete_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EventSequenceComplete_In_Marshalu(const EventSequenceComplete_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Certify_In_Marshalu(const Certify_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CertifyCreation_In_Marshalu(const CertifyCreation_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CertifyX509_In_Marshalu(const CertifyX509_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Quote_In_Marshalu(const Quote_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetSessionAuditDigest_In_Marshalu(const GetSessionAuditDigest_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetCommandAuditDigest_In_Marshalu(const GetCommandAuditDigest_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetTime_In_Marshalu(const GetTime_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Commit_In_Marshalu(const Commit_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EC_Ephemeral_In_Marshalu(const EC_Ephemeral_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_VerifySignature_In_Marshalu(const VerifySignature_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Sign_In_Marshalu(const Sign_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SetCommandCodeAuditStatus_In_Marshalu(const SetCommandCodeAuditStatus_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Extend_In_Marshalu(const PCR_Extend_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Event_In_Marshalu(const PCR_Event_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Read_In_Marshalu(const PCR_Read_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Allocate_In_Marshalu(const PCR_Allocate_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_SetAuthPolicy_In_Marshalu(const PCR_SetAuthPolicy_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_SetAuthValue_In_Marshalu(const PCR_SetAuthValue_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Reset_In_Marshalu(const PCR_Reset_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicySigned_In_Marshalu(const PolicySigned_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicySecret_In_Marshalu(const PolicySecret_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyTicket_In_Marshalu(const PolicyTicket_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyOR_In_Marshalu(const PolicyOR_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyPCR_In_Marshalu(const PolicyPCR_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyLocality_In_Marshalu(const PolicyLocality_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyNV_In_Marshalu(const PolicyNV_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyAuthorizeNV_In_Marshalu(const PolicyAuthorizeNV_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyCounterTimer_In_Marshalu(const PolicyCounterTimer_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyCommandCode_In_Marshalu(const PolicyCommandCode_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyPhysicalPresence_In_Marshalu(const PolicyPhysicalPresence_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyCpHash_In_Marshalu(const PolicyCpHash_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyNameHash_In_Marshalu(const PolicyNameHash_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyDuplicationSelect_In_Marshalu(const PolicyDuplicationSelect_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyAuthorize_In_Marshalu(const PolicyAuthorize_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyAuthValue_In_Marshalu(const PolicyAuthValue_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyPassword_In_Marshalu(const PolicyPassword_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyGetDigest_In_Marshalu(const PolicyGetDigest_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyNvWritten_In_Marshalu(const PolicyNvWritten_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyTemplate_In_Marshalu(const PolicyTemplate_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreatePrimary_In_Marshalu(const CreatePrimary_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HierarchyControl_In_Marshalu(const HierarchyControl_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SetPrimaryPolicy_In_Marshalu(const SetPrimaryPolicy_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ChangePPS_In_Marshalu(const ChangePPS_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ChangeEPS_In_Marshalu(const ChangeEPS_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Clear_In_Marshalu(const Clear_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ClearControl_In_Marshalu(const ClearControl_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HierarchyChangeAuth_In_Marshalu(const HierarchyChangeAuth_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_DictionaryAttackLockReset_In_Marshalu(const DictionaryAttackLockReset_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_DictionaryAttackParameters_In_Marshalu(const DictionaryAttackParameters_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PP_Commands_In_Marshalu(const PP_Commands_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SetAlgorithmSet_In_Marshalu(const SetAlgorithmSet_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ContextSave_In_Marshalu(const ContextSave_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ContextLoad_In_Marshalu(const ContextLoad_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_FlushContext_In_Marshalu(const FlushContext_In *source, UINT16 *written, BYTE **buffer, uint32_t *size) ;
+ TPM_RC
+ TSS_EvictControl_In_Marshalu(const EvictControl_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ClockSet_In_Marshalu(const ClockSet_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ClockRateAdjust_In_Marshalu(const ClockRateAdjust_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetCapability_In_Marshalu(const GetCapability_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TestParms_In_Marshalu(const TestParms_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_DefineSpace_In_Marshalu(const NV_DefineSpace_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_UndefineSpace_In_Marshalu(const NV_UndefineSpace_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_UndefineSpaceSpecial_In_Marshalu(const NV_UndefineSpaceSpecial_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadPublic_In_Marshalu(const NV_ReadPublic_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Write_In_Marshalu(const NV_Write_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Increment_In_Marshalu(const NV_Increment_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Extend_In_Marshalu(const NV_Extend_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_SetBits_In_Marshalu(const NV_SetBits_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_WriteLock_In_Marshalu(const NV_WriteLock_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_GlobalWriteLock_In_Marshalu(const NV_GlobalWriteLock_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Read_In_Marshalu(const NV_Read_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadLock_In_Marshalu(const NV_ReadLock_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ChangeAuth_In_Marshalu(const NV_ChangeAuth_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Certify_In_Marshalu(const NV_Certify_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+
+ /* Deprecated functions */
+
+ TPM_RC
+ TSS_Startup_In_Marshal(const Startup_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Shutdown_In_Marshal(const Shutdown_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SelfTest_In_Marshal(const SelfTest_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_IncrementalSelfTest_In_Marshal(const IncrementalSelfTest_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_StartAuthSession_In_Marshal(const StartAuthSession_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyRestart_In_Marshal(const PolicyRestart_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Create_In_Marshal(const Create_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Load_In_Marshal(const Load_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_LoadExternal_In_Marshal(const LoadExternal_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ReadPublic_In_Marshal(const ReadPublic_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ActivateCredential_In_Marshal(const ActivateCredential_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_MakeCredential_In_Marshal(const MakeCredential_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Unseal_In_Marshal(const Unseal_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ObjectChangeAuth_In_Marshal(const ObjectChangeAuth_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CreateLoaded_In_Marshal(const CreateLoaded_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Duplicate_In_Marshal(const Duplicate_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Rewrap_In_Marshal(const Rewrap_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Import_In_Marshal(const Import_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_RSA_Encrypt_In_Marshal(const RSA_Encrypt_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_RSA_Decrypt_In_Marshal(const RSA_Decrypt_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ECDH_KeyGen_In_Marshal(const ECDH_KeyGen_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ECDH_ZGen_In_Marshal(const ECDH_ZGen_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ECC_Parameters_In_Marshal(const ECC_Parameters_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ZGen_2Phase_In_Marshal(const ZGen_2Phase_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EncryptDecrypt_In_Marshal(const EncryptDecrypt_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EncryptDecrypt2_In_Marshal(const EncryptDecrypt2_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Hash_In_Marshal(const Hash_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HMAC_In_Marshal(const HMAC_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetRandom_In_Marshal(const GetRandom_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_StirRandom_In_Marshal(const StirRandom_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HMAC_Start_In_Marshal(const HMAC_Start_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HashSequenceStart_In_Marshal(const HashSequenceStart_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SequenceUpdate_In_Marshal(const SequenceUpdate_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SequenceComplete_In_Marshal(const SequenceComplete_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EventSequenceComplete_In_Marshal(const EventSequenceComplete_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Certify_In_Marshal(const Certify_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CertifyCreation_In_Marshal(const CertifyCreation_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CertifyX509_In_Marshal(const CertifyX509_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Quote_In_Marshal(const Quote_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetSessionAuditDigest_In_Marshal(const GetSessionAuditDigest_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetCommandAuditDigest_In_Marshal(const GetCommandAuditDigest_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetTime_In_Marshal(const GetTime_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Commit_In_Marshal(const Commit_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EC_Ephemeral_In_Marshal(const EC_Ephemeral_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_VerifySignature_In_Marshal(const VerifySignature_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Sign_In_Marshal(const Sign_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SetCommandCodeAuditStatus_In_Marshal(const SetCommandCodeAuditStatus_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Extend_In_Marshal(const PCR_Extend_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Event_In_Marshal(const PCR_Event_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Read_In_Marshal(const PCR_Read_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Allocate_In_Marshal(const PCR_Allocate_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_SetAuthPolicy_In_Marshal(const PCR_SetAuthPolicy_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_SetAuthValue_In_Marshal(const PCR_SetAuthValue_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Reset_In_Marshal(const PCR_Reset_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicySigned_In_Marshal(const PolicySigned_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicySecret_In_Marshal(const PolicySecret_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyTicket_In_Marshal(const PolicyTicket_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyOR_In_Marshal(const PolicyOR_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyPCR_In_Marshal(const PolicyPCR_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyLocality_In_Marshal(const PolicyLocality_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyNV_In_Marshal(const PolicyNV_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyAuthorizeNV_In_Marshal(const PolicyAuthorizeNV_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyCounterTimer_In_Marshal(const PolicyCounterTimer_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyCommandCode_In_Marshal(const PolicyCommandCode_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyPhysicalPresence_In_Marshal(const PolicyPhysicalPresence_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyCpHash_In_Marshal(const PolicyCpHash_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyNameHash_In_Marshal(const PolicyNameHash_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyDuplicationSelect_In_Marshal(const PolicyDuplicationSelect_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyAuthorize_In_Marshal(const PolicyAuthorize_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyAuthValue_In_Marshal(const PolicyAuthValue_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyPassword_In_Marshal(const PolicyPassword_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyGetDigest_In_Marshal(const PolicyGetDigest_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyNvWritten_In_Marshal(const PolicyNvWritten_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyTemplate_In_Marshal(const PolicyTemplate_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CreatePrimary_In_Marshal(const CreatePrimary_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HierarchyControl_In_Marshal(const HierarchyControl_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SetPrimaryPolicy_In_Marshal(const SetPrimaryPolicy_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ChangePPS_In_Marshal(const ChangePPS_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ChangeEPS_In_Marshal(const ChangeEPS_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Clear_In_Marshal(const Clear_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ClearControl_In_Marshal(const ClearControl_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HierarchyChangeAuth_In_Marshal(const HierarchyChangeAuth_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_DictionaryAttackLockReset_In_Marshal(const DictionaryAttackLockReset_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_DictionaryAttackParameters_In_Marshal(const DictionaryAttackParameters_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PP_Commands_In_Marshal(const PP_Commands_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SetAlgorithmSet_In_Marshal(const SetAlgorithmSet_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ContextSave_In_Marshal(const ContextSave_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ContextLoad_In_Marshal(const ContextLoad_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_FlushContext_In_Marshal(const FlushContext_In *source, UINT16 *written, BYTE **buffer, INT32 *size) ;
+ TPM_RC
+ TSS_EvictControl_In_Marshal(const EvictControl_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ClockSet_In_Marshal(const ClockSet_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ClockRateAdjust_In_Marshal(const ClockRateAdjust_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetCapability_In_Marshal(const GetCapability_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_TestParms_In_Marshal(const TestParms_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_DefineSpace_In_Marshal(const NV_DefineSpace_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_UndefineSpace_In_Marshal(const NV_UndefineSpace_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_UndefineSpaceSpecial_In_Marshal(const NV_UndefineSpaceSpecial_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_ReadPublic_In_Marshal(const NV_ReadPublic_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Write_In_Marshal(const NV_Write_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Increment_In_Marshal(const NV_Increment_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Extend_In_Marshal(const NV_Extend_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_SetBits_In_Marshal(const NV_SetBits_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_WriteLock_In_Marshal(const NV_WriteLock_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_GlobalWriteLock_In_Marshal(const NV_GlobalWriteLock_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Read_In_Marshal(const NV_Read_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_ReadLock_In_Marshal(const NV_ReadLock_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_ChangeAuth_In_Marshal(const NV_ChangeAuth_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Certify_In_Marshal(const NV_Certify_In *source, UINT16 *written, BYTE **buffer, INT32 *size);
+
+ /* Recommended functions */
+
+ TPM_RC
+ TSS_IncrementalSelfTest_Out_Unmarshalu(IncrementalSelfTest_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetTestResult_Out_Unmarshalu(GetTestResult_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_StartAuthSession_Out_Unmarshalu(StartAuthSession_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Create_Out_Unmarshalu(Create_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Load_Out_Unmarshalu(Load_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_LoadExternal_Out_Unmarshalu(LoadExternal_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ReadPublic_Out_Unmarshalu(ReadPublic_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ActivateCredential_Out_Unmarshalu(ActivateCredential_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_MakeCredential_Out_Unmarshalu(MakeCredential_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Unseal_Out_Unmarshalu(Unseal_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ObjectChangeAuth_Out_Unmarshalu(ObjectChangeAuth_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreateLoaded_Out_Unmarshalu(CreateLoaded_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Duplicate_Out_Unmarshalu(Duplicate_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Rewrap_Out_Unmarshalu(Rewrap_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Import_Out_Unmarshalu(Import_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_RSA_Encrypt_Out_Unmarshalu(RSA_Encrypt_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_RSA_Decrypt_Out_Unmarshalu(RSA_Decrypt_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ECDH_KeyGen_Out_Unmarshalu(ECDH_KeyGen_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ECDH_ZGen_Out_Unmarshalu(ECDH_ZGen_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ECC_Parameters_Out_Unmarshalu(ECC_Parameters_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ZGen_2Phase_Out_Unmarshalu(ZGen_2Phase_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EncryptDecrypt_Out_Unmarshalu(EncryptDecrypt_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EncryptDecrypt2_Out_Unmarshalu(EncryptDecrypt2_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Hash_Out_Unmarshalu(Hash_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HMAC_Out_Unmarshalu(HMAC_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetRandom_Out_Unmarshalu(GetRandom_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HMAC_Start_Out_Unmarshalu(HMAC_Start_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_HashSequenceStart_Out_Unmarshalu(HashSequenceStart_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_SequenceComplete_Out_Unmarshalu(SequenceComplete_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EventSequenceComplete_Out_Unmarshalu(EventSequenceComplete_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Certify_Out_Unmarshalu(Certify_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CertifyCreation_Out_Unmarshalu(CertifyCreation_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CertifyX509_Out_Unmarshalu(CertifyX509_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Quote_Out_Unmarshalu(Quote_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetSessionAuditDigest_Out_Unmarshalu(GetSessionAuditDigest_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetCommandAuditDigest_Out_Unmarshalu(GetCommandAuditDigest_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetTime_Out_Unmarshalu(GetTime_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Commit_Out_Unmarshalu(Commit_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_EC_Ephemeral_Out_Unmarshalu(EC_Ephemeral_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_VerifySignature_Out_Unmarshalu(VerifySignature_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Sign_Out_Unmarshalu(Sign_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Event_Out_Unmarshalu(PCR_Event_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Read_Out_Unmarshalu(PCR_Read_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Allocate_Out_Unmarshalu(PCR_Allocate_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicySigned_Out_Unmarshalu(PolicySigned_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicySecret_Out_Unmarshalu(PolicySecret_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PolicyGetDigest_Out_Unmarshalu(PolicyGetDigest_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreatePrimary_Out_Unmarshalu(CreatePrimary_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ContextSave_Out_Unmarshalu(ContextSave_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ContextLoad_Out_Unmarshalu(ContextLoad_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ReadClock_Out_Unmarshalu(ReadClock_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetCapability_Out_Unmarshalu(GetCapability_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadPublic_Out_Unmarshalu(NV_ReadPublic_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Read_Out_Unmarshalu(NV_Read_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_Certify_Out_Unmarshalu(NV_Certify_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+
+ /* Deprecated functions */
+
+ TPM_RC
+ TSS_IncrementalSelfTest_Out_Unmarshal(IncrementalSelfTest_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetTestResult_Out_Unmarshal(GetTestResult_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_StartAuthSession_Out_Unmarshal(StartAuthSession_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Create_Out_Unmarshal(Create_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Load_Out_Unmarshal(Load_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_LoadExternal_Out_Unmarshal(LoadExternal_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ReadPublic_Out_Unmarshal(ReadPublic_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ActivateCredential_Out_Unmarshal(ActivateCredential_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_MakeCredential_Out_Unmarshal(MakeCredential_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Unseal_Out_Unmarshal(Unseal_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ObjectChangeAuth_Out_Unmarshal(ObjectChangeAuth_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CreateLoaded_Out_Unmarshal(CreateLoaded_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Duplicate_Out_Unmarshal(Duplicate_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Rewrap_Out_Unmarshal(Rewrap_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Import_Out_Unmarshal(Import_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_RSA_Encrypt_Out_Unmarshal(RSA_Encrypt_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_RSA_Decrypt_Out_Unmarshal(RSA_Decrypt_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ECDH_KeyGen_Out_Unmarshal(ECDH_KeyGen_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ECDH_ZGen_Out_Unmarshal(ECDH_ZGen_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ECC_Parameters_Out_Unmarshal(ECC_Parameters_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ZGen_2Phase_Out_Unmarshal(ZGen_2Phase_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EncryptDecrypt_Out_Unmarshal(EncryptDecrypt_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EncryptDecrypt2_Out_Unmarshal(EncryptDecrypt2_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Hash_Out_Unmarshal(Hash_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HMAC_Out_Unmarshal(HMAC_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetRandom_Out_Unmarshal(GetRandom_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HMAC_Start_Out_Unmarshal(HMAC_Start_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_HashSequenceStart_Out_Unmarshal(HashSequenceStart_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_SequenceComplete_Out_Unmarshal(SequenceComplete_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EventSequenceComplete_Out_Unmarshal(EventSequenceComplete_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Certify_Out_Unmarshal(Certify_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CertifyCreation_Out_Unmarshal(CertifyCreation_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Quote_Out_Unmarshal(Quote_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetSessionAuditDigest_Out_Unmarshal(GetSessionAuditDigest_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetCommandAuditDigest_Out_Unmarshal(GetCommandAuditDigest_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetTime_Out_Unmarshal(GetTime_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Commit_Out_Unmarshal(Commit_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_EC_Ephemeral_Out_Unmarshal(EC_Ephemeral_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_VerifySignature_Out_Unmarshal(VerifySignature_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_Sign_Out_Unmarshal(Sign_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Event_Out_Unmarshal(PCR_Event_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Read_Out_Unmarshal(PCR_Read_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PCR_Allocate_Out_Unmarshal(PCR_Allocate_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicySigned_Out_Unmarshal(PolicySigned_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicySecret_Out_Unmarshal(PolicySecret_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_PolicyGetDigest_Out_Unmarshal(PolicyGetDigest_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_CreatePrimary_Out_Unmarshal(CreatePrimary_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ContextSave_Out_Unmarshal(ContextSave_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ContextLoad_Out_Unmarshal(ContextLoad_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_ReadClock_Out_Unmarshal(ReadClock_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_GetCapability_Out_Unmarshal(GetCapability_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_ReadPublic_Out_Unmarshal(NV_ReadPublic_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Read_Out_Unmarshal(NV_Read_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+ TPM_RC
+ TSS_NV_Certify_Out_Unmarshal(NV_Certify_Out *target, TPM_ST tag, BYTE **buffer, INT32 *size);
+
+ /* Recommended functions */
+
+ LIB_EXPORT TPM_RC
+ TSS_UINT8_Marshalu(const UINT8 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_INT8_Marshalu(const INT8 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT16_Marshalu(const UINT16 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT32_Marshalu(const uint32_t *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_INT32_Marshalu(const INT32 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT64_Marshalu(const UINT64 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_Array_Marshalu(const BYTE *source, UINT16 sourceSize, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_Marshalu(const TPM2B *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_KEY_BITS_Marshalu(const TPM_KEY_BITS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_GENERATED_Marshalu(const TPM_GENERATED *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ALG_ID_Marshalu(const TPM_ALG_ID *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ECC_CURVE_Marshalu(const TPM_ECC_CURVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_RC_Marshalu(const TPM_RC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CLOCK_ADJUST_Marshalu(const TPM_CLOCK_ADJUST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_EO_Marshalu(const TPM_EO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ST_Marshalu(const TPM_ST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_SU_Marshalu(const TPM_ST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_SE_Marshalu(const TPM_SE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CAP_Marshalu(const TPM_CAP *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_PT_Marshalu(const TPM_PT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_PT_PCR_Marshalu(const TPM_PT_PCR *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_HANDLE_Marshalu(const TPM_HANDLE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_ALGORITHM_Marshalu(const TPMA_ALGORITHM *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_OBJECT_Marshalu(const TPMA_OBJECT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_SESSION_Marshalu(const TPMA_SESSION *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_LOCALITY_Marshalu(const TPMA_LOCALITY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CC_Marshalu(const TPM_CC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_CC_Marshalu(const TPMA_CC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_YES_NO_Marshalu(const TPMI_YES_NO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_OBJECT_Marshalu(const TPMI_DH_OBJECT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PERSISTENT_Marshalu(const TPMI_DH_PERSISTENT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_ENTITY_Marshalu(const TPMI_DH_ENTITY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PCR_Marshalu(const TPMI_DH_PCR *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_AUTH_SESSION_Marshalu(const TPMI_SH_AUTH_SESSION *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_HMAC_Marshalu(const TPMI_SH_HMAC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_POLICY_Marshalu(const TPMI_SH_POLICY*source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_CONTEXT_Marshalu(const TPMI_DH_CONTEXT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_SAVED_Marshalu(const TPMI_DH_SAVED *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_Marshalu(const TPMI_RH_HIERARCHY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_ENABLES_Marshalu(const TPMI_RH_ENABLES *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_AUTH_Marshalu(const TPMI_RH_HIERARCHY_AUTH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_POLICY_Marshalu(const TPMI_RH_HIERARCHY_POLICY *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_PLATFORM_Marshalu(const TPMI_RH_PLATFORM *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_ENDORSEMENT_Marshalu(const TPMI_RH_ENDORSEMENT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_PROVISION_Marshalu(const TPMI_RH_PROVISION *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_CLEAR_Marshalu(const TPMI_RH_CLEAR *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_NV_AUTH_Marshalu(const TPMI_RH_NV_AUTH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_LOCKOUT_Marshalu(const TPMI_RH_LOCKOUT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_NV_INDEX_Marshalu(const TPMI_RH_NV_INDEX *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_HASH_Marshalu(const TPMI_ALG_HASH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_Marshalu(const TPMI_ALG_SYM *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_OBJECT_Marshalu(const TPMI_ALG_SYM_OBJECT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_MODE_Marshalu(const TPMI_ALG_SYM_MODE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_KDF_Marshalu(const TPMI_ALG_KDF *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SIG_SCHEME_Marshalu(const TPMI_ALG_SIG_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ECC_KEY_EXCHANGE_Marshalu(const TPMI_ECC_KEY_EXCHANGE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ST_COMMAND_TAG_Marshalu(const TPMI_ST_COMMAND_TAG *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_MAC_SCHEME_Marshalu(const TPMI_ALG_MAC_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_CIPHER_MODE_Marshalu(const TPMI_ALG_CIPHER_MODE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_HA_Marshalu(const TPMU_HA *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_HA_Marshalu(const TPMT_HA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_DIGEST_Marshalu(const TPM2B_DIGEST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_DATA_Marshalu(const TPM2B_DATA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NONCE_Marshalu(const TPM2B_NONCE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_AUTH_Marshalu(const TPM2B_AUTH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_OPERAND_Marshalu(const TPM2B_OPERAND *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_EVENT_Marshalu(const TPM2B_EVENT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_MAX_BUFFER_Marshalu(const TPM2B_MAX_BUFFER *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_MAX_NV_BUFFER_Marshalu(const TPM2B_MAX_NV_BUFFER *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_TIMEOUT_Marshalu(const TPM2B_TIMEOUT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_IV_Marshalu(const TPM2B_IV *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NAME_Marshalu(const TPM2B_NAME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_PCR_SELECTION_Marshalu(const TPMS_PCR_SELECTION *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_CREATION_Marshalu(const TPMT_TK_CREATION *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_VERIFIED_Marshalu(const TPMT_TK_VERIFIED *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_AUTH_Marshalu(const TPMT_TK_AUTH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_HASHCHECK_Marshalu(const TPMT_TK_HASHCHECK *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ALG_PROPERTY_Marshalu(const TPMS_ALG_PROPERTY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_PROPERTY_Marshalu(const TPMS_TAGGED_PROPERTY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_PCR_SELECT_Marshalu(const TPMS_TAGGED_PCR_SELECT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_CC_Marshalu(const TPML_CC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_CCA_Marshalu(const TPML_CCA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ALG_Marshalu(const TPML_ALG *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_HANDLE_Marshalu(const TPML_HANDLE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_DIGEST_Marshalu(const TPML_DIGEST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_DIGEST_VALUES_Marshalu(const TPML_DIGEST_VALUES *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_PCR_SELECTION_Marshalu(const TPML_PCR_SELECTION *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ALG_PROPERTY_Marshalu(const TPML_ALG_PROPERTY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_TPM_PROPERTY_Marshalu(const TPML_TAGGED_TPM_PROPERTY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_PCR_PROPERTY_Marshalu(const TPML_TAGGED_PCR_PROPERTY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ECC_CURVE_Marshalu(const TPML_ECC_CURVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_CAPABILITIES_Marshalu(const TPMU_CAPABILITIES *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CAPABILITY_DATA_Marshalu(const TPMS_CAPABILITY_DATA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CLOCK_INFO_Marshalu(const TPMS_CLOCK_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TIME_INFO_Marshalu(const TPMS_TIME_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TIME_ATTEST_INFO_Marshalu(const TPMS_TIME_ATTEST_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CERTIFY_INFO_Marshalu(const TPMS_CERTIFY_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_QUOTE_INFO_Marshalu(const TPMS_QUOTE_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_COMMAND_AUDIT_INFO_Marshalu(const TPMS_COMMAND_AUDIT_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SESSION_AUDIT_INFO_Marshalu(const TPMS_SESSION_AUDIT_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CREATION_INFO_Marshalu(const TPMS_CREATION_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_CERTIFY_INFO_Marshalu(const TPMS_NV_CERTIFY_INFO *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ST_ATTEST_Marshalu(const TPMI_ST_ATTEST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_ATTEST_Marshalu(const TPMU_ATTEST *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ATTEST_Marshalu(const TPMS_ATTEST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ATTEST_Marshalu(const TPM2B_ATTEST *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_AUTH_COMMAND_Marshalu(const TPMS_AUTH_COMMAND *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_AES_KEY_BITS_Marshalu(const TPMI_AES_KEY_BITS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SYM_KEY_BITS_Marshalu(const TPMU_SYM_KEY_BITS *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SYM_MODE_Marshalu(const TPMU_SYM_MODE *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SYM_DEF_Marshalu(const TPMT_SYM_DEF *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SYM_DEF_OBJECT_Marshalu(const TPMT_SYM_DEF_OBJECT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SYM_KEY_Marshalu(const TPM2B_SYM_KEY *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_LABEL_Marshalu(const TPM2B_LABEL *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_DERIVE_Marshalu(const TPMS_DERIVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SYMCIPHER_PARMS_Marshalu(const TPMS_SYMCIPHER_PARMS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_DATA_Marshalu(const TPM2B_SENSITIVE_DATA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SENSITIVE_CREATE_Marshalu(const TPMS_SENSITIVE_CREATE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_CREATE_Marshalu(const TPM2B_SENSITIVE_CREATE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_HASH_Marshalu(const TPMS_SCHEME_HASH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_ECDAA_Marshalu(const TPMS_SCHEME_ECDAA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_KEYEDHASH_SCHEME_Marshalu(const TPMI_ALG_KEYEDHASH_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_HMAC_Marshalu(const TPMS_SCHEME_HMAC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_XOR_Marshalu(const TPMS_SCHEME_XOR *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SCHEME_KEYEDHASH_Marshalu(const TPMU_SCHEME_KEYEDHASH *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_KEYEDHASH_SCHEME_Marshalu(const TPMT_KEYEDHASH_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_RSASSA_Marshalu(const TPMS_SIG_SCHEME_RSASSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_RSAPSS_Marshalu(const TPMS_SIG_SCHEME_RSAPSS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECDSA_Marshalu(const TPMS_SIG_SCHEME_ECDSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_SM2_Marshalu(const TPMS_SIG_SCHEME_SM2 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECSCHNORR_Marshalu(const TPMS_SIG_SCHEME_ECSCHNORR *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECDAA_Marshalu(const TPMS_SIG_SCHEME_ECDAA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SIG_SCHEME_Marshalu(const TPMU_SIG_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SIG_SCHEME_Marshalu(const TPMT_SIG_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ENC_SCHEME_OAEP_Marshalu(const TPMS_ENC_SCHEME_OAEP *source, UINT16 *written, BYTE **buffer, uint32_t *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ENC_SCHEME_RSAES_Marshalu(const TPMS_ENC_SCHEME_RSAES *source, UINT16 *written, BYTE **buffer, uint32_t *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEY_SCHEME_ECDH_Marshalu(const TPMS_KEY_SCHEME_ECDH *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEY_SCHEME_ECMQV_Marshalu(const TPMS_KEY_SCHEME_ECMQV *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_MGF1_Marshalu(const TPMS_SCHEME_MGF1 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF1_SP800_56A_Marshalu(const TPMS_SCHEME_KDF1_SP800_56A *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF2_Marshalu(const TPMS_SCHEME_KDF2 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF1_SP800_108_Marshalu(const TPMS_SCHEME_KDF1_SP800_108 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_KDF_SCHEME_Marshalu(const TPMU_KDF_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_KDF_SCHEME_Marshalu(const TPMT_KDF_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_ASYM_SCHEME_Marshalu(const TPMU_ASYM_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_RSA_SCHEME_Marshalu(const TPMI_ALG_RSA_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_RSA_SCHEME_Marshalu(const TPMT_RSA_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_RSA_DECRYPT_Marshalu(const TPMI_ALG_RSA_DECRYPT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_RSA_DECRYPT_Marshalu(const TPMT_RSA_DECRYPT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PUBLIC_KEY_RSA_Marshalu(const TPM2B_PUBLIC_KEY_RSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RSA_KEY_BITS_Marshalu(const TPMI_RSA_KEY_BITS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PRIVATE_KEY_RSA_Marshalu(const TPM2B_PRIVATE_KEY_RSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ECC_PARAMETER_Marshalu(const TPM2B_ECC_PARAMETER *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ECC_POINT_Marshalu(const TPMS_ECC_POINT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ECC_POINT_Marshalu(const TPM2B_ECC_POINT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_ECC_SCHEME_Marshalu(const TPMI_ALG_ECC_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ECC_CURVE_Marshalu(const TPMI_ECC_CURVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_ECC_SCHEME_Marshalu(const TPMT_ECC_SCHEME *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ALGORITHM_DETAIL_ECC_Marshalu(const TPMS_ALGORITHM_DETAIL_ECC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSA_Marshalu(const TPMS_SIGNATURE_RSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSASSA_Marshalu(const TPMS_SIGNATURE_RSASSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSAPSS_Marshalu(const TPMS_SIGNATURE_RSAPSS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECC_Marshalu(const TPMS_SIGNATURE_ECC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECDSA_Marshalu(const TPMS_SIGNATURE_ECDSA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECDAA_Marshalu(const TPMS_SIGNATURE_ECDAA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_SM2_Marshalu(const TPMS_SIGNATURE_SM2 *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECSCHNORR_Marshalu(const TPMS_SIGNATURE_ECSCHNORR *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SIGNATURE_Marshalu(const TPMU_SIGNATURE *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SIGNATURE_Marshalu(const TPMT_SIGNATURE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ENCRYPTED_SECRET_Marshalu(const TPM2B_ENCRYPTED_SECRET *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_PUBLIC_Marshalu(const TPMI_ALG_PUBLIC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_PUBLIC_ID_Marshalu(const TPMU_PUBLIC_ID *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEYEDHASH_PARMS_Marshalu(const TPMS_KEYEDHASH_PARMS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_RSA_PARMS_Marshalu(const TPMS_RSA_PARMS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ECC_PARMS_Marshalu(const TPMS_ECC_PARMS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_PUBLIC_PARMS_Marshalu(const TPMU_PUBLIC_PARMS *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_PARMS_Marshalu(const TPMT_PUBLIC_PARMS *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_Marshalu(const TPMT_PUBLIC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_D_Marshalu(const TPMT_PUBLIC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PUBLIC_Marshalu(const TPM2B_PUBLIC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_TEMPLATE_Marshalu(const TPM2B_TEMPLATE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SENSITIVE_COMPOSITE_Marshalu(const TPMU_SENSITIVE_COMPOSITE *source, UINT16 *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SENSITIVE_Marshalu(const TPMT_SENSITIVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_Marshalu(const TPM2B_SENSITIVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PRIVATE_Marshalu(const TPM2B_PRIVATE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ID_OBJECT_Marshalu(const TPM2B_ID_OBJECT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_NV_Marshalu(const TPMA_NV *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_PUBLIC_Marshalu(const TPMS_NV_PUBLIC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NV_PUBLIC_Marshalu(const TPM2B_NV_PUBLIC *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CONTEXT_SENSITIVE_Marshalu(const TPM2B_CONTEXT_SENSITIVE *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CONTEXT_DATA_Marshalu(const TPM2B_CONTEXT_DATA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CONTEXT_Marshalu(const TPMS_CONTEXT *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CREATION_DATA_Marshalu(const TPMS_CREATION_DATA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CREATION_DATA_Marshalu(const TPM2B_CREATION_DATA *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+
+ /* Deprecated functions */
+
+ LIB_EXPORT TPM_RC
+ TSS_UINT8_Marshal(const UINT8 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_INT8_Marshal(const INT8 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT16_Marshal(const UINT16 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT32_Marshal(const UINT32 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_INT32_Marshal(const INT32 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_UINT64_Marshal(const UINT64 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_Array_Marshal(const BYTE *source, UINT16 sourceSize, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_Marshal(const TPM2B *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_KEY_BITS_Marshal(const TPM_KEY_BITS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_GENERATED_Marshal(const TPM_GENERATED *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ALG_ID_Marshal(const TPM_ALG_ID *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ECC_CURVE_Marshal(const TPM_ECC_CURVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_RC_Marshal(const TPM_RC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CLOCK_ADJUST_Marshal(const TPM_CLOCK_ADJUST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_EO_Marshal(const TPM_EO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_ST_Marshal(const TPM_ST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_SU_Marshal(const TPM_ST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_SE_Marshal(const TPM_SE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CAP_Marshal(const TPM_CAP *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_PT_Marshal(const TPM_PT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_PT_PCR_Marshal(const TPM_PT_PCR *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_HANDLE_Marshal(const TPM_HANDLE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_ALGORITHM_Marshal(const TPMA_ALGORITHM *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_OBJECT_Marshal(const TPMA_OBJECT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_SESSION_Marshal(const TPMA_SESSION *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_LOCALITY_Marshal(const TPMA_LOCALITY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM_CC_Marshal(const TPM_CC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_CC_Marshal(const TPMA_CC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_YES_NO_Marshal(const TPMI_YES_NO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_OBJECT_Marshal(const TPMI_DH_OBJECT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PERSISTENT_Marshal(const TPMI_DH_PERSISTENT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_ENTITY_Marshal(const TPMI_DH_ENTITY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_PCR_Marshal(const TPMI_DH_PCR *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_AUTH_SESSION_Marshal(const TPMI_SH_AUTH_SESSION *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_HMAC_Marshal(const TPMI_SH_HMAC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_SH_POLICY_Marshal(const TPMI_SH_POLICY*source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_DH_CONTEXT_Marshal(const TPMI_DH_CONTEXT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_Marshal(const TPMI_RH_HIERARCHY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_ENABLES_Marshal(const TPMI_RH_ENABLES *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_HIERARCHY_AUTH_Marshal(const TPMI_RH_HIERARCHY_AUTH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_PLATFORM_Marshal(const TPMI_RH_PLATFORM *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_ENDORSEMENT_Marshal(const TPMI_RH_ENDORSEMENT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_PROVISION_Marshal(const TPMI_RH_PROVISION *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_CLEAR_Marshal(const TPMI_RH_CLEAR *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_NV_AUTH_Marshal(const TPMI_RH_NV_AUTH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_LOCKOUT_Marshal(const TPMI_RH_LOCKOUT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RH_NV_INDEX_Marshal(const TPMI_RH_NV_INDEX *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_HASH_Marshal(const TPMI_ALG_HASH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_Marshal(const TPMI_ALG_SYM *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_OBJECT_Marshal(const TPMI_ALG_SYM_OBJECT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SYM_MODE_Marshal(const TPMI_ALG_SYM_MODE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_KDF_Marshal(const TPMI_ALG_KDF *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_SIG_SCHEME_Marshal(const TPMI_ALG_SIG_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ECC_KEY_EXCHANGE_Marshal(const TPMI_ECC_KEY_EXCHANGE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ST_COMMAND_TAG_Marshal(const TPMI_ST_COMMAND_TAG *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_MAC_SCHEME_Marshal(const TPMI_ALG_MAC_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_CIPHER_MODE_Marshal(const TPMI_ALG_CIPHER_MODE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_HA_Marshal(const TPMU_HA *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_HA_Marshal(const TPMT_HA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_DIGEST_Marshal(const TPM2B_DIGEST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_DATA_Marshal(const TPM2B_DATA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NONCE_Marshal(const TPM2B_NONCE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_AUTH_Marshal(const TPM2B_AUTH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_OPERAND_Marshal(const TPM2B_OPERAND *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_EVENT_Marshal(const TPM2B_EVENT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_MAX_BUFFER_Marshal(const TPM2B_MAX_BUFFER *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_MAX_NV_BUFFER_Marshal(const TPM2B_MAX_NV_BUFFER *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_TIMEOUT_Marshal(const TPM2B_TIMEOUT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_IV_Marshal(const TPM2B_IV *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NAME_Marshal(const TPM2B_NAME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_PCR_SELECTION_Marshal(const TPMS_PCR_SELECTION *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_CREATION_Marshal(const TPMT_TK_CREATION *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_VERIFIED_Marshal(const TPMT_TK_VERIFIED *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_AUTH_Marshal(const TPMT_TK_AUTH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_TK_HASHCHECK_Marshal(const TPMT_TK_HASHCHECK *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ALG_PROPERTY_Marshal(const TPMS_ALG_PROPERTY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_PROPERTY_Marshal(const TPMS_TAGGED_PROPERTY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TAGGED_PCR_SELECT_Marshal(const TPMS_TAGGED_PCR_SELECT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_CC_Marshal(const TPML_CC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_CCA_Marshal(const TPML_CCA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ALG_Marshal(const TPML_ALG *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_HANDLE_Marshal(const TPML_HANDLE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_DIGEST_Marshal(const TPML_DIGEST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_DIGEST_VALUES_Marshal(const TPML_DIGEST_VALUES *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_PCR_SELECTION_Marshal(const TPML_PCR_SELECTION *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ALG_PROPERTY_Marshal(const TPML_ALG_PROPERTY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_TPM_PROPERTY_Marshal(const TPML_TAGGED_TPM_PROPERTY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_TAGGED_PCR_PROPERTY_Marshal(const TPML_TAGGED_PCR_PROPERTY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPML_ECC_CURVE_Marshal(const TPML_ECC_CURVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_CAPABILITIES_Marshal(const TPMU_CAPABILITIES *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CAPABILITY_DATA_Marshal(const TPMS_CAPABILITY_DATA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CLOCK_INFO_Marshal(const TPMS_CLOCK_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TIME_INFO_Marshal(const TPMS_TIME_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_TIME_ATTEST_INFO_Marshal(const TPMS_TIME_ATTEST_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CERTIFY_INFO_Marshal(const TPMS_CERTIFY_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_QUOTE_INFO_Marshal(const TPMS_QUOTE_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_COMMAND_AUDIT_INFO_Marshal(const TPMS_COMMAND_AUDIT_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SESSION_AUDIT_INFO_Marshal(const TPMS_SESSION_AUDIT_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CREATION_INFO_Marshal(const TPMS_CREATION_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_CERTIFY_INFO_Marshal(const TPMS_NV_CERTIFY_INFO *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ST_ATTEST_Marshal(const TPMI_ST_ATTEST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_ATTEST_Marshal(const TPMU_ATTEST *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ATTEST_Marshal(const TPMS_ATTEST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ATTEST_Marshal(const TPM2B_ATTEST *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_AUTH_COMMAND_Marshal(const TPMS_AUTH_COMMAND *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_AES_KEY_BITS_Marshal(const TPMI_AES_KEY_BITS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SYM_KEY_BITS_Marshal(const TPMU_SYM_KEY_BITS *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SYM_MODE_Marshal(const TPMU_SYM_MODE *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SYM_DEF_Marshal(const TPMT_SYM_DEF *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SYM_DEF_OBJECT_Marshal(const TPMT_SYM_DEF_OBJECT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SYM_KEY_Marshal(const TPM2B_SYM_KEY *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_LABEL_Marshal(const TPM2B_LABEL *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_DERIVE_Marshal(const TPMS_DERIVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SYMCIPHER_PARMS_Marshal(const TPMS_SYMCIPHER_PARMS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_DATA_Marshal(const TPM2B_SENSITIVE_DATA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SENSITIVE_CREATE_Marshal(const TPMS_SENSITIVE_CREATE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_CREATE_Marshal(const TPM2B_SENSITIVE_CREATE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_HASH_Marshal(const TPMS_SCHEME_HASH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_ECDAA_Marshal(const TPMS_SCHEME_ECDAA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_KEYEDHASH_SCHEME_Marshal(const TPMI_ALG_KEYEDHASH_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_HMAC_Marshal(const TPMS_SCHEME_HMAC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_XOR_Marshal(const TPMS_SCHEME_XOR *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SCHEME_KEYEDHASH_Marshal(const TPMU_SCHEME_KEYEDHASH *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_KEYEDHASH_SCHEME_Marshal(const TPMT_KEYEDHASH_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_RSASSA_Marshal(const TPMS_SIG_SCHEME_RSASSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_RSAPSS_Marshal(const TPMS_SIG_SCHEME_RSAPSS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECDSA_Marshal(const TPMS_SIG_SCHEME_ECDSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_SM2_Marshal(const TPMS_SIG_SCHEME_SM2 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECSCHNORR_Marshal(const TPMS_SIG_SCHEME_ECSCHNORR *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIG_SCHEME_ECDAA_Marshal(const TPMS_SIG_SCHEME_ECDAA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SIG_SCHEME_Marshal(const TPMU_SIG_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SIG_SCHEME_Marshal(const TPMT_SIG_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ENC_SCHEME_OAEP_Marshal(const TPMS_ENC_SCHEME_OAEP *source, UINT16 *written, BYTE **buffer, INT32 *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ENC_SCHEME_RSAES_Marshal(const TPMS_ENC_SCHEME_RSAES *source, UINT16 *written, BYTE **buffer, INT32 *size)
+#ifdef __ULTRAVISOR__
+ __attribute__ ((const))
+#endif
+ ;
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEY_SCHEME_ECDH_Marshal(const TPMS_KEY_SCHEME_ECDH *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEY_SCHEME_ECMQV_Marshal(const TPMS_KEY_SCHEME_ECMQV *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_MGF1_Marshal(const TPMS_SCHEME_MGF1 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF1_SP800_56A_Marshal(const TPMS_SCHEME_KDF1_SP800_56A *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF2_Marshal(const TPMS_SCHEME_KDF2 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SCHEME_KDF1_SP800_108_Marshal(const TPMS_SCHEME_KDF1_SP800_108 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_KDF_SCHEME_Marshal(const TPMU_KDF_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_KDF_SCHEME_Marshal(const TPMT_KDF_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_ASYM_SCHEME_Marshal(const TPMU_ASYM_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_RSA_SCHEME_Marshal(const TPMI_ALG_RSA_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_RSA_SCHEME_Marshal(const TPMT_RSA_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_RSA_DECRYPT_Marshal(const TPMI_ALG_RSA_DECRYPT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_RSA_DECRYPT_Marshal(const TPMT_RSA_DECRYPT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PUBLIC_KEY_RSA_Marshal(const TPM2B_PUBLIC_KEY_RSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_RSA_KEY_BITS_Marshal(const TPMI_RSA_KEY_BITS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PRIVATE_KEY_RSA_Marshal(const TPM2B_PRIVATE_KEY_RSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ECC_PARAMETER_Marshal(const TPM2B_ECC_PARAMETER *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ECC_POINT_Marshal(const TPMS_ECC_POINT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ECC_POINT_Marshal(const TPM2B_ECC_POINT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_ECC_SCHEME_Marshal(const TPMI_ALG_ECC_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ECC_CURVE_Marshal(const TPMI_ECC_CURVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_ECC_SCHEME_Marshal(const TPMT_ECC_SCHEME *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ALGORITHM_DETAIL_ECC_Marshal(const TPMS_ALGORITHM_DETAIL_ECC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSA_Marshal(const TPMS_SIGNATURE_RSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSASSA_Marshal(const TPMS_SIGNATURE_RSASSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_RSAPSS_Marshal(const TPMS_SIGNATURE_RSAPSS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECC_Marshal(const TPMS_SIGNATURE_ECC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECDSA_Marshal(const TPMS_SIGNATURE_ECDSA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECDAA_Marshal(const TPMS_SIGNATURE_ECDAA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_SM2_Marshal(const TPMS_SIGNATURE_SM2 *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_SIGNATURE_ECSCHNORR_Marshal(const TPMS_SIGNATURE_ECSCHNORR *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SIGNATURE_Marshal(const TPMU_SIGNATURE *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SIGNATURE_Marshal(const TPMT_SIGNATURE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ENCRYPTED_SECRET_Marshal(const TPM2B_ENCRYPTED_SECRET *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMI_ALG_PUBLIC_Marshal(const TPMI_ALG_PUBLIC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_PUBLIC_ID_Marshal(const TPMU_PUBLIC_ID *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_KEYEDHASH_PARMS_Marshal(const TPMS_KEYEDHASH_PARMS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_RSA_PARMS_Marshal(const TPMS_RSA_PARMS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_ECC_PARMS_Marshal(const TPMS_ECC_PARMS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_PUBLIC_PARMS_Marshal(const TPMU_PUBLIC_PARMS *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_PARMS_Marshal(const TPMT_PUBLIC_PARMS *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_Marshal(const TPMT_PUBLIC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_PUBLIC_D_Marshal(const TPMT_PUBLIC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PUBLIC_Marshal(const TPM2B_PUBLIC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_TEMPLATE_Marshal(const TPM2B_TEMPLATE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMU_SENSITIVE_COMPOSITE_Marshal(const TPMU_SENSITIVE_COMPOSITE *source, UINT16 *written, BYTE **buffer, INT32 *size, UINT32 selector);
+ LIB_EXPORT TPM_RC
+ TSS_TPMT_SENSITIVE_Marshal(const TPMT_SENSITIVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_SENSITIVE_Marshal(const TPM2B_SENSITIVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_PRIVATE_Marshal(const TPM2B_PRIVATE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_ID_OBJECT_Marshal(const TPM2B_ID_OBJECT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMA_NV_Marshal(const TPMA_NV *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_NV_PUBLIC_Marshal(const TPMS_NV_PUBLIC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_NV_PUBLIC_Marshal(const TPM2B_NV_PUBLIC *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CONTEXT_SENSITIVE_Marshal(const TPM2B_CONTEXT_SENSITIVE *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CONTEXT_DATA_Marshal(const TPM2B_CONTEXT_DATA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CONTEXT_Marshal(const TPMS_CONTEXT *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPMS_CREATION_DATA_Marshal(const TPMS_CREATION_DATA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+ LIB_EXPORT TPM_RC
+ TSS_TPM2B_CREATION_DATA_Marshal(const TPM2B_CREATION_DATA *source, UINT16 *written, BYTE **buffer, INT32 *size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal12.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal12.h
new file mode 100644
index 000000000..b2f21d47e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssmarshal12.h
@@ -0,0 +1,192 @@
+/********************************************************************************/
+/* */
+/* TSS Marshal and Unmarshal */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: tssmarshal12.h 1286 2018-07-27 19:20:16Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API should be stable, but is less guaranteed.
+
+ It is useful for applications that have to marshal / unmarshal
+ structures for file save / load.
+*/
+
+#ifndef TSSMARSHAL12_H
+#define TSSMARSHAL12_H
+
+#include "BaseTypes.h"
+#include <ibmtss/TPM_Types.h>
+
+#include <ibmtss/Parameters12.h>
+#include <ibmtss/tpmstructures12.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ TPM_RC
+ TSS_ActivateIdentity_In_Marshalu(const ActivateIdentity_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreateEndorsementKeyPair_In_Marshalu(const CreateEndorsementKeyPair_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreateWrapKey_In_Marshalu(const CreateWrapKey_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Extend_In_Marshalu(const Extend_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_FlushSpecific_In_Marshalu(const FlushSpecific_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetCapability12_In_Marshalu(const GetCapability12_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_LoadKey2_In_Marshalu(const LoadKey2_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_MakeIdentity_In_Marshalu(const MakeIdentity_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_DefineSpace12_In_Marshalu(const NV_DefineSpace12_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadValueAuth_In_Marshalu(const NV_ReadValueAuth_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadValue_In_Marshalu(const NV_ReadValue_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_WriteValue_In_Marshalu(const NV_WriteValue_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_WriteValueAuth_In_Marshalu(const NV_WriteValueAuth_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_OwnerReadInternalPub_In_Marshalu(const OwnerReadInternalPub_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_OwnerSetDisable_In_Marshalu(const OwnerSetDisable_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_OSAP_In_Marshalu(const OSAP_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PcrRead12_In_Marshalu(const PcrRead12_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PCR_Reset12_In_Marshalu(const PCR_Reset12_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Quote2_In_Marshalu(const Quote2_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ReadPubek_In_Marshalu(const ReadPubek_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Sign12_In_Marshalu(const Sign12_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Startup12_In_Marshalu(const Startup12_In *source, UINT16 *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TakeOwnership_In_Marshalu(const TakeOwnership_In *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+
+ TPM_RC
+ TSS_ActivateIdentity_Out_Unmarshalu(ActivateIdentity_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreateEndorsementKeyPair_Out_Unmarshalu(CreateEndorsementKeyPair_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_CreateWrapKey_Out_Unmarshalu(CreateWrapKey_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Extend_Out_Unmarshalu(Extend_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_GetCapability12_Out_Unmarshalu(GetCapability12_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_LoadKey2_Out_Unmarshalu(LoadKey2_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_MakeIdentity_Out_Unmarshalu(MakeIdentity_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadValueAuth_Out_Unmarshalu(NV_ReadValueAuth_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_NV_ReadValue_Out_Unmarshalu(NV_ReadValue_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_OIAP_Out_Unmarshalu(OIAP_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_OSAP_Out_Unmarshalu(OSAP_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_OwnerReadInternalPub_Out_Unmarshalu(OwnerReadInternalPub_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_PcrRead12_Out_Unmarshalu(PcrRead12_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Quote2_Out_Unmarshalu(Quote2_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_ReadPubek_Out_Unmarshalu(ReadPubek_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_Sign12_Out_Unmarshalu(Sign12_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TakeOwnership_Out_Unmarshalu(TakeOwnership_Out *target, TPM_ST tag, BYTE **buffer, uint32_t *size);
+
+ TPM_RC
+ TSS_TPM_STARTUP_TYPE_Marshalu(const TPM_STARTUP_TYPE *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+
+ TPM_RC
+ TSS_TPM_VERSION_Marshalu(const TPM_VERSION*source, uint16_t *written, BYTE **buffer, uint32_t *size);
+
+ TPM_RC
+ TSS_TPM_PCR_SELECTION_Marshalu(const TPM_PCR_SELECTION *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PCR_INFO_SHORT_Marshalu(const TPM_PCR_INFO_SHORT *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM4B_TPM_PCR_INFO_LONG_Marshalu(const TPM_PCR_INFO_LONG *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PCR_INFO_LONG_Marshalu(const TPM_PCR_INFO_LONG *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+
+ TPM_RC
+ TSS_TPM_SYMMETRIC_KEY_Marshalu(const TPM_SYMMETRIC_KEY *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+
+ TPM_RC
+ TSS_TPM_RSA_KEY_PARMS_Marshalu(const TPM_RSA_KEY_PARMS *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPMU_PARMS_Marshalu(const TPMU_PARMS *source, uint16_t *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ TPM_RC
+ TSS_TPM4B_TPMU_PARMS_Marshalu(const TPMU_PARMS *source, uint16_t *written, BYTE **buffer, uint32_t *size, uint32_t selector);
+ TPM_RC
+ TSS_TPM_KEY_PARMS_Marshalu(const TPM_KEY_PARMS *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_STORE_PUBKEY_Marshalu(const TPM_STORE_PUBKEY *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_KEY12_PUBKEY_Marshalu(const TPM_KEY12 *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_PUBKEY_Marshalu(const TPM_PUBKEY *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_KEY12_Marshalu(const TPM_KEY12 *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_QUOTE_INFO2_Marshalu(const TPM_QUOTE_INFO2 *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_EK_BLOB_Marshalu(const TPM_EK_BLOB *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_EK_BLOB_ACTIVATE_Marshalu(const TPM_EK_BLOB_ACTIVATE *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_NV_ATTRIBUTES_Marshalu(const TPM_NV_ATTRIBUTES *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_NV_DATA_PUBLIC_Marshalu(const TPM_NV_DATA_PUBLIC *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+ TPM_RC
+ TSS_TPM_CAP_VERSION_INFO_Marshalu(const TPM_CAP_VERSION_INFO *source, uint16_t *written, BYTE **buffer, uint32_t *size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprint.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprint.h
new file mode 100644
index 000000000..46d9e87ce
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprint.h
@@ -0,0 +1,290 @@
+/********************************************************************************/
+/* */
+/* Structure Print Utilities */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2020. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API is not guaranteed to be stable, and the format of the
+ output is subject to change
+
+ It is useful for application debug.
+*/
+
+#ifndef TSSPRINT_H
+#define TSSPRINT_H
+
+#include <stdint.h>
+#include <stdio.h>
+
+#include <ibmtss/TPM_Types.h>
+
+#define LOGLEVEL_INFO 6 /* LOGLEVEL_INFO prints a concise output */
+#define LOGLEVEL_DEBUG 7 /* LOGLEVEL_DEBUG prints a verbose output */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ #ifdef TPM_TSS_NO_PRINT
+
+ /* return code to eliminate "statement has no effect" compiler warning */
+ extern int tssSwallowRc;
+ /* function prototype to match the printf prototype */
+ int TSS_SwallowPrintf(const char *format, ...);
+ /* macro to compile out printf */
+#define printf tssSwallowRc = 0 && TSS_SwallowPrintf
+
+ #endif
+
+ LIB_EXPORT
+ uint32_t TSS_Array_Scan(unsigned char **data, size_t *len, const char *string);
+ LIB_EXPORT
+ void TSS_PrintAll(const char *string, const unsigned char* buff, uint32_t length);
+ LIB_EXPORT
+ void TSS_PrintAlli(const char *string, unsigned int indent,
+ const unsigned char* buff, uint32_t length);
+ LIB_EXPORT
+ void TSS_PrintAllLogLevel(uint32_t log_level, const char *string, unsigned int indent,
+ const unsigned char* buff, uint32_t length);
+ LIB_EXPORT
+ void TSS_TPM2B_Print(const char *string, unsigned int indent, TPM2B *source);
+ LIB_EXPORT
+ void TSS_TPM_ALG_ID_Print(const char *string, TPM_ALG_ID source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_ECC_CURVE_Print(const char *string, TPM_ECC_CURVE source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_TAGGED_POLICY_Print(TPMS_TAGGED_POLICY *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_CC_Print(const char *string, TPM_CC source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_TPMA_ALGORITHM_Print(TPMA_ALGORITHM source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_CLOCK_ADJUST_Print(const char *string, TPM_CLOCK_ADJUST source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_EO_Print(const char *string, TPM_EO source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_ST_Print(const char *string, TPM_ST source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_SU_Print(const char *string, TPM_SU source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_SE_Print(const char *string, TPM_SE source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_CAP_Print(const char *string, TPM_CAP source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_HANDLE_Print(const char *string, TPM_HANDLE source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_TPMA_ALGORITHM_Print(TPMA_ALGORITHM source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_OBJECT_Print(const char *string, TPMA_OBJECT source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_LOCALITY_Print(TPMA_LOCALITY source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_SESSION_Print(TPMA_SESSION source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_PERMANENT_Print(TPMA_PERMANENT source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_STARTUP_CLEAR_Print(TPMA_STARTUP_CLEAR source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_MEMORY_Print(TPMA_MEMORY source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_MODES_Print(TPMA_MODES source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMI_YES_NO_Print(const char *string, TPMI_YES_NO source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_HA_Print(TPMU_HA *source, uint32_t selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_HA_Print(TPMT_HA *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_PCR_SELECT_Print(TPMS_PCR_SELECT *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_PCR_SELECTION_Print(TPMS_PCR_SELECTION *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPML_PCR_SELECTION_Print(TPML_PCR_SELECTION *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_TK_CREATION_Print(TPMT_TK_CREATION *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_TK_VERIFIED_Print(TPMT_TK_VERIFIED *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_TK_AUTH_Print(TPMT_TK_AUTH *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_TK_HASHCHECK_Print(TPMT_TK_HASHCHECK *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPML_CC_Print(TPML_CC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPML_ALG_Print(TPML_ALG *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPML_DIGEST_Print(TPML_DIGEST *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPML_DIGEST_VALUES_Print(TPML_DIGEST_VALUES *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_CLOCK_INFO_Print(TPMS_CLOCK_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_TIME_INFO_Print(TPMS_TIME_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_TIME_ATTEST_INFO_Print(TPMS_TIME_ATTEST_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_CERTIFY_INFO_Print(TPMS_CERTIFY_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_QUOTE_INFO_Print(TPMS_QUOTE_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_COMMAND_AUDIT_INFO_Print(TPMS_COMMAND_AUDIT_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SESSION_AUDIT_INFO_Print(TPMS_SESSION_AUDIT_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_CREATION_INFO_Print(TPMS_CREATION_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_NV_CERTIFY_INFO_Print(TPMS_NV_CERTIFY_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_NV_DIGEST_CERTIFY_INFO_Print(TPMS_NV_DIGEST_CERTIFY_INFO *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMI_ST_ATTEST_Print(const char *string, TPMI_ST_ATTEST selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_ATTEST_Print(TPMU_ATTEST *source, TPMI_ST_ATTEST selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_ATTEST_Print(TPMS_ATTEST *source, unsigned int indent);
+#if 0
+ LIB_EXPORT
+ void TSS_TPM2B_ATTEST_Print(TPM2B_ATTEST *source, unsigned int indent);
+#endif
+ LIB_EXPORT
+ void TSS_TPMS_AUTH_COMMAND_Print(TPMS_AUTH_COMMAND *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_AUTH_RESPONSE_Print(TPMS_AUTH_RESPONSE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_SYM_KEY_BITS_Print(TPMU_SYM_KEY_BITS *source, TPMI_ALG_SYM selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM_KEY_BITS_Print(TPM_KEY_BITS source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_SYM_DEF_Print(TPMT_SYM_DEF *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_SYM_DEF_OBJECT_Print(TPMT_SYM_DEF_OBJECT *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_DERIVE_Print(TPMS_DERIVE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SENSITIVE_CREATE_Print(TPMS_SENSITIVE_CREATE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM2B_SENSITIVE_CREATE_Print(const char *string, TPM2B_SENSITIVE_CREATE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SCHEME_ECDAA_Print(TPMS_SCHEME_ECDAA *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SCHEME_XOR_Print(TPMS_SCHEME_XOR *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_SCHEME_KEYEDHASH_Print(TPMU_SCHEME_KEYEDHASH *source, TPMI_ALG_KEYEDHASH_SCHEME selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_KEYEDHASH_SCHEME_Print(TPMT_KEYEDHASH_SCHEME *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_SIG_SCHEME_Print(TPMU_SIG_SCHEME *source, TPMI_ALG_SIG_SCHEME selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_SIG_SCHEME_Print(TPMT_SIG_SCHEME *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_KDF_SCHEME_Print(TPMT_KDF_SCHEME *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_ASYM_SCHEME_Print(TPMU_ASYM_SCHEME *source, TPMI_ALG_ASYM_SCHEME selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_ASYM_SCHEME_Print(TPMT_ASYM_SCHEME *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_RSA_SCHEME_Print(TPMT_RSA_SCHEME *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_RSA_DECRYPT_Print(TPMT_RSA_DECRYPT *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMI_RSA_KEY_BITS_Print(TPMI_RSA_KEY_BITS source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_ECC_POINT_Print(TPMS_ECC_POINT *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM2B_ECC_POINT_Print(const char *string, TPM2B_ECC_POINT *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMI_ECC_CURVE_Print(const char *string, TPMI_ECC_CURVE source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_ECC_SCHEME_Print(TPMT_ECC_SCHEME *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_ALGORITHM_DETAIL_ECC_Print(TPMS_ALGORITHM_DETAIL_ECC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SIGNATURE_RSA_Print(TPMS_SIGNATURE_RSA *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SIGNATURE_RSASSA_Print(TPMS_SIGNATURE_RSASSA *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_SIGNATURE_ECC_Print(TPMS_SIGNATURE_ECC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_SIGNATURE_Print(TPMU_SIGNATURE *source, TPMI_ALG_SIG_SCHEME selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_SIGNATURE_Print(TPMT_SIGNATURE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_PUBLIC_ID_Print(TPMU_PUBLIC_ID *source, TPMI_ALG_PUBLIC selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMI_ALG_PUBLIC_Print(const char *string, TPMI_ALG_PUBLIC source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_ECC_PARMS_Print(TPMS_ECC_PARMS *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_RSA_PARMS_Print(TPMS_RSA_PARMS *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_KEYEDHASH_PARMS_Print(TPMS_KEYEDHASH_PARMS *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_ASYM_PARMS_Print(TPMS_ASYM_PARMS *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_PUBLIC_PARMS_Print(TPMU_PUBLIC_PARMS *source, UINT32 selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_PUBLIC_PARMS_Print(TPMT_PUBLIC_PARMS *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_PUBLIC_Print(TPMT_PUBLIC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM2B_PUBLIC_Print(const char *string, TPM2B_PUBLIC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMU_SENSITIVE_COMPOSITE_Print(TPMU_SENSITIVE_COMPOSITE *source, uint32_t selector, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMT_SENSITIVE_Print(TPMT_SENSITIVE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM2B_SENSITIVE_Print(TPM2B_SENSITIVE *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_NV_PIN_COUNTER_PARAMETERS_Print(TPMS_NV_PIN_COUNTER_PARAMETERS *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMA_NV_Print(TPMA_NV source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_NV_PUBLIC_Print(TPMS_NV_PUBLIC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM2B_NV_PUBLIC_Print(TPM2B_NV_PUBLIC *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_CONTEXT_DATA_Print(TPMS_CONTEXT_DATA *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_CONTEXT_Print(TPMS_CONTEXT *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPMS_CREATION_DATA_Print(TPMS_CREATION_DATA *source, unsigned int indent);
+ LIB_EXPORT
+ void TSS_TPM2B_CREATION_DATA_Print(TPM2B_CREATION_DATA *source, unsigned int indent);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprintcmd.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprintcmd.h
new file mode 100644
index 000000000..eb717ba37
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssprintcmd.h
@@ -0,0 +1,172 @@
+/********************************************************************************/
+/* */
+/* Structure Print Utilities */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* */
+/* (c) Copyright IBM Corporation 2015 - 2019. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API is not guaranteed to be stable, and the format of the
+ output is subject to change
+
+ It is useful for application debug.
+*/
+
+#ifndef TSSPRINTCMD_H
+#define TSSPRINTCMD_H
+
+#include <ibmtss/tss.h>
+
+#include <stdint.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ void ActivateCredential_In_Print(ActivateCredential_In *in, unsigned int indent);
+ void CertifyCreation_In_Print(CertifyCreation_In *in, unsigned int indent);
+ void CertifyX509_In_Print(CertifyX509_In *in, unsigned int indent);
+ void Certify_In_Print(Certify_In *in, unsigned int indent);
+ void ChangeEPS_In_Print(ChangeEPS_In *in, unsigned int indent);
+ void ChangePPS_In_Print(ChangePPS_In *in, unsigned int indent);
+ void ClearControl_In_Print(ClearControl_In *in, unsigned int indent);
+ void Clear_In_Print(Clear_In *in, unsigned int indent);
+ void ClockRateAdjust_In_Print(ClockRateAdjust_In *in, unsigned int indent);
+ void ClockSet_In_Print(ClockSet_In *in, unsigned int indent);
+ void Commit_In_Print(Commit_In *in, unsigned int indent);
+ void ContextLoad_In_Print(ContextLoad_In *in, unsigned int indent);
+ void ContextSave_In_Print(ContextSave_In *in, unsigned int indent);
+ void Create_In_Print(Create_In *in, unsigned int indent);
+ void CreateLoaded_In_Print(CreateLoaded_In *in, unsigned int indent);
+ void CreatePrimary_In_Print(CreatePrimary_In *in, unsigned int indent);
+ void DictionaryAttackLockReset_In_Print(DictionaryAttackLockReset_In *in, unsigned int indent);
+ void DictionaryAttackParameters_In_Print(DictionaryAttackParameters_In *in, unsigned int indent);
+ void Duplicate_In_Print(Duplicate_In *in, unsigned int indent);
+ void ECC_Parameters_In_Print(ECC_Parameters_In *in, unsigned int indent);
+ void ECDH_KeyGen_In_Print(ECDH_KeyGen_In *in, unsigned int indent);
+ void ECDH_ZGen_In_Print(ECDH_ZGen_In *in, unsigned int indent);
+ void EC_Ephemeral_In_Print(EC_Ephemeral_In *in, unsigned int indent);
+ void EncryptDecrypt_In_Print(EncryptDecrypt_In *in, unsigned int indent);
+ void EncryptDecrypt2_In_Print(EncryptDecrypt2_In *in, unsigned int indent);
+ void EventSequenceComplete_In_Print(EventSequenceComplete_In *in, unsigned int indent);
+ void EvictControl_In_Print(EvictControl_In *in, unsigned int indent);
+ void FlushContext_In_Print(FlushContext_In *in, unsigned int indent);
+ void GetCapability_In_Print(GetCapability_In *in, unsigned int indent);
+ void GetCommandAuditDigest_In_Print(GetCommandAuditDigest_In *in, unsigned int indent);
+ void GetRandom_In_Print(GetRandom_In *in, unsigned int indent);
+ void GetSessionAuditDigest_In_Print(GetSessionAuditDigest_In *in, unsigned int indent);
+ void GetTime_In_Print(GetTime_In *in, unsigned int indent);
+ void HMAC_Start_In_Print(HMAC_Start_In *in, unsigned int indent);
+ void HMAC_In_Print(HMAC_In *in, unsigned int indent);
+ void HashSequenceStart_In_Print(HashSequenceStart_In *in, unsigned int indent);
+ void Hash_In_Print(Hash_In *in, unsigned int indent);
+ void HierarchyChangeAuth_In_Print(HierarchyChangeAuth_In *in, unsigned int indent);
+ void HierarchyControl_In_Print(HierarchyControl_In *in, unsigned int indent);
+ void Import_In_Print(Import_In *in, unsigned int indent);
+ void IncrementalSelfTest_In_Print(IncrementalSelfTest_In *in, unsigned int indent);
+ void LoadExternal_In_Print(LoadExternal_In *in, unsigned int indent);
+ void Load_In_Print(Load_In *in, unsigned int indent);
+ void MakeCredential_In_Print(MakeCredential_In *in, unsigned int indent);
+ void NTC2_PreConfig_In_Print(NTC2_PreConfig_In *in, unsigned int indent);
+ void NV_Certify_In_Print(NV_Certify_In *in, unsigned int indent);
+ void NV_ChangeAuth_In_Print(NV_ChangeAuth_In *in, unsigned int indent);
+ void NV_DefineSpace_In_Print(NV_DefineSpace_In *in, unsigned int indent);
+ void NV_Extend_In_Print(NV_Extend_In *in, unsigned int indent);
+ void NV_GlobalWriteLock_In_Print(NV_GlobalWriteLock_In *in, unsigned int indent);
+ void NV_Increment_In_Print(NV_Increment_In *in, unsigned int indent);
+ void NV_ReadLock_In_Print(NV_ReadLock_In *in, unsigned int indent);
+ void NV_ReadPublic_In_Print(NV_ReadPublic_In *in, unsigned int indent);
+ void NV_Read_In_Print(NV_Read_In *in, unsigned int indent);
+ void NV_SetBits_In_Print(NV_SetBits_In *in, unsigned int indent);
+ void NV_UndefineSpaceSpecial_In_Print(NV_UndefineSpaceSpecial_In *in, unsigned int indent);
+ void NV_UndefineSpace_In_Print(NV_UndefineSpace_In *in, unsigned int indent);
+ void NV_WriteLock_In_Print(NV_WriteLock_In *in, unsigned int indent);
+ void NV_Write_In_Print(NV_Write_In *in, unsigned int indent);
+ void ObjectChangeAuth_In_Print(ObjectChangeAuth_In *in, unsigned int indent);
+ void PCR_Allocate_In_Print(PCR_Allocate_In *in, unsigned int indent);
+ void PCR_Event_In_Print(PCR_Event_In *in, unsigned int indent);
+ void PCR_Extend_In_Print(PCR_Extend_In *in, unsigned int indent);
+ void PCR_Read_In_Print(PCR_Read_In *in, unsigned int indent);
+ void PCR_Reset_In_Print(PCR_Reset_In *in, unsigned int indent);
+ void PCR_SetAuthPolicy_In_Print(PCR_SetAuthPolicy_In *in, unsigned int indent);
+ void PCR_SetAuthValue_In_Print(PCR_SetAuthValue_In *in, unsigned int indent);
+ void PP_Commands_In_Print(PP_Commands_In *in, unsigned int indent);
+ void PolicyAuthValue_In_Print(PolicyAuthValue_In *in, unsigned int indent);
+ void PolicyAuthorizeNV_In_Print(PolicyAuthorizeNV_In *in, unsigned int indent);
+ void PolicyAuthorize_In_Print(PolicyAuthorize_In *in, unsigned int indent);
+ void PolicyCommandCode_In_Print(PolicyCommandCode_In *in, unsigned int indent);
+ void PolicyCounterTimer_In_Print(PolicyCounterTimer_In *in, unsigned int indent);
+ void PolicyCpHash_In_Print(PolicyCpHash_In *in, unsigned int indent);
+ void PolicyDuplicationSelect_In_Print(PolicyDuplicationSelect_In *in, unsigned int indent);
+ void PolicyGetDigest_In_Print(PolicyGetDigest_In *in, unsigned int indent);
+ void PolicyLocality_In_Print(PolicyLocality_In *in, unsigned int indent);
+ void PolicyNV_In_Print(PolicyNV_In *in, unsigned int indent);
+ void PolicyNameHash_In_Print(PolicyNameHash_In *in, unsigned int indent);
+ void PolicyNvWritten_In_Print(PolicyNvWritten_In *in, unsigned int indent);
+ void PolicyOR_In_Print(PolicyOR_In *in, unsigned int indent);
+ void PolicyPCR_In_Print(PolicyPCR_In *in, unsigned int indent);
+ void PolicyPassword_In_Print(PolicyPassword_In *in, unsigned int indent);
+ void PolicyPhysicalPresence_In_Print(PolicyPhysicalPresence_In *in, unsigned int indent);
+ void PolicyRestart_In_Print(PolicyRestart_In *in, unsigned int indent);
+ void PolicySecret_In_Print(PolicySecret_In *in, unsigned int indent);
+ void PolicySigned_In_Print(PolicySigned_In *in, unsigned int indent);
+ void PolicyTemplate_In_Print(PolicyTemplate_In *in, unsigned int indent);
+ void PolicyTicket_In_Print(PolicyTicket_In *in, unsigned int indent);
+ void Quote_In_Print(Quote_In *in, unsigned int indent);
+ void RSA_Decrypt_In_Print(RSA_Decrypt_In *in, unsigned int indent);
+ void RSA_Encrypt_In_Print(RSA_Encrypt_In *in, unsigned int indent);
+ void ReadPublic_In_Print(ReadPublic_In *in, unsigned int indent);
+ void Rewrap_In_Print(Rewrap_In *in, unsigned int indent);
+ void SelfTest_In_Print(SelfTest_In *in, unsigned int indent);
+ void SequenceComplete_In_Print(SequenceComplete_In *in, unsigned int indent);
+ void SequenceUpdate_In_Print(SequenceUpdate_In *in, unsigned int indent);
+ void SetAlgorithmSet_In_Print(SetAlgorithmSet_In *in, unsigned int indent);
+ void SetCommandCodeAuditStatus_In_Print(SetCommandCodeAuditStatus_In *in, unsigned int indent);
+ void SetPrimaryPolicy_In_Print(SetPrimaryPolicy_In *in, unsigned int indent);
+ void Shutdown_In_Print(Shutdown_In *in, unsigned int indent);
+ void Sign_In_Print(Sign_In *in, unsigned int indent);
+ void StartAuthSession_In_Print(StartAuthSession_In *in, unsigned int indent);
+ void Startup_In_Print(Startup_In *in, unsigned int indent);
+ void StirRandom_In_Print(StirRandom_In *in, unsigned int indent);
+ void TestParms_In_Print(TestParms_In *in, unsigned int indent);
+ void Unseal_In_Print(Unseal_In *in, unsigned int indent);
+ void VerifySignature_In_Print(VerifySignature_In *in, unsigned int indent);
+ void ZGen_2Phase_In_Print(ZGen_2Phase_In *in, unsigned int indent);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssresponsecode.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssresponsecode.h
new file mode 100644
index 000000000..b3de0e83e
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssresponsecode.h
@@ -0,0 +1,62 @@
+/********************************************************************************/
+/* */
+/* TSS Response Code Printer */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: tssresponsecode.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2015, 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API likely to be stable, but the format and text output are
+ subject to change
+
+ It is useful for application debug.
+*/
+
+#ifndef TSSRESPONSECODE_H
+#define TSSRESPONSECODE_H
+
+#include <ibmtss/TPM_Types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ LIB_EXPORT
+ void TSS_ResponseCode_toString(const char **msg, const char **submsg, const char **num, TPM_RC rc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsstransmit.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsstransmit.h
new file mode 100644
index 000000000..de35d92f7
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tsstransmit.h
@@ -0,0 +1,80 @@
+/********************************************************************************/
+/* */
+/* TSS Transmit */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: tsstransmit.h 1257 2018-06-27 20:52:08Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2015, 2017, 2018 */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+#ifndef TSSTRANSMIT_H
+#define TSSTRANSMIT_H
+
+#include <stdint.h>
+
+#include <ibmtss/tss.h>
+
+/* copy of TpmTcpProtocol.h. These are only used with the SW TPM. */
+#define TPM_SIGNAL_POWER_ON 1
+#define TPM_SIGNAL_POWER_OFF 2
+#define TPM_SIGNAL_NV_ON 11
+
+/* copy of TpmTcpProtocol.h. These are only used with the SW TPM, but they may be used with a
+ resource manager in the future. */
+#define TPM_SEND_COMMAND 8
+#define TPM_SESSION_END 20
+#define TPM_STOP 21
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ LIB_EXPORT TPM_RC
+ TSS_TransmitPlatform(TSS_CONTEXT *tssContext,
+ uint32_t command, const char *message);
+ LIB_EXPORT TPM_RC
+ TSS_TransmitCommand(TSS_CONTEXT *tssContext,
+ uint32_t command, const char *message);
+ LIB_EXPORT TPM_RC
+ TSS_Transmit(TSS_CONTEXT *tssContext,
+ uint8_t *responseBuffer, uint32_t *read,
+ const uint8_t *commandBuffer, uint32_t written,
+ const char *message);
+
+ LIB_EXPORT TPM_RC
+ TSS_Close(TSS_CONTEXT *tssContext);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssutils.h b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssutils.h
new file mode 100644
index 000000000..e0800d1a7
--- /dev/null
+++ b/roms/skiboot/libstb/tss2/ibmtpm20tss/utils/ibmtss/tssutils.h
@@ -0,0 +1,101 @@
+/********************************************************************************/
+/* */
+/* TSS and Application Utilities */
+/* Written by Ken Goldman */
+/* IBM Thomas J. Watson Research Center */
+/* $Id: tssutils.h 1324 2018-08-31 16:36:12Z kgoldman $ */
+/* */
+/* (c) Copyright IBM Corporation 2015, 2018. */
+/* */
+/* All rights reserved. */
+/* */
+/* Redistribution and use in source and binary forms, with or without */
+/* modification, are permitted provided that the following conditions are */
+/* met: */
+/* */
+/* Redistributions of source code must retain the above copyright notice, */
+/* this list of conditions and the following disclaimer. */
+/* */
+/* Redistributions in binary form must reproduce the above copyright */
+/* notice, this list of conditions and the following disclaimer in the */
+/* documentation and/or other materials provided with the distribution. */
+/* */
+/* Neither the names of the IBM Corporation nor the names of its */
+/* contributors may be used to endorse or promote products derived from */
+/* this software without specific prior written permission. */
+/* */
+/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
+/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
+/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR */
+/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
+/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
+/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
+/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */
+/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY */
+/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
+/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */
+/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/********************************************************************************/
+
+/* This is a semi-public header. The API is subject to change.
+
+ It is useful rapid application development, and as sample code. It is risky for production code.
+
+*/
+
+#ifndef TSSUTILS_H
+#define TSSUTILS_H
+
+#include <stdio.h>
+
+#include <ibmtss/TPM_Types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef TPM_RC (*UnmarshalFunction_t)(void *target, uint8_t **buffer, uint32_t *size);
+ typedef TPM_RC (*UnmarshalFunctionFlag_t)(void *target, uint8_t **buffer, uint32_t *size, BOOL allowNull);
+ typedef TPM_RC (*MarshalFunction_t)(void *source, uint16_t *written, uint8_t **buffer, uint32_t *size);
+
+ LIB_EXPORT
+ TPM_RC TSS_Malloc(unsigned char **buffer, uint32_t size);
+ LIB_EXPORT
+ TPM_RC TSS_Realloc(unsigned char **buffer, uint32_t size);
+
+ LIB_EXPORT
+ TPM_RC TSS_Structure_Marshal(uint8_t **buffer,
+ uint16_t *written,
+ void *structure,
+ MarshalFunction_t marshalFunction);
+
+ LIB_EXPORT
+ TPM_RC TSS_TPM2B_Copy(TPM2B *target, TPM2B *source, uint16_t targetSize);
+
+ LIB_EXPORT
+ TPM_RC TSS_TPM2B_Append(TPM2B *target, TPM2B *source, uint16_t targetSize);
+
+ LIB_EXPORT
+ TPM_RC TSS_TPM2B_Create(TPM2B *target, uint8_t *buffer, uint16_t size, uint16_t targetSize);
+
+ LIB_EXPORT
+ TPM_RC TSS_TPM2B_CreateUint32(TPM2B *target, uint32_t source, uint16_t targetSize);
+
+ LIB_EXPORT
+ TPM_RC TSS_TPM2B_StringCopy(TPM2B *target, const char *source, uint16_t targetSize);
+
+ LIB_EXPORT
+ BOOL TSS_TPM2B_Compare(TPM2B *expect, TPM2B *actual);
+
+ LIB_EXPORT
+ uint16_t TSS_GetDigestSize(TPM_ALG_ID hashAlg);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef TPM_TSS_NOFILE
+#include <ibmtss/tssfile.h>
+#endif
+
+#endif