]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
1) Add library classes of S3Lib and RecoveryLib in MdeModulePkg
[mirror_edk2.git] / MdeModulePkg / Core / DxeIplPeim / DxeIpl.h
1 /*++
2
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
8
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.
11
12 Module Name:
13
14 DxeIpl.h
15
16 Abstract:
17
18 --*/
19
20 #ifndef __PEI_DXEIPL_H__
21 #define __PEI_DXEIPL_H__
22
23 #include <PiPei.h>
24 #include <Ppi/DxeIpl.h>
25 #include <Protocol/EdkDecompress.h>
26 #include <Ppi/EndOfPeiPhase.h>
27 #include <Protocol/CustomizedDecompress.h>
28 #include <Protocol/Decompress.h>
29 #include <Ppi/Security.h>
30 #include <Ppi/SectionExtraction.h>
31 #include <Ppi/FvLoadFile.h>
32 #include <Ppi/MemoryDiscovered.h>
33 #include <Ppi/Decompress.h>
34 #include <Ppi/FirmwareVolumeInfo.h>
35
36 #include <Guid/FirmwareFileSystem2.h>
37
38 #include <Library/DebugLib.h>
39 #include <Library/PeimEntryPoint.h>
40 #include <Library/BaseLib.h>
41 #include <Library/HobLib.h>
42 #include <Library/PeiServicesLib.h>
43 #include <Library/ReportStatusCodeLib.h>
44 #include <Library/CacheMaintenanceLib.h>
45 #include <Library/PeCoffLoaderLib.h>
46 #include <Library/UefiDecompressLib.h>
47 #include <Library/CustomDecompressLib.h>
48 #include <Library/PeiServicesTablePointerLib.h>
49 #include <Library/BaseMemoryLib.h>
50 #include <Library/MemoryAllocationLib.h>
51 #include <Library/PcdLib.h>
52 #include <Library/PeCoffLib.h>
53 #include <Library/S3Lib.h>
54 #include <Library/RecoveryLib.h>
55
56 #define STACK_SIZE 0x20000
57 #define BSP_STORE_SIZE 0x4000
58
59 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))
60
61 extern BOOLEAN gInMemory;
62
63 EFI_STATUS
64 PeiFindFile (
65 IN UINT8 Type,
66 IN EFI_SECTION_TYPE SectionType,
67 OUT EFI_GUID *FileName,
68 OUT VOID **Pe32Data
69 )
70 ;
71
72 EFI_STATUS
73 PeiLoadFile (
74 IN EFI_PEI_FILE_HANDLE FileHandle,
75 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
76 OUT UINT64 *ImageSize,
77 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
78 )
79 ;
80
81 EFI_STATUS
82 DxeIplAddEncapsulatedFirmwareVolumes (
83 VOID
84 )
85 ;
86
87 EFI_STATUS
88 DxeIplFindFirmwareVolumeInstance (
89 IN OUT UINTN *Instance,
90 IN EFI_FV_FILETYPE SeachType,
91 OUT EFI_PEI_FV_HANDLE *VolumeHandle,
92 OUT EFI_PEI_FILE_HANDLE *FileHandle
93 )
94 ;
95
96 EFI_STATUS
97 GetImageReadFunction (
98 IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
99 )
100 ;
101
102 EFI_STATUS
103 PeiImageRead (
104 IN VOID *FileHandle,
105 IN UINTN FileOffset,
106 IN OUT UINTN *ReadSize,
107 OUT VOID *Buffer
108 )
109 ;
110
111 EFI_STATUS
112 EFIAPI
113 DxeIplLoadFile (
114 IN EFI_PEI_FV_FILE_LOADER_PPI *This,
115 IN EFI_FFS_FILE_HEADER *FfsHeader,
116 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
117 OUT UINT64 *ImageSize,
118 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
119 );
120
121 EFI_STATUS
122 ShadowDxeIpl (
123 IN EFI_FFS_FILE_HEADER *DxeIpl,
124 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader
125 );
126
127 EFI_STATUS
128 EFIAPI
129 DxeLoadCore (
130 IN EFI_DXE_IPL_PPI *This,
131 IN EFI_PEI_SERVICES **PeiServices,
132 IN EFI_PEI_HOB_POINTERS HobList
133 );
134
135 VOID
136 HandOffToDxeCore (
137 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,
138 IN EFI_PEI_HOB_POINTERS HobList,
139 IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal
140 );
141
142 EFI_STATUS
143 PeiProcessFile (
144 IN EFI_SECTION_TYPE SectionType,
145 IN EFI_FFS_FILE_HEADER *FfsFileHeader,
146 OUT VOID **Pe32Data,
147 IN EFI_PEI_HOB_POINTERS *OrigHob
148 );
149
150 EFI_STATUS
151 EFIAPI
152 PeimInitializeDxeIpl (
153 IN EFI_PEI_FILE_HANDLE FfsHandle,
154 IN EFI_PEI_SERVICES **PeiServices
155 )
156 ;
157
158
159 #endif