]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
Merge Temporary Ram support patch.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index ef2d592a5e51bcd6b92f1e41d23028672146cbb3..319bf87711f3a20a6325ced26b6017041c4706e4 100644 (file)
@@ -35,6 +35,7 @@ Revision History
 #include <Ppi/GuidedSectionExtraction.h>\r
 #include <Ppi/LoadFile.h>\r
 #include <Ppi/Security2.h>\r
+#include <Ppi/TemporaryRamSupport.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PeiCoreEntryPoint.h>\r
 #include <Library/BaseLib.h>\r
@@ -66,9 +67,7 @@ typedef union {
   VOID                        *Raw;\r
 } PEI_PPI_LIST_POINTERS;\r
 \r
-#define PEI_STACK_SIZE 0x20000\r
-\r
-#define MAX_PPI_DESCRIPTORS 128\r
+#define MAX_PPI_DESCRIPTORS 64\r
 \r
 typedef struct {\r
   INTN                    PpiListEnd;\r
@@ -135,9 +134,14 @@ typedef struct{
   VOID                               *CpuIo;\r
   EFI_PEI_SECURITY2_PPI              *PrivateSecurityPpi;\r
   EFI_PEI_SERVICES                   ServiceTableShadow;\r
+  UINTN                              SizeOfTemporaryMemory;\r
   UINTN                              SizeOfCacheAsRam;\r
   VOID                               *MaxTopOfCarHeap;\r
   EFI_PEI_PPI_DESCRIPTOR             *XipLoadFile;\r
+  EFI_PHYSICAL_ADDRESS               PhysicalMemoryBegin;\r
+  UINT64                             PhysicalMemoryLength;\r
+  EFI_PHYSICAL_ADDRESS               FreePhysicalMemoryTop;\r
+  VOID*                              ShadowedPeiCore;\r
   CACHE_SECTION_DATA                 CacheSection;\r
 } PEI_CORE_INSTANCE;\r
 \r
@@ -307,6 +311,35 @@ Returns:
 ;\r
 \r
 \r
+EFI_STATUS\r
+FindNextPeim (\r
+  IN EFI_PEI_SERVICES            **PeiServices,\r
+  IN EFI_FIRMWARE_VOLUME_HEADER  *FwVolHeader,\r
+  IN OUT EFI_FFS_FILE_HEADER     **PeimFileHeader\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+    Given the input file pointer, search for the next matching file in the\r
+    FFS volume. The search starts from FileHeader inside\r
+    the Firmware Volume defined by FwVolHeader.\r
+\r
+Arguments:\r
+    PeiServices - Pointer to the PEI Core Services Table.\r
+\r
+    FwVolHeader - Pointer to the FV header of the volume to search.\r
+                     This parameter must point to a valid FFS volume.\r
+\r
+    PeimFileHeader  - Pointer to the current file from which to begin searching.\r
+                  This pointer will be updated upon return to reflect the file found.\r
+\r
+Returns:\r
+    EFI_NOT_FOUND - No files matching the search criteria were found\r
+    EFI_SUCCESS\r
+\r
+--*/\r
+;\r
+\r
 BOOLEAN\r
 Dispatched (\r
   IN UINT8  CurrentPeim,\r
@@ -439,8 +472,9 @@ Returns:
 \r
 VOID\r
 ConvertPpiPointers (\r
-  IN CONST EFI_PEI_SERVICES              **PeiServices,\r
-  IN EFI_HOB_HANDOFF_INFO_TABLE    *OldHandOffHob,\r
+  IN CONST EFI_PEI_SERVICES                     **PeiServices,\r
+  IN UINTN                         OldCheckingBottom,\r
+  IN UINTN                         OldCheckingTop,\r
   IN EFI_HOB_HANDOFF_INFO_TABLE    *NewHandOffHob\r
   )\r
 /*++\r
@@ -451,9 +485,10 @@ Routine Description:
 \r
 Arguments:\r
 \r
-  PeiServices   - The PEI core services table.\r
-  OldHandOffHob - The old handoff HOB list.\r
-  NewHandOffHob - The new handoff HOB list.\r
+  PeiServices       - The PEI core services table.\r
+  OldCheckingBottom - The old checking bottom.\r
+  OldCheckingTop    - The old checking top.\r
+  NewHandOffHob     - The new handoff HOB list.\r
 \r
 Returns:\r
 \r