]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c
Make GuidedSection library instance to follow the value of GuidedSectionExtraction...
[mirror_edk2.git] / MdePkg / Library / PeiServicesTablePointerLib / PeiServicesTablePointer.c
index 9dea0476d973ca85b7d5321584237e9c23609f6f..871e52a25ac836b3c05b4c9bc534d86c50022d01 100644 (file)
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  PeiServicesTablePointer.c\r
-\r
 **/\r
 \r
 #include <PiPei.h>\r
 #include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
+#include "PeiServicesTablePointerInternal.h"\r
 \r
 static EFI_PEI_SERVICES  **gPeiServices;\r
 \r
+/**\r
+  The function set the pointer of PEI services immediately preceding the IDT table\r
+  according to PI specification.\r
+  \r
+  @param    PeiServices   The address of PeiServices pointer.\r
+**/\r
+VOID\r
+EFIAPI\r
+SetPeiServicesTablePointer (\r
+  EFI_PEI_SERVICES  **PeiServices\r
+  )\r
+{\r
+  gPeiServices = PeiServices;\r
+}\r
+\r
 /**\r
   The function returns the pointer to PEI services.\r
 \r
@@ -55,10 +69,25 @@ GetPeiServicesTablePointer (
 EFI_STATUS\r
 EFIAPI\r
 PeiServicesTablePointerLibConstructor (\r
-  IN EFI_FFS_FILE_HEADER  *FfsHeader,\r
+  IN EFI_PEI_FILE_HANDLE  *FfsHeader,\r
   IN EFI_PEI_SERVICES     **PeiServices\r
   )\r
 {\r
   gPeiServices = PeiServices;\r
   return EFI_SUCCESS;\r
 }\r
+\r
+/**\r
+  After memory initialization in PEI phase, the IDT table in temporary memory should \r
+  be migrated to memory, and the address of PeiServicesPointer also need to be updated  \r
+  immediately preceding the new IDT table.\r
+  \r
+  @param    PeiServices   The address of PeiServices pointer.\r
+**/\r
+VOID\r
+MigrateIdtTable (\r
+  IN EFI_PEI_SERVICES  **PeiServices\r
+  )\r
+{\r
+}\r
+\r