/* This function parse the value got from TPM2_GetCapability and return the Family. */
EFI_STATUS EFIAPI Tpm2GetCapabilityFamily(OUT CHAR8 *Family)
/* This function parse the value got from TPM2_GetCapability and return the Family. */
EFI_STATUS EFIAPI Tpm2GetCapabilityFamily(OUT CHAR8 *Family)
{
  TPMS_CAPABILITY_DATA  TpmCap;
  TPMI_YES_NO           MoreData;
  EFI_STATUS            Status;
  Status = Tpm2GetCapability (
             TPM_CAP_TPM_PROPERTIES,
             TPM_PT_FAMILY_INDICATOR,
             1,
             &MoreData,
             &TpmCap
             );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  CopyMem (Family, &TpmCap.data.tpmProperties.tpmProperty->value, 4);
  return EFI_SUCCESS;
}