diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-03-22 10:08:03 +0800 |
---|---|---|
committer | Michael Kinney <michael.d.kinney@intel.com> | 2016-05-24 15:19:55 -0700 |
commit | d67b73cc381219f16f5d120e733efb7ffaa814f0 (patch) | |
tree | 40cbc1845877a917d1640f8ca6434448bfc4f60c | |
parent | 1d64853193602f1100b835a4824da14c4258e5da (diff) | |
download | edk2-d67b73cc381219f16f5d120e733efb7ffaa814f0.tar.gz edk2-d67b73cc381219f16f5d120e733efb7ffaa814f0.tar.bz2 edk2-d67b73cc381219f16f5d120e733efb7ffaa814f0.zip |
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>
-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 aa25f3ea47..68ef0a3427 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -1285,6 +1285,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 !!!
//
@@ -1325,15 +1334,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));
|