/* The common function cache current active TpmInterfaceType when needed. */
EFI_STATUS InternalTpm2DeviceLibDTpmCommonConstructor(VOID)
/* The common function cache current active TpmInterfaceType when needed. */
EFI_STATUS InternalTpm2DeviceLibDTpmCommonConstructor(VOID)
{
  mActiveTpmInterfaceType = 0xFF;
  mCRBIdleByPass          = 0xFF;
  mActiveTpmInterfaceType = Tpm2GetPtpInterface ((VOID *)(UINTN)PcdGet64 (PcdTpmBaseAddress));
  if (mActiveTpmInterfaceType == Tpm2PtpInterfaceCrb) {
    mCRBIdleByPass = Tpm2GetIdleByPass ((VOID *)(UINTN)PcdGet64 (PcdTpmBaseAddress));
  }
  return EFI_SUCCESS;
}