]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuMpPei/CpuMpPei.h
UefiCpuPkg/CpuMp: Fix hang when StackGuard is enabled in 16-core cpu
[mirror_edk2.git] / UefiCpuPkg / CpuMpPei / CpuMpPei.h
index a5d8a755b2037922165e4712345978ad82b2c7ce..c6870656ca645117b29478c82b9de76fab23c9d1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Definitions to install Multiple Processor PPI.\r
 \r
-  Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -15,6 +15,7 @@
 #include <Ppi/SecPlatformInformation.h>\r
 #include <Ppi/SecPlatformInformation2.h>\r
 #include <Ppi/EndOfPeiPhase.h>\r
+#include <Ppi/MpServices2.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -26,6 +27,7 @@
 #include <Library/CpuExceptionHandlerLib.h>\r
 #include <Library/MpInitLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 \r
 extern EFI_PEI_PPI_DESCRIPTOR   mPeiCpuMpPpiDesc;\r
 \r
@@ -396,6 +398,18 @@ SecPlatformInformation2 (
      OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2\r
   );\r
 \r
+/**\r
+  Migrates the Global Descriptor Table (GDT) to permanent memory.\r
+\r
+  @retval   EFI_SUCCESS           The GDT was migrated successfully.\r
+  @retval   EFI_OUT_OF_RESOURCES  The GDT could not be migrated due to lack of available memory.\r
+\r
+**/\r
+EFI_STATUS\r
+MigrateGdt (\r
+  VOID\r
+  );\r
+\r
 /**\r
   Initializes MP and exceptions handlers.\r
 \r
@@ -411,7 +425,7 @@ InitializeCpuMpWorker (
   );\r
 \r
 /**\r
-  Enabl/setup stack guard for each processor if PcdCpuStackGuard is set to TRUE.\r
+  Enable/setup stack guard for each processor if PcdCpuStackGuard is set to TRUE.\r
 \r
   Doing this in the memory-discovered callback is to make sure the Stack Guard\r
   feature to cover as most PEI code as possible.\r