mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
1d64853193
commit
d67b73cc38
|
@ -1284,6 +1284,15 @@ InitializeMpServiceData (
|
|||
UINT8 *GdtTssTables;
|
||||
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 !!!
|
||||
|
@ -1324,15 +1333,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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue