]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg CpuCommonFeaturesLib: Remove CPU generation check
authorStar Zeng <star.zeng@intel.com>
Thu, 16 May 2019 10:30:03 +0000 (18:30 +0800)
committerStar Zeng <star.zeng@intel.com>
Sat, 18 May 2019 05:55:50 +0000 (13:55 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1679

The checking to CpuInfo->CpuIdVersionInfoEcx.Bits.AESNI is enough,
the checking to CPU generation could be removed, then the code
could be reused by more platforms.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Chandana Kumar <chandana.c.kumar@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
UefiCpuPkg/Library/CpuCommonFeaturesLib/Aesni.c

index b79446ba3ca997dfc32fa38e798cf93e9d2eef07..4a56eec1b26722f7a940d9d2cea3c44509e1dead 100644 (file)
@@ -57,15 +57,9 @@ AesniSupport (
   MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER   *MsrFeatureConfig;\r
 \r
   if (CpuInfo->CpuIdVersionInfoEcx.Bits.AESNI == 1) {\r
-    if (IS_SANDY_BRIDGE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||\r
-        IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||\r
-        IS_XEON_5600_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||\r
-        IS_XEON_E7_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||\r
-        IS_XEON_PHI_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel)) {\r
-      MsrFeatureConfig = (MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER *) ConfigData;\r
-      ASSERT (MsrFeatureConfig != NULL);\r
-      MsrFeatureConfig[ProcessorNumber].Uint64 = AsmReadMsr64 (MSR_SANDY_BRIDGE_FEATURE_CONFIG);\r
-    }\r
+    MsrFeatureConfig = (MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER *) ConfigData;\r
+    ASSERT (MsrFeatureConfig != NULL);\r
+    MsrFeatureConfig[ProcessorNumber].Uint64 = AsmReadMsr64 (MSR_SANDY_BRIDGE_FEATURE_CONFIG);\r
     return TRUE;\r
   }\r
   return FALSE;\r