]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/CpuCommonFeaturesLib/FastStrings.c
UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info.
[mirror_edk2.git] / UefiCpuPkg / Library / CpuCommonFeaturesLib / FastStrings.c
index 029bcf87b3ce7dfa5f6aafc67f1f1c5f9cf7fa15..2682093c2393335ae18092d5e3713d165ad43290 100644 (file)
@@ -40,6 +40,18 @@ FastStringsInitialize (
   IN BOOLEAN                           State\r
   )\r
 {\r
+  //\r
+  // The scope of FastStrings bit in the MSR_IA32_MISC_ENABLE is core for below processor type, only program\r
+  // MSR_IA32_MISC_ENABLE for thread 0 in each core.\r
+  //\r
+  if (IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||\r
+      IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||\r
+      IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel)) {\r
+    if (CpuInfo->ProcessorInfo.Location.Thread != 0) {\r
+      return RETURN_SUCCESS;\r
+    }\r
+  }\r
+\r
   CPU_REGISTER_TABLE_WRITE_FIELD (\r
     ProcessorNumber,\r
     Msr,\r