/device/linaro/bootloader/edk2/SecurityPkg/Library/Tpm2CommandLib/ |
D | Tpm2NVStorage.c | 180 TPM2_NV_READPUBLIC_RESPONSE RecvBuffer; in Tpm2NvReadPublic() local 202 RecvBufferSize = sizeof (RecvBuffer); in Tpm2NvReadPublic() 203 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2NvReadPublic() 212 ResponseCode = SwapBytes32(RecvBuffer.Header.responseCode); in Tpm2NvReadPublic() 214 …DEBUG ((EFI_D_ERROR, "Tpm2NvReadPublic - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.respo… in Tpm2NvReadPublic() 236 NvPublicSize = SwapBytes16 (RecvBuffer.NvPublic.size); in Tpm2NvReadPublic() 237 …NvNameSize = SwapBytes16 (ReadUnaligned16 ((UINT16 *)((UINT8 *)&RecvBuffer + sizeof(TPM2_RESPONSE_… in Tpm2NvReadPublic() 247 CopyMem (NvPublic, &RecvBuffer.NvPublic, sizeof(UINT16) + NvPublicSize); in Tpm2NvReadPublic() 253 Buffer = (UINT8 *)&RecvBuffer.NvPublic.nvPublic.authPolicy; in Tpm2NvReadPublic() 257 …CopyMem (NvName->name, (UINT8 *)&RecvBuffer + sizeof(TPM2_RESPONSE_HEADER) + sizeof(UINT16) + NvPu… in Tpm2NvReadPublic() [all …]
|
D | Tpm2EnhancedAuthorization.c | 110 TPM2_POLICY_SECRET_RESPONSE RecvBuffer; in Tpm2PolicySecret() local 161 RecvBufferSize = sizeof (RecvBuffer); in Tpm2PolicySecret() 162 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2PolicySecret() 172 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2PolicySecret() 173 …DEBUG ((EFI_D_ERROR, "Tpm2PolicySecret - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.respo… in Tpm2PolicySecret() 181 Buffer = (UINT8 *)&RecvBuffer.Timeout; in Tpm2PolicySecret() 199 ZeroMem (&RecvBuffer, sizeof(RecvBuffer)); in Tpm2PolicySecret() 224 TPM2_POLICY_OR_RESPONSE RecvBuffer; in Tpm2PolicyOR() local 253 RecvBufferSize = sizeof (RecvBuffer); in Tpm2PolicyOR() 254 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2PolicyOR() [all …]
|
D | Tpm2DictionaryAttack.c | 74 TPM2_DICTIONARY_ATTACK_LOCK_RESET_RESPONSE RecvBuffer; in Tpm2DictionaryAttackLockReset() local 104 RecvBufferSize = sizeof (RecvBuffer); in Tpm2DictionaryAttackLockReset() 105 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2DictionaryAttackLockReset() 115 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2DictionaryAttackLockReset() 116 …OR, "Tpm2DictionaryAttackLockReset - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.responseC… in Tpm2DictionaryAttackLockReset() 126 ZeroMem (&RecvBuffer, sizeof(RecvBuffer)); in Tpm2DictionaryAttackLockReset() 155 TPM2_DICTIONARY_ATTACK_PARAMETERS_RESPONSE RecvBuffer; in Tpm2DictionaryAttackParameters() local 195 RecvBufferSize = sizeof (RecvBuffer); in Tpm2DictionaryAttackParameters() 196 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2DictionaryAttackParameters() 206 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2DictionaryAttackParameters() [all …]
|
D | Tpm2Miscellaneous.c | 62 TPM2_SET_ALGORITHM_SET_RESPONSE RecvBuffer; in Tpm2SetAlgorithmSet() local 98 RecvBufferSize = sizeof (RecvBuffer); in Tpm2SetAlgorithmSet() 99 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2SetAlgorithmSet() 109 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2SetAlgorithmSet() 110 …DEBUG ((EFI_D_ERROR, "Tpm2SetAlgorithmSet - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.re… in Tpm2SetAlgorithmSet() 120 ZeroMem (&RecvBuffer, sizeof(RecvBuffer)); in Tpm2SetAlgorithmSet()
|
D | Tpm2Context.c | 51 TPM2_FLUSH_CONTEXT_RESPONSE RecvBuffer; in Tpm2FlushContext() local 69 RecvBufferSize = sizeof (RecvBuffer); in Tpm2FlushContext() 70 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2FlushContext() 79 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2FlushContext() 80 …DEBUG ((EFI_D_ERROR, "Tpm2FlushContext - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.respo… in Tpm2FlushContext()
|
D | Tpm2Session.c | 76 TPM2_START_AUTH_SESSION_RESPONSE RecvBuffer; in Tpm2StartAuthSession() local 146 RecvBufferSize = sizeof (RecvBuffer); in Tpm2StartAuthSession() 147 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2StartAuthSession() 156 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2StartAuthSession() 157 …DEBUG ((EFI_D_ERROR, "Tpm2StartAuthSession - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.r… in Tpm2StartAuthSession() 164 *SessionHandle = SwapBytes32 (RecvBuffer.SessionHandle); in Tpm2StartAuthSession() 165 NonceTPM->size = SwapBytes16 (RecvBuffer.NonceTPM.size); in Tpm2StartAuthSession() 166 CopyMem (NonceTPM->buffer, &RecvBuffer.NonceTPM.buffer, NonceTPM->size); in Tpm2StartAuthSession()
|
D | Tpm2Integrity.c | 324 TPM2_PCR_READ_RESPONSE RecvBuffer; in Tpm2PcrRead() local 350 RecvBufferSize = sizeof (RecvBuffer); in Tpm2PcrRead() 351 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2PcrRead() 360 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2PcrRead() 361 …DEBUG ((EFI_D_ERROR, "Tpm2PcrRead - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.responseCo… in Tpm2PcrRead() 372 if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER) + sizeof(RecvBuffer.PcrUpdateCounter)) { in Tpm2PcrRead() 376 *PcrUpdateCounter = SwapBytes32(RecvBuffer.PcrUpdateCounter); in Tpm2PcrRead() 381 …BufferSize < sizeof (TPM2_RESPONSE_HEADER) + sizeof(RecvBuffer.PcrUpdateCounter) + sizeof(RecvBuff… in Tpm2PcrRead() 385 PcrSelectionOut->count = SwapBytes32(RecvBuffer.PcrSelectionOut.count); in Tpm2PcrRead() 386 …TPM2_RESPONSE_HEADER) + sizeof(RecvBuffer.PcrUpdateCounter) + sizeof(RecvBuffer.PcrSelectionOut.co… in Tpm2PcrRead() [all …]
|
D | Tpm2Capability.c | 85 TPM2_GET_CAPABILITY_RESPONSE RecvBuffer; in Tpm2GetCapability() local 105 RecvBufferSize = sizeof (RecvBuffer); in Tpm2GetCapability() 106 …= Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer ); in Tpm2GetCapability() 118 *MoreData = RecvBuffer.MoreData; in Tpm2GetCapability() 122 …CopyMem (CapabilityData, &RecvBuffer.CapabilityData, RecvBufferSize - sizeof (TPM2_RESPONSE_HEADER… in Tpm2GetCapability() 631 TPM2_TEST_PARMS_RESPONSE RecvBuffer; in Tpm2TestParms() local 817 RecvBufferSize = sizeof (RecvBuffer); in Tpm2TestParms() 818 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2TestParms() 827 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2TestParms() 828 …DEBUG ((EFI_D_ERROR, "Tpm2TestParms - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.response… in Tpm2TestParms()
|
D | Tpm2Hierarchy.c | 146 TPM2_SET_PRIMARY_POLICY_RESPONSE RecvBuffer; in Tpm2SetPrimaryPolicy() local 186 RecvBufferSize = sizeof (RecvBuffer); in Tpm2SetPrimaryPolicy() 187 … = Tpm2SubmitCommand (SendBufferSize, (UINT8 *)&SendBuffer, &RecvBufferSize, (UINT8 *)&RecvBuffer); in Tpm2SetPrimaryPolicy() 197 if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) { in Tpm2SetPrimaryPolicy() 198 …DEBUG ((EFI_D_ERROR, "Tpm2SetPrimaryPolicy - responseCode - %x\n", SwapBytes32(RecvBuffer.Header.r… in Tpm2SetPrimaryPolicy() 208 ZeroMem (&RecvBuffer, sizeof(RecvBuffer)); in Tpm2SetPrimaryPolicy()
|
/device/linaro/bootloader/edk2/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/ |
D | DxeTcgPhysicalPresenceLib.c | 84 UINT8 RecvBuffer[40]; in GetTpmCapability() local 89 TpmRsp = (TPM_RSP_COMMAND_HDR*)RecvBuffer; in GetTpmCapability() 108 sizeof (RecvBuffer), in GetTpmCapability() 109 (UINT8*)&RecvBuffer in GetTpmCapability() 115 …TpmPermanentFlags = (TPM_PERMANENT_FLAGS *)&RecvBuffer[sizeof (TPM_RSP_COMMAND_HDR) + sizeof (UINT… in GetTpmCapability()
|