summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2016-07-02 11:55:58 +0800
committerMichael Kinney <michael.d.kinney@intel.com>2016-07-14 08:57:59 -0700
commita46a4c90d33dc7397b0f6f187008cbc385a1e051 (patch)
tree23bc7969ff4f72effc32d7437ed9f86710f34a84 /UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
parent70a7493d65ddd302cc791013a34f264217a6e475 (diff)
downloadedk2-a46a4c90d33dc7397b0f6f187008cbc385a1e051.tar.gz
edk2-a46a4c90d33dc7397b0f6f187008cbc385a1e051.tar.bz2
edk2-a46a4c90d33dc7397b0f6f187008cbc385a1e051.zip
UefiCpuPkg/PiSmmCpuDxeSmm: Check XD/BTS features in SMM relocation
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>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
index db36a0ad3c..50059e4241 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
@@ -355,6 +355,13 @@ SmmInitHandler (
&mCpuHotPlugData
);
+ if (!mSmmS3Flag) {
+ //
+ // Check XD and BTS features on each processor on normal boot
+ //
+ CheckFeatureSupported (NULL);
+ }
+
if (mIsBsp) {
//
// BSP rebase is already done above.
@@ -1192,11 +1199,6 @@ PiCpuSmmEntry (
}
//
- // Check XD and BTS features
- //
- CheckProcessorFeature ();
-
- //
// Initialize SMM Profile feature
//
InitSmmProfile (Cr3);