diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-03-22 10:08:03 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-06 16:20:36 +0800 |
commit | b14f4ebbb4ea866a5f1206cb3b5679f020e675b1 (patch) | |
tree | 8b4830a5cbf6f2d087f44b0c1a829da9d25994e1 | |
parent | 844427a7493b938a46c5a109a1a6aab69e55062f (diff) | |
download | edk2-platforms-b14f4ebbb4ea866a5f1206cb3b5679f020e675b1.tar.xz |
UefiCpuPkg/PiSmmCpuDxeSmm: Move forward MP sync data initialization
Move MP sync data initialization in front of the place that initialize
page table, because the page fault spin lock is allocated in
InitializeMpSyncData() while it is initialized in SmmInitPageTable().
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>
(cherry picked from commit d67b73cc381219f16f5d120e733efb7ffaa814f0)
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c index f6b40c3f55..b7ce875430 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -1280,6 +1280,15 @@ InitializeMpServiceData ( UINTN GdtTableStepSize;
//
+ // Initialize mSmmMpSyncData
+ //
+ mSmmMpSyncDataSize = sizeof (SMM_DISPATCHER_MP_SYNC_DATA) +
+ (sizeof (SMM_CPU_DATA_BLOCK) + sizeof (BOOLEAN)) * gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
+ mSmmMpSyncData = (SMM_DISPATCHER_MP_SYNC_DATA*) AllocatePages (EFI_SIZE_TO_PAGES (mSmmMpSyncDataSize));
+ ASSERT (mSmmMpSyncData != NULL);
+ InitializeMpSyncData ();
+
+ //
// Initialize physical address mask
// NOTE: Physical memory above virtual address limit is not supported !!!
//
@@ -1320,15 +1329,6 @@ InitializeMpServiceData ( }
//
- // Initialize mSmmMpSyncData
- //
- mSmmMpSyncDataSize = sizeof (SMM_DISPATCHER_MP_SYNC_DATA) +
- (sizeof (SMM_CPU_DATA_BLOCK) + sizeof (BOOLEAN)) * gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
- mSmmMpSyncData = (SMM_DISPATCHER_MP_SYNC_DATA*) AllocatePages (EFI_SIZE_TO_PAGES (mSmmMpSyncDataSize));
- ASSERT (mSmmMpSyncData != NULL);
- InitializeMpSyncData ();
-
- //
// Record current MTRR settings
//
ZeroMem(gSmiMtrrs, sizeof (gSmiMtrrs));
|