/* Check if TPM chip is activated or not. */
BOOLEAN IsTpmUsable(VOID)
/* Check if TPM chip is activated or not. */
BOOLEAN IsTpmUsable(VOID)
{
  EFI_STATUS           Status;
  TPM_PERMANENT_FLAGS  TpmPermanentFlags;
  Status = Tpm12GetCapabilityFlagPermanent (&TpmPermanentFlags);
  if (EFI_ERROR (Status)) {
    return FALSE;
  }
  return (BOOLEAN)(!TpmPermanentFlags.deactivated);
}