34 IN UINT32 InputParameterBlockSize,
35 IN UINT8 *InputParameterBlock,
36 IN OUT UINT32 *OutputParameterBlockSize,
37 IN UINT8 *OutputParameterBlock
43 if (mTcg2Protocol ==
NULL) {
44 Status =
gBS->LocateProtocol (&gEfiTcg2ProtocolGuid,
NULL, (VOID **)&mTcg2Protocol);
45 if (EFI_ERROR (Status)) {
49 DEBUG ((DEBUG_ERROR,
"Tpm2SubmitCommand - Tcg2 - %r\n", Status));
57 Status = mTcg2Protocol->SubmitCommand (
59 InputParameterBlockSize,
61 *OutputParameterBlockSize,
64 if (EFI_ERROR (Status)) {
69 *OutputParameterBlockSize =
SwapBytes32 (Header->paramSize);
89 if (mTcg2Protocol ==
NULL) {
90 Status =
gBS->LocateProtocol (&gEfiTcg2ProtocolGuid,
NULL, (VOID **)&mTcg2Protocol);
91 if (EFI_ERROR (Status)) {
95 DEBUG ((DEBUG_ERROR,
"Tpm2RequestUseTpm - Tcg2 - %r\n", Status));
121 return EFI_UNSUPPORTED;
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
#define DEBUG(Expression)
EFI_STATUS EFIAPI Tpm2RegisterTpm2DeviceLib(IN TPM2_DEVICE_INTERFACE *Tpm2Device)
EFI_STATUS EFIAPI Tpm2SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
EFI_STATUS EFIAPI Tpm2RequestUseTpm(VOID)