/* Detects if AESNI feature supported on current processor. */
BOOLEAN EFIAPI AesniSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
/* Detects if AESNI feature supported on current processor. */
BOOLEAN EFIAPI AesniSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
{
  MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER  *MsrFeatureConfig;
  if (CpuInfo->CpuIdVersionInfoEcx.Bits.AESNI == 1) {
    MsrFeatureConfig = (MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER *)ConfigData;
    ASSERT (MsrFeatureConfig != NULL);
    MsrFeatureConfig[ProcessorNumber].Uint64 = AsmReadMsr64 (MSR_SANDY_BRIDGE_FEATURE_CONFIG);
    return TRUE;
  }
  return FALSE;
}