UefiCpuPkg/PiSmmCpuDxeSmm: Move S3 related code to CpuS3.c
Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
committed by
Michael Kinney
parent
ca98f60382
commit
0bdc9e75c0
@@ -149,7 +149,6 @@ extern SMM_CPU_PRIVATE_DATA *gSmmCpuPrivate;
|
||||
extern CPU_HOT_PLUG_DATA mCpuHotPlugData;
|
||||
extern UINTN mMaxNumberOfCpus;
|
||||
extern UINTN mNumberOfCpus;
|
||||
extern BOOLEAN mRestoreSmmConfigurationInS3;
|
||||
extern EFI_SMM_CPU_PROTOCOL mSmmCpu;
|
||||
|
||||
///
|
||||
@@ -400,11 +399,7 @@ extern IA32_DESCRIPTOR gcSmiIdtr;
|
||||
extern VOID *gcSmiIdtrPtr;
|
||||
extern CONST PROCESSOR_SMM_DESCRIPTOR gcPsd;
|
||||
extern UINT64 gPhyMask;
|
||||
extern ACPI_CPU_DATA mAcpiCpuData;
|
||||
extern SMM_DISPATCHER_MP_SYNC_DATA *mSmmMpSyncData;
|
||||
extern VOID *mGdtForAp;
|
||||
extern VOID *mIdtForAp;
|
||||
extern VOID *mMachineCheckHandlerForAp;
|
||||
extern UINTN mSmmStackArrayBase;
|
||||
extern UINTN mSmmStackArrayEnd;
|
||||
extern UINTN mSmmStackSize;
|
||||
@@ -597,26 +592,14 @@ FindSmramInfo (
|
||||
);
|
||||
|
||||
/**
|
||||
The function is invoked before SMBASE relocation in S3 path to restores CPU status.
|
||||
Relocate SmmBases for each processor.
|
||||
|
||||
The function is invoked before SMBASE relocation in S3 path. It does first time microcode load
|
||||
and restores MTRRs for both BSP and APs.
|
||||
Execute on first boot and all S3 resumes
|
||||
|
||||
**/
|
||||
VOID
|
||||
EarlyInitializeCpu (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
The function is invoked after SMBASE relocation in S3 path to restores CPU status.
|
||||
|
||||
The function is invoked after SMBASE relocation in S3 path. It restores configuration according to
|
||||
data saved by normal boot path for both BSP and APs.
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitializeCpu (
|
||||
EFIAPI
|
||||
SmmRelocateBases (
|
||||
VOID
|
||||
);
|
||||
|
||||
@@ -797,4 +780,40 @@ AllocatePageTableMemory (
|
||||
IN UINTN Pages
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// S3 related global variable and function prototype.
|
||||
//
|
||||
|
||||
extern BOOLEAN mSmmS3Flag;
|
||||
|
||||
/**
|
||||
Initialize SMM S3 resume state structure used during S3 Resume.
|
||||
|
||||
@param[in] Cr3 The base address of the page tables to use in SMM.
|
||||
|
||||
**/
|
||||
VOID
|
||||
InitSmmS3ResumeState (
|
||||
IN UINT32 Cr3
|
||||
);
|
||||
|
||||
/**
|
||||
Get ACPI CPU data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
GetAcpiCpuData (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Restore SMM Configuration in S3 boot path.
|
||||
|
||||
**/
|
||||
VOID
|
||||
RestoreSmmConfigurationInS3 (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user