3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #ifndef __PEI_DXEIPL_H__
21 #define __PEI_DXEIPL_H__
24 #include <Ppi/DxeIpl.h>
25 #include <Ppi/S3Resume.h>
26 #include <Protocol/EdkDecompress.h>
27 #include <Ppi/EndOfPeiPhase.h>
28 #include <Protocol/CustomizedDecompress.h>
29 #include <Protocol/Decompress.h>
30 #include <Ppi/Security.h>
31 #include <Ppi/SectionExtraction.h>
32 #include <Ppi/FvLoadFile.h>
33 #include <Ppi/RecoveryModule.h>
34 #include <Ppi/MemoryDiscovered.h>
35 #include <Library/DebugLib.h>
36 #include <Library/PeimEntryPoint.h>
37 #include <Library/BaseLib.h>
38 #include <Library/HobLib.h>
39 #include <Library/PeiServicesLib.h>
40 #include <Library/ReportStatusCodeLib.h>
41 #include <Library/CacheMaintenanceLib.h>
42 #include <Library/PeCoffLoaderLib.h>
43 #include <Library/UefiDecompressLib.h>
44 #include <Library/CustomDecompressLib.h>
45 #include <Library/PeiServicesTablePointerLib.h>
46 #include <Library/BaseMemoryLib.h>
47 #include <Library/MemoryAllocationLib.h>
48 #include <Library/PcdLib.h>
49 #include <Library/PeCoffLib.h>
52 #define STACK_SIZE 0x20000
53 #define BSP_STORE_SIZE 0x4000
55 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))
57 extern BOOLEAN gInMemory
;
62 IN UINT16 SectionType
,
63 OUT EFI_GUID
*FileName
,
70 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL
*PeiEfiPeiPeCoffLoader
,
72 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
73 OUT UINT64
*ImageSize
,
74 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
80 GetImageReadFunction (
81 IN PE_COFF_LOADER_IMAGE_CONTEXT
*ImageContext
89 IN OUT UINTN
*ReadSize
,
97 IN EFI_PEI_FV_FILE_LOADER_PPI
*This
,
98 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
99 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
100 OUT UINT64
*ImageSize
,
101 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
106 IN EFI_FFS_FILE_HEADER
*DxeIpl
,
107 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL
*PeiEfiPeiPeCoffLoader
113 IN EFI_DXE_IPL_PPI
*This
,
114 IN EFI_PEI_SERVICES
**PeiServices
,
115 IN EFI_PEI_HOB_POINTERS HobList
120 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint
,
121 IN EFI_PEI_HOB_POINTERS HobList
,
122 IN EFI_PEI_PPI_DESCRIPTOR
*EndOfPeiSignal
127 IN UINT16 SectionType
,
128 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
130 IN EFI_PEI_HOB_POINTERS
*OrigHob
135 PeimInitializeDxeIpl (
136 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
137 IN EFI_PEI_SERVICES
**PeiServices