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>
This commit is contained in:
Jeff Fan 2016-07-02 11:55:58 +08:00 committed by Michael Kinney
parent 70a7493d65
commit a46a4c90d3
2 changed files with 9 additions and 7 deletions

View File

@ -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.
@ -1191,11 +1198,6 @@ PiCpuSmmEntry (
}
}
//
// Check XD and BTS features
//
CheckProcessorFeature ();
//
// Initialize SMM Profile feature
//

View File

@ -32,7 +32,7 @@ UINTN mMsrDsAreaSize = SMM_PROFILE_DTS_SIZE;
//
// The flag indicates if execute-disable is supported by processor.
//
BOOLEAN mXdSupported = FALSE;
BOOLEAN mXdSupported = TRUE;
//
// The flag indicates if execute-disable is enabled on processor.
@ -42,7 +42,7 @@ BOOLEAN mXdEnabled = FALSE;
//
// The flag indicates if BTS is supported by processor.
//
BOOLEAN mBtsSupported = FALSE;
BOOLEAN mBtsSupported = TRUE;
//
// The flag indicates if SMM profile starts to record data.