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