]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
Update CustomDecompress library to support algorithm guid and Update DxeIpl and DxeCo...
[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 <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>
50
51
52 #define STACK_SIZE 0x20000
53 #define BSP_STORE_SIZE 0x4000
54
55 #define GET_OCCUPIED_SIZE(ActualSize, Alignment) ((ActualSize + (Alignment - 1)) & ~(Alignment - 1))
56
57 extern BOOLEAN gInMemory;
58
59 EFI_STATUS
60 PeiFindFile (
61 IN UINT8 Type,
62 IN EFI_SECTION_TYPE SectionType,
63 OUT EFI_GUID *FileName,
64 OUT VOID **Pe32Data
65 )
66 ;
67
68 EFI_STATUS
69 PeiLoadFile (
70 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,
71 IN VOID *Pe32Data,
72 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
73 OUT UINT64 *ImageSize,
74 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
75 )
76 ;
77
78
79 EFI_STATUS
80 GetImageReadFunction (
81 IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
82 )
83 ;
84
85 EFI_STATUS
86 PeiImageRead (
87 IN VOID *FileHandle,
88 IN UINTN FileOffset,
89 IN OUT UINTN *ReadSize,
90 OUT VOID *Buffer
91 )
92 ;
93
94 EFI_STATUS
95 EFIAPI
96 DxeIplLoadFile (
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
102 );
103
104 EFI_STATUS
105 ShadowDxeIpl (
106 IN EFI_FFS_FILE_HEADER *DxeIpl,
107 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader
108 );
109
110 EFI_STATUS
111 EFIAPI
112 DxeLoadCore (
113 IN EFI_DXE_IPL_PPI *This,
114 IN EFI_PEI_SERVICES **PeiServices,
115 IN EFI_PEI_HOB_POINTERS HobList
116 );
117
118 VOID
119 HandOffToDxeCore (
120 IN EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint,
121 IN EFI_PEI_HOB_POINTERS HobList,
122 IN EFI_PEI_PPI_DESCRIPTOR *EndOfPeiSignal
123 );
124
125 EFI_STATUS
126 PeiProcessFile (
127 IN EFI_SECTION_TYPE SectionType,
128 IN EFI_FFS_FILE_HEADER *FfsFileHeader,
129 OUT VOID **Pe32Data,
130 IN EFI_PEI_HOB_POINTERS *OrigHob
131 );
132
133 EFI_STATUS
134 EFIAPI
135 PeimInitializeDxeIpl (
136 IN EFI_FFS_FILE_HEADER *FfsHeader,
137 IN EFI_PEI_SERVICES **PeiServices
138 );
139
140
141 #endif