UefiCpuPkg/PiSmmCpuDxeSmm: Move common code into PiSmmCpuCommon.c

Move common code into PiSmmCpuCommon.c to facilitate common usage
in both SMM and MM. The PiSmmCpuCommon.h will be utilized for both
modes in subsequent patches.

No function impact.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
This commit is contained in:
Jiaxin Wu 2024-06-24 19:26:23 +08:00 committed by mergify[bot]
parent cd29383f77
commit cc5df45eb6
4 changed files with 1663 additions and 1603 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1490,4 +1490,30 @@ SmmWriteProtectReadOnlyPage (
} \
} while (FALSE)
/**
Extract NumberOfCpus, MaxNumberOfCpus and EFI_PROCESSOR_INFORMATION for all CPU from gEfiMpServiceProtocolGuid.
@param[out] NumberOfCpus Pointer to NumberOfCpus.
@param[out] MaxNumberOfCpus Pointer to MaxNumberOfCpus.
@retval ProcessorInfo Pointer to EFI_PROCESSOR_INFORMATION buffer.
**/
EFI_PROCESSOR_INFORMATION *
GetMpInformationFromMpServices (
OUT UINTN *NumberOfCpus,
OUT UINTN *MaxNumberOfCpus
);
/**
The common Entry Point of the SMM CPU driver.
@retval EFI_SUCCESS The common entry point is executed successfully.
@retval Other Some error occurs when executing this entry point.
**/
EFI_STATUS
PiSmmCpuEntryCommon (
VOID
);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@
[Sources]
PiSmmCpuDxeSmm.c
PiSmmCpuCommon.c
PiSmmCpuCommon.h
MpService.c
SyncTimer.c