/* This service enables the sending of commands to the TPM2. */
EFI_STATUS EFIAPI DTpm2SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
/* This service enables the sending of commands to the TPM2. */
EFI_STATUS EFIAPI DTpm2SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
{
  TPM2_PTP_INTERFACE_TYPE  PtpInterface;
  PtpInterface = GetCachedPtpInterface ();
  switch (PtpInterface) {
    case Tpm2PtpInterfaceCrb:
      return PtpCrbTpmCommand (
               (PTP_CRB_REGISTERS_PTR)(UINTN)PcdGet64 (PcdTpmBaseAddress),
               InputParameterBlock,
               InputParameterBlockSize,
               OutputParameterBlock,
               OutputParameterBlockSize
               );
    case Tpm2PtpInterfaceFifo:
    case Tpm2PtpInterfaceTis:
      return Tpm2TisTpmCommand (
               (TIS_PC_REGISTERS_PTR)(UINTN)PcdGet64 (PcdTpmBaseAddress),
               InputParameterBlock,
               InputParameterBlockSize,
               OutputParameterBlock,
               OutputParameterBlockSize
               );
    default:
      return EFI_NOT_FOUND;
  }
}