]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
UefiCpuPkg: Extend SMM CPU Service with rendezvous support.
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / PiSmmCpuDxeSmm.h
index 26d07c5b5ea0bcb5f7761d3beb14fb1c82533f1a..aed872836c99db38b1f1ab415225eb85256c112f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Agent Module to load other modules to deploy SMM Entry Vector for X86 CPU.\r
 \r
-Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2022, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -428,6 +428,7 @@ typedef struct {
   volatile SMM_CPU_SYNC_MODE    EffectiveSyncMode;\r
   volatile BOOLEAN              SwitchBsp;\r
   volatile BOOLEAN              *CandidateBsp;\r
+  volatile BOOLEAN              AllApArrivedWithException;\r
   EFI_AP_PROCEDURE              StartupProcedure;\r
   VOID                          *StartupProcArgs;\r
 } SMM_DISPATCHER_MP_SYNC_DATA;\r
@@ -1488,4 +1489,30 @@ IsRestrictedMemoryAccess (
   VOID\r
   );\r
 \r
+/**\r
+  Choose blocking or non-blocking mode to Wait for all APs.\r
+\r
+  @param[in]  This                  A pointer to the EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL instance.\r
+  @param[in]  BlockingMode          Blocking or non-blocking mode.\r
+\r
+  @retval EFI_SUCCESS               All APs have arrived SMM mode except SMI disabled APs.\r
+  @retval EFI_TIMEOUT               There are APs not in SMM mode in given timeout constraint.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SmmCpuRendezvous (\r
+  IN  EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL  *This,\r
+  IN  BOOLEAN                            BlockingMode\r
+  );\r
+\r
+/**\r
+  Insure when this function returns, no AP will execute normal mode code before entering SMM, except SMI disabled APs.\r
+\r
+**/\r
+VOID\r
+SmmWaitForApArrival (\r
+  VOID\r
+  );\r
+\r
 #endif\r