/* It will perform CPU features initialization, except for PcdCpuFeaturesInitOnS3Resume is FALSE on S3 resume. */
EFI_STATUS EFIAPI CpuFeaturesPeimInitialize(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
/* It will perform CPU features initialization, except for PcdCpuFeaturesInitOnS3Resume is FALSE on S3 resume. */
EFI_STATUS EFIAPI CpuFeaturesPeimInitialize(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
{
  EFI_STATUS     Status;
  EFI_BOOT_MODE  BootMode;
  Status = PeiServicesGetBootMode (&BootMode);
  ASSERT_EFI_ERROR (Status);
  if ((BootMode == BOOT_ON_S3_RESUME) &&
      !PcdGetBool (PcdCpuFeaturesInitOnS3Resume))
  {
    return EFI_SUCCESS;
  }
  CpuFeaturesDetect ();
  CpuFeaturesInitialize ();
  Status = PeiServicesInstallPpi (&mPeiCpuFeaturesInitDonePpiDesc);
  ASSERT_EFI_ERROR (Status);
  BuildGuidHob (&gEdkiiCpuFeaturesInitDoneGuid, 0);
  return EFI_SUCCESS;
}