Skip to content

Commit 0bae161

Browse files
LiuZhiguang001mergify[bot]
authored andcommitted
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>
1 parent 6f17bd5 commit 0bae161

File tree

2 files changed

+0
-65
lines changed

2 files changed

+0
-65
lines changed

UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
gEdkiiPeiShadowMicrocodePpiGuid ## SOMETIMES_CONSUMES
8888

8989
[Guids]
90-
gEdkiiS3SmmInitDoneGuid
9190
gEdkiiMicrocodePatchHobGuid
9291
gGhcbApicIdsGuid ## SOMETIMES_CONSUMES
9392
gEdkiiEndOfS3ResumeGuid

UefiCpuPkg/Library/MpInitLib/PeiMpLib.c

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -14,68 +14,6 @@
1414

1515
STATIC UINT64 mSevEsPeiWakeupBuffer = BASE_1MB;
1616

17-
/**
18-
S3 SMM Init Done notification function.
19-
20-
@param PeiServices Indirect reference to the PEI Services Table.
21-
@param NotifyDesc Address of the notification descriptor data structure.
22-
@param InvokePpi Address of the PPI that was invoked.
23-
24-
@retval EFI_SUCCESS The function completes successfully.
25-
26-
**/
27-
EFI_STATUS
28-
EFIAPI
29-
NotifyOnS3SmmInitDonePpi (
30-
IN EFI_PEI_SERVICES **PeiServices,
31-
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
32-
IN VOID *InvokePpi
33-
);
34-
35-
//
36-
// Global function
37-
//
38-
EFI_PEI_NOTIFY_DESCRIPTOR mS3SmmInitDoneNotifyDesc = {
39-
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
40-
&gEdkiiS3SmmInitDoneGuid,
41-
NotifyOnS3SmmInitDonePpi
42-
};
43-
44-
/**
45-
S3 SMM Init Done notification function.
46-
47-
@param PeiServices Indirect reference to the PEI Services Table.
48-
@param NotifyDesc Address of the notification descriptor data structure.
49-
@param InvokePpi Address of the PPI that was invoked.
50-
51-
@retval EFI_SUCCESS The function completes successfully.
52-
53-
**/
54-
EFI_STATUS
55-
EFIAPI
56-
NotifyOnS3SmmInitDonePpi (
57-
IN EFI_PEI_SERVICES **PeiServices,
58-
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
59-
IN VOID *InvokePpi
60-
)
61-
{
62-
CPU_MP_DATA *CpuMpData;
63-
64-
CpuMpData = GetCpuMpData ();
65-
66-
//
67-
// PiSmmCpuDxeSmm driver hardcode change the loop mode to HLT mode.
68-
// So in this notify function, code need to check the current loop
69-
// mode, if it is not HLT mode, code need to change loop mode back
70-
// to the original mode.
71-
//
72-
if (CpuMpData->ApLoopMode != ApInHltLoop) {
73-
CpuMpData->WakeUpByInitSipiSipi = TRUE;
74-
}
75-
76-
return EFI_SUCCESS;
77-
}
78-
7917
/**
8018
Enable Debug Agent to support source debugging on AP function.
8119
@@ -510,8 +448,6 @@ InitMpGlobalData (
510448
///
511449
/// Install Notify
512450
///
513-
Status = PeiServicesNotifyPpi (&mS3SmmInitDoneNotifyDesc);
514-
ASSERT_EFI_ERROR (Status);
515451

516452
Status = PeiServicesNotifyPpi (&mEndOfS3ResumeNotifyDesc);
517453
ASSERT_EFI_ERROR (Status);

0 commit comments

Comments
 (0)