]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/PiSmmCpuDxeSmm: Check XD/BTS features in SMM relocation
authorJeff Fan <jeff.fan@intel.com>
Sat, 2 Jul 2016 03:55:58 +0000 (11:55 +0800)
committerMichael Kinney <michael.d.kinney@intel.com>
Thu, 14 Jul 2016 15:57:59 +0000 (08:57 -0700)
CheckProcessorFeature() invokes MpService->StartupAllAps() to detect
XD/BTS features on normal boot path. It's not necessary and may cause
performance impact, because INIT-SIPI-SIPI must be sent to APs if APs
are in hlt-loop mode. XD/BTS feature detection is moved to
SmmInitHandler() in SMM relocation during normal boot path.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c

index db36a0ad3c876a3d8f6f8072ac6239e6f6139aaa..50059e4241e434e722a3ce0039b47e81632a1a11 100644 (file)
@@ -355,6 +355,13 @@ SmmInitHandler (
         &mCpuHotPlugData\r
         );\r
 \r
+      if (!mSmmS3Flag) {\r
+        //\r
+        // Check XD and BTS features on each processor on normal boot\r
+        //\r
+        CheckFeatureSupported (NULL);\r
+      }\r
+\r
       if (mIsBsp) {\r
         //\r
         // BSP rebase is already done above.\r
@@ -1191,11 +1198,6 @@ PiCpuSmmEntry (
     }\r
   }\r
 \r
-  //\r
-  // Check XD and BTS features\r
-  //\r
-  CheckProcessorFeature ();\r
-\r
   //\r
   // Initialize SMM Profile feature\r
   //\r
index f9cea55d9dcf6a781880fdbc45444992174b8399..d315194dfc713e2b60e1af03672391da003e88c0 100644 (file)
@@ -32,7 +32,7 @@ UINTN                     mMsrDsAreaSize   = SMM_PROFILE_DTS_SIZE;
 //\r
 // The flag indicates if execute-disable is supported by processor.\r
 //\r
-BOOLEAN                   mXdSupported     = FALSE;\r
+BOOLEAN                   mXdSupported     = TRUE;\r
 \r
 //\r
 // The flag indicates if execute-disable is enabled on processor.\r
@@ -42,7 +42,7 @@ BOOLEAN                   mXdEnabled       = FALSE;
 //\r
 // The flag indicates if BTS is supported by processor.\r
 //\r
-BOOLEAN                   mBtsSupported     = FALSE;\r
+BOOLEAN                   mBtsSupported     = TRUE;\r
 \r
 //\r
 // The flag indicates if SMM profile starts to record data.\r