\r
extern BOOLEAN gInMemory;\r
\r
+\r
+\r
+\r
+/**\r
+ Loads and relocates a PE/COFF image into memory.\r
+\r
+ @param FileHandle The image file handle\r
+ @param ImageAddress The base address of the relocated PE/COFF image\r
+ @param ImageSize The size of the relocated PE/COFF image\r
+ @param EntryPoint The entry point of the relocated PE/COFF image\r
+ \r
+ @return EFI_SUCCESS The file was loaded and relocated\r
+ @return EFI_OUT_OF_RESOURCES There was not enough memory to load and relocate the PE/COFF file\r
+\r
+**/\r
EFI_STATUS\r
PeiLoadFile (\r
IN EFI_PEI_FILE_HANDLE FileHandle,\r
)\r
;\r
\r
+\r
+\r
+/**\r
+ Find DxeCore driver from all First Volumes.\r
+\r
+ @param FileHandle Pointer to FFS file to search.\r
+ \r
+ @return EFI_SUCESS Success to find the FFS in specificed FV\r
+ @return others Fail to find the FFS in specificed FV\r
+\r
+**/\r
EFI_STATUS\r
DxeIplFindDxeCore (\r
OUT EFI_PEI_FILE_HANDLE *FileHandle\r
)\r
;\r
\r
+\r
+\r
+/**\r
+ This function simply retrieves the function pointer of ImageRead in\r
+ ImageContext structure.\r
+ \r
+ @param ImageContext A pointer to the structure of \r
+ PE_COFF_LOADER_IMAGE_CONTEXT\r
+ \r
+ @retval EFI_SUCCESS This function always return EFI_SUCCESS.\r
+\r
+**/\r
EFI_STATUS\r
GetImageReadFunction (\r
IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
)\r
;\r
\r
+\r
+\r
+/**\r
+ Main entry point to last PEIM \r
+ \r
+ @param This Entry point for DXE IPL PPI\r
+ @param PeiServices General purpose services available to every PEIM.\r
+ @param HobList Address to the Pei HOB list\r
+ \r
+ @return EFI_SUCCESS DXE core was successfully loaded. \r
+ @return EFI_OUT_OF_RESOURCES There are not enough resources to load DXE core.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
DxeLoadCore (\r
IN EFI_PEI_HOB_POINTERS HobList\r
);\r
\r
+\r
+\r
+/**\r
+ Transfers control to DxeCore.\r
+\r
+ This function performs a CPU architecture specific operations to execute\r
+ the entry point of DxeCore with the parameters of HobList.\r
+ It also intalls EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+\r
+ @param DxeCoreEntryPoint The entrypoint of DxeCore.\r
+ @param HobList The start of HobList passed to DxeCore.\r
+ @param EndOfPeiSignal The PPI descriptor for EFI_END_OF_PEI_PPI.\r
+\r
+**/\r
VOID\r
HandOffToDxeCore (\r
IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,\r
IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal\r
);\r
\r
+\r
+\r
+/**\r
+ Updates the Stack HOB passed to DXE phase.\r
+\r
+ This function traverses the whole HOB list and update the stack HOB to\r
+ reflect the real stack that is used by DXE core.\r
+\r
+ @param BaseAddress The lower address of stack used by DxeCore.\r
+ @param Length The length of stack used by DxeCore.\r
+\r
+**/\r
VOID\r
UpdateStackHob (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length\r
);\r
\r
+\r
+\r
+/**\r
+ Initializes the Dxe Ipl PPI\r
+\r
+ @param FfsHandle The handle of FFS file.\r
+ @param PeiServices General purpose services available to\r
+ every PEIM.\r
+ @return EFI_SUCESS\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
PeimInitializeDxeIpl (\r