Skip to content

Commit

Permalink
UefiCpuPkg/PiSmmCpuDxeSmm: Consume SmmCpuPlatformHookAfterCpuSync func
Browse files Browse the repository at this point in the history
This patch is for PiSmmCpuDxeSmm driver to consume the function of
SmmCpuPlatformHookAfterCpuSync(). With the function, SMM CPU driver
can perform the platform specific items after BSP and AP finish the
sync and before the SMI handlers.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
  • Loading branch information
jiaxinwu committed Sep 10, 2024
1 parent c99de4a commit 06504e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,9 @@ APHandler (
UINTN BspIndex;
MTRR_SETTINGS Mtrrs;
EFI_STATUS ProcedureStatus;
BOOLEAN PlatformHookDone;

PlatformHookDone = FALSE;

//
// Timeout BSP
Expand Down Expand Up @@ -846,6 +849,14 @@ APHandler (
//
SmmCpuSyncWaitForBsp (mSmmMpSyncData->SyncContext, CpuIndex, BspIndex);

//
// Perform SMM CPU Platform Hook After BSP and AP Sync
//
if (!PlatformHookDone) {
SmmCpuPlatformHookAfterCpuSync ();
PlatformHookDone = TRUE;
}

//
// Check if BSP wants to exit SMM
//
Expand Down
5 changes: 5 additions & 0 deletions UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuCommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1534,5 +1534,10 @@ PerformPreTasks (
VOID
)
{
//
// Perform SMM CPU Platform Hook After BSP and AP Sync
//
SmmCpuPlatformHookAfterCpuSync ();

RestoreSmmConfigurationInS3 ();
}

0 comments on commit 06504e7

Please sign in to comment.