]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
Add 2 APIs in SmmCpuFeaturesLib.
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / PiSmmCpuDxeSmm.h
index 162bdadf0bce3d494300c2d881db039c3a7cc6b2..f2a91655a33b85bdbf3c69b30252d172c877fe98 100644 (file)
@@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SmmConfiguration.h>\r
 #include <Protocol/SmmCpu.h>\r
 #include <Protocol/SmmAccess2.h>\r
-#include <Protocol/SmmCpuSaveState.h>\r
 #include <Protocol/SmmReadyToLock.h>\r
 #include <Protocol/SmmCpuService.h>\r
 \r
@@ -428,6 +427,21 @@ InitializeIDTSmmStackGuard (
   VOID\r
   );\r
 \r
+/**\r
+  Initialize Gdt for all processors.\r
+  \r
+  @param[in]   Cr3          CR3 value.\r
+  @param[out]  GdtStepSize  The step size for GDT table.\r
+\r
+  @return GdtBase for processor 0.\r
+          GdtBase for processor X is: GdtBase + (GdtStepSize * X)\r
+**/\r
+VOID *\r
+InitGdt (\r
+  IN  UINTN  Cr3,\r
+  OUT UINTN  *GdtStepSize\r
+  );\r
+\r
 /**\r
 \r
   Register the SMM Foundation entry point.\r
@@ -572,6 +586,15 @@ PerformRemainingTasks (
   VOID\r
   );\r
 \r
+/**\r
+  Perform the pre tasks.\r
+\r
+**/\r
+VOID\r
+PerformPreTasks (\r
+  VOID\r
+  );\r
+\r
 /**\r
   Initialize MSR spin lock by MSR index.\r
 \r
@@ -695,4 +718,25 @@ VOID
 DumpModuleInfoByIp (\r
   IN  UINTN              CallerIpAddress\r
   );\r
+\r
+/**\r
+  This API provides a way to allocate memory for page table.\r
+\r
+  This API can be called more once to allocate memory for page tables.\r
+\r
+  Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a pointer to the\r
+  allocated buffer.  The buffer returned is aligned on a 4KB boundary.  If Pages is 0, then NULL\r
+  is returned.  If there is not enough memory remaining to satisfy the request, then NULL is\r
+  returned.\r
+\r
+  @param  Pages                 The number of 4 KB pages to allocate.\r
+\r
+  @return A pointer to the allocated buffer or NULL if allocation fails.\r
+\r
+**/\r
+VOID *\r
+AllocatePageTableMemory (\r
+  IN UINTN           Pages\r
+  );\r
+\r
 #endif\r