]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
Fix the issue that accessing for unaligned address break IPF
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / DxeIpl.h
index 839cd30d9e48b487feacf32ad138297ba4a4280e..1240ce6c2bf2b17a15fba47b778ed92df9c7fe0a 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Master header file for DxeIpl PEIM. All source files in this module should\r
-  include this file for common defininitions.\r
+  include this file for common definitions.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,6 +24,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Ppi/Decompress.h>\r
 #include <Ppi/FirmwareVolumeInfo.h>\r
 #include <Ppi/GuidedSectionExtraction.h>\r
+#include <Ppi/LoadFile.h>\r
+#include <Ppi/S3Resume.h>\r
+#include <Ppi/RecoveryModule.h>\r
 \r
 #include <Guid/MemoryTypeInformation.h>\r
 #include <Guid/MemoryAllocationHob.h>\r
@@ -35,13 +38,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/HobLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
-#include <Library/CacheMaintenanceLib.h>\r
 #include <Library/UefiDecompressLib.h>\r
 #include <Library/ExtractGuidedSectionLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/PcdLib.h>\r
-#include <Library/PeCoffLib.h>\r
 #include <Library/S3Lib.h>\r
 #include <Library/RecoveryLib.h>\r
 \r
@@ -49,46 +50,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define BSP_STORE_SIZE  0x4000\r
 \r
 \r
-//\r
-// This macro aligns the ActualSize with a given alignment and is used to \r
-// calculate the size an image occupies.\r
-//\r
-#define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))\r
-\r
-//\r
-// Indicate whether DxeIpl has been shadowed to memory.\r
-//\r
-extern BOOLEAN gInMemory;\r
-\r
 //\r
 // This PPI is installed to indicate the end of the PEI usage of memory \r
 //\r
 extern CONST EFI_PEI_PPI_DESCRIPTOR gEndOfPeiSignalPpi;\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
-  OUT EFI_PHYSICAL_ADDRESS                      *ImageAddress,\r
-  OUT UINT64                                    *ImageSize,\r
-  OUT EFI_PHYSICAL_ADDRESS                      *EntryPoint\r
-  );\r
-\r
-\r
-\r
 /**\r
    Searches DxeCore in all firmware Volumes and loads the first\r
    instance that contains DxeCore.\r
@@ -102,22 +69,6 @@ DxeIplFindDxeCore (
   );\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
    Main entry point to last PEIM \r
     \r
@@ -144,9 +95,9 @@ DxeLoadCore (
 \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
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
 \r
-   @param DxeCoreEntryPoint         The entrypoint of DxeCore.\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
    @param HobList                   The start of HobList passed to DxeCore.\r
 \r
 **/\r
@@ -229,6 +180,7 @@ UpdateStackHob (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 CustomGuidedSectionExtract (\r
   IN CONST  EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,\r
   IN CONST  VOID                                  *InputSection,\r
@@ -241,7 +193,7 @@ CustomGuidedSectionExtract (
 /**\r
    Decompresses a section to the output buffer.\r
 \r
-   This function lookes up the compression type field in the input section and\r
+   This function looks up the compression type field in the input section and\r
    applies the appropriate compression algorithm to compress the section to a\r
    callee allocated buffer.\r
     \r
@@ -267,21 +219,4 @@ Decompress (
   OUT       UINTN                   *OutputSize\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
-  IN       EFI_PEI_FILE_HANDLE       FfsHandle,\r
-  IN CONST EFI_PEI_SERVICES          **PeiServices\r
-  );\r
-\r
-\r
 #endif\r