Skip to content

Commit

Permalink
Initial ms-tpm-20-ref port to Zephyr
Browse files Browse the repository at this point in the history
Make ms-tpm-20-ref compile on Zephyr.
  • Loading branch information
arturkow2000 committed Jul 20, 2022
1 parent aca0d16 commit b0774a2
Show file tree
Hide file tree
Showing 7 changed files with 787 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TPMCmd/tpm/include/Implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
#define FALSE 0
#define YES 1
#define NO 0
#define SET 1
// FIXME: temporary workaround to make ms-tpm compile
// #define SET 1
#define CLEAR 0

// Table 0:1 - Defines for Processor Values
Expand Down
208 changes: 208 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
if (CONFIG_TPM2_MS_REF)
add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/zephyr/platform)

zephyr_library_named(ms-tpm-20-ref)
target_include_directories(
ms-tpm-20-ref PUBLIC ${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/include ${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/include/prototypes
)
target_compile_definitions(
ms-tpm-20-ref PRIVATE USE_WOLFCRYPT
)
zephyr_library_sources(
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Ecdaa/Commit.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Context/EvictControl.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Context/ContextLoad.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Context/ContextSave.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Context/Context_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Context/FlushContext.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/Policy_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyPassword.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyCommandCode.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyLocality.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyPhysicalPresence.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicySigned.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyDuplicationSelect.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyTicket.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyPCR.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyNvWritten.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyTemplate.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyAuthorize.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyAuthorizeNV.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyNameHash.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyAuthValue.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyOR.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyCounterTimer.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyCpHash.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyNV.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicySecret.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/EA/PolicyGetDigest.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Startup/Startup.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Startup/Shutdown.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/EC_Ephemeral.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/ECDH_ZGen.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/ZGen_2Phase.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/RSA_Encrypt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/RSA_Decrypt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/ECC_Parameters.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Asymmetric/ECDH_KeyGen.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Duplication/Rewrap.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Duplication/Import.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Duplication/Duplicate.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/ObjectChangeAuth.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/MakeCredential.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/ReadPublic.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/Create.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/LoadExternal.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/ActivateCredential.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/Load.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/Object_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/Unseal.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Object/CreateLoaded.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Vendor/Vendor_TCG_Test.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Capability/GetCapability.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Capability/TestParms.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Signature/Sign.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Signature/VerifySignature.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/FieldUpgrade/FirmwareRead.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/FieldUpgrade/FieldUpgradeStart.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/FieldUpgrade/FieldUpgradeData.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/CommandAudit/SetCommandCodeAuditStatus.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_Extend.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_Reset.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_Event.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_Read.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_SetAuthValue.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_Allocate.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/PCR/PCR_SetAuthPolicy.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/HashHMAC/MAC_Start.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/HashHMAC/HashSequenceStart.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/HashHMAC/EventSequenceComplete.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/HashHMAC/SequenceUpdate.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/HashHMAC/SequenceComplete.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/HashHMAC/HMAC_Start.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/ClockTimer/ReadClock.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/ClockTimer/ClockSet.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/ClockTimer/ClockRateAdjust.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/HierarchyControl.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/ClearControl.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/ChangePPS.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/SetPrimaryPolicy.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/HierarchyChangeAuth.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/Clear.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/CreatePrimary.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Hierarchy/ChangeEPS.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/DA/DictionaryAttackParameters.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/DA/DictionaryAttackLockReset.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Testing/SelfTest.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Testing/GetTestResult.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Testing/IncrementalSelfTest.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Random/GetRandom.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Random/StirRandom.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Session/PolicyRestart.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Session/StartAuthSession.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/AttachedComponent/Policy_AC_SendSelect.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/AttachedComponent/AC_Send.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/AttachedComponent/AC_GetCapability.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/AttachedComponent/AC_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Misc/PP_Commands.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Misc/SetAlgorithmSet.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/Certify.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/GetSessionAuditDigest.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/Quote.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/CertifyCreation.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/GetTime.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/Attest_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Attestation/GetCommandAuditDigest.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_ChangeAuth.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_Extend.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_GlobalWriteLock.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_UndefineSpaceSpecial.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_UndefineSpace.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_Read.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_ReadPublic.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_DefineSpace.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_WriteLock.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_Write.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_SetBits.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_Increment.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_Certify.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_ReadLock.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/NVStorage/NV_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/MAC.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/HMAC.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/SMAC.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/Hash.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/EncryptDecrypt2.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/EncryptDecrypt_spt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/command/Symmetric/EncryptDecrypt.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/Session.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/PCR.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/Hierarchy.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/DA.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/NvReserved.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/Object.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/PP.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/Time.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/CommandAudit.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/subsystem/NvDynamic.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/main/SessionProcess.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/main/ExecCommand.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/main/CommandDispatcher.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptCmac.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/ltc/TpmToLtcMath.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/ltc/TpmToLtcSupport.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/ltc/TpmToLtcDesSupport.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptUtil.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/RsaKeyCache.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptRand.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/BnMath.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/BnConvert.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptSmac.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptSym.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/wolf/TpmToWolfSupport.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/wolf/TpmToWolfMath.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptPrimeSieve.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptHashData.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/ossl/TpmToOsslSupport.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/ossl/TpmToOsslDesSupport.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/ossl/TpmToOsslMath.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptEccData.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptEccSignature.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptPrime.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptEccMain.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptEccKeyExchange.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptDes.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/BnMemory.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/AlgorithmTests.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptHash.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/Ticket.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/PrimeData.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptSelfTest.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/crypt/CryptRsa.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/events/_TPM_Init.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/events/_TPM_Hash_Data.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/events/_TPM_Hash_Start.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/events/_TPM_Hash_End.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Power.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Marshal.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Locality.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Entity.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/TpmFail.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/ResponseCodeProcessing.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Response.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/PropertyCap.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/MathOnByteBuffers.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/IoBuffers.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Global.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/TpmSizeChecks.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/AlgorithmCap.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Handle.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/CommandCodeAttributes.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Manufacture.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Bits.c
${ZEPHYR_CURRENT_MODULE_DIR}/TPMCmd/tpm/src/support/Memory.c
)
target_link_libraries(ms-tpm-20-ref PRIVATE wolfSSL)
target_link_libraries(ms-tpm-20-ref PUBLIC ms-tpm-20-ref-zephyr-interface)
endif()
3 changes: 3 additions & 0 deletions zephyr/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
config TPM2_MS_REF
bool "Enable Microsoft reference TPM implementation library"
depends on WOLFSSL
3 changes: 3 additions & 0 deletions zephyr/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build:
cmake: ./zephyr
kconfig: ./zephyr/Kconfig
2 changes: 2 additions & 0 deletions zephyr/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
zephyr_interface_library_named(ms-tpm-20-ref-zephyr-interface)
target_include_directories(ms-tpm-20-ref-zephyr-interface INTERFACE include)
Loading

0 comments on commit b0774a2

Please sign in to comment.