summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhiguang Liu <zhiguang.liu@intel.com>2024-10-08 13:14:08 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-10 06:00:56 +0000
commit0bae161fed39d8996693e586b77f31094b61b9d7 (patch)
tree858911ac54bdd2ecd92d3e7740d6c8f8511dfc8c
parent6f17bd5eaf9bec4571dc23fe201bb8c11236aae2 (diff)
downloadedk2-0bae161fed39d8996693e586b77f31094b61b9d7.tar.gz
UefiCpuPkg/MpLib: Remove NotifyOnS3SmmInitDonePpi
Previously, the SMM S3 resume code required taking control of APs to perform SMM rebase, which would overwrite the context set by MpLib. As a result, MpLib needed to wake up APs using InitSipiSipi to restore the context after SMM S3 resume. With the recent change where SMM rebase occurs in the early PEI phase, the SMM S3 resume code no longer modifies AP context. Therefore, the forced use of InitSipiSipi after SMM S3 resume is no longer necessary. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
-rw-r--r--UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf1
-rw-r--r--UefiCpuPkg/Library/MpInitLib/PeiMpLib.c64
2 files changed, 0 insertions, 65 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf b/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
index e4a7485fef..d2b6a43cdc 100644
--- a/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
@@ -87,7 +87,6 @@
gEdkiiPeiShadowMicrocodePpiGuid ## SOMETIMES_CONSUMES
[Guids]
- gEdkiiS3SmmInitDoneGuid
gEdkiiMicrocodePatchHobGuid
gGhcbApicIdsGuid ## SOMETIMES_CONSUMES
gEdkiiEndOfS3ResumeGuid
diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
index 16a858d542..495dc108b2 100644
--- a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
@@ -15,68 +15,6 @@
STATIC UINT64 mSevEsPeiWakeupBuffer = BASE_1MB;
/**
- S3 SMM Init Done notification function.
-
- @param PeiServices Indirect reference to the PEI Services Table.
- @param NotifyDesc Address of the notification descriptor data structure.
- @param InvokePpi Address of the PPI that was invoked.
-
- @retval EFI_SUCCESS The function completes successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-NotifyOnS3SmmInitDonePpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
- IN VOID *InvokePpi
- );
-
-//
-// Global function
-//
-EFI_PEI_NOTIFY_DESCRIPTOR mS3SmmInitDoneNotifyDesc = {
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
- &gEdkiiS3SmmInitDoneGuid,
- NotifyOnS3SmmInitDonePpi
-};
-
-/**
- S3 SMM Init Done notification function.
-
- @param PeiServices Indirect reference to the PEI Services Table.
- @param NotifyDesc Address of the notification descriptor data structure.
- @param InvokePpi Address of the PPI that was invoked.
-
- @retval EFI_SUCCESS The function completes successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-NotifyOnS3SmmInitDonePpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
- IN VOID *InvokePpi
- )
-{
- CPU_MP_DATA *CpuMpData;
-
- CpuMpData = GetCpuMpData ();
-
- //
- // PiSmmCpuDxeSmm driver hardcode change the loop mode to HLT mode.
- // So in this notify function, code need to check the current loop
- // mode, if it is not HLT mode, code need to change loop mode back
- // to the original mode.
- //
- if (CpuMpData->ApLoopMode != ApInHltLoop) {
- CpuMpData->WakeUpByInitSipiSipi = TRUE;
- }
-
- return EFI_SUCCESS;
-}
-
-/**
Enable Debug Agent to support source debugging on AP function.
**/
@@ -510,8 +448,6 @@ InitMpGlobalData (
///
/// Install Notify
///
- Status = PeiServicesNotifyPpi (&mS3SmmInitDoneNotifyDesc);
- ASSERT_EFI_ERROR (Status);
Status = PeiServicesNotifyPpi (&mEndOfS3ResumeNotifyDesc);
ASSERT_EFI_ERROR (Status);