60 Command.Hdr.tag =
SwapBytes16 (TPM_TAG_RQU_COMMAND);
61 Command.Hdr.paramSize =
SwapBytes32 (
sizeof (Command));
64 CopyMem (&Command.TpmDigest, DigestToExtend, sizeof (Command.TpmDigest));
65 Length =
sizeof (Response);
66 Status =
Tpm12SubmitCommand (
sizeof (Command), (UINT8 *)&Command, &Length, (UINT8 *)&Response);
67 if (EFI_ERROR (Status)) {
71 if (
SwapBytes32 (Response.Hdr.returnCode) != TPM_SUCCESS) {
72 DEBUG ((DEBUG_ERROR,
"Tpm12Extend: Response Code error! 0x%08x\r\n",
SwapBytes32 (Response.Hdr.returnCode)));
73 return EFI_DEVICE_ERROR;
76 if (NewPcrValue !=
NULL) {
77 CopyMem (NewPcrValue, &Response.TpmDigest, sizeof (*NewPcrValue));
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define DEBUG(Expression)
EFI_STATUS EFIAPI Tpm12SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
EFI_STATUS EFIAPI Tpm12Extend(IN TPM_DIGEST *DigestToExtend, IN TPM_PCRINDEX PcrIndex, OUT TPM_DIGEST *NewPcrValue)