Enhance DxeIpl module to support EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE ffs type,...
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplX64Peim / DxeIpl.h
CommitLineData
5343eab1
LG
1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 DxeIpl.h\r
15\r
16Abstract:\r
17\r
18--*/\r
19\r
20#ifndef __PEI_DXEIPL_H__\r
21#define __PEI_DXEIPL_H__\r
22\r
23#define STACK_SIZE 0x20000\r
24#define BSP_STORE_SIZE 0x4000\r
25\r
26extern BOOLEAN gInMemory;\r
27\r
28VOID\r
29SwitchIplStacks (\r
30 VOID *EntryPoint,\r
31 UINTN Parameter1,\r
32 UINTN Parameter2,\r
33 VOID *NewStack,\r
34 VOID *NewBsp\r
35 )\r
36;\r
37\r
38EFI_STATUS\r
39PeiFindFile (\r
40 IN UINT8 Type,\r
41 IN UINT16 SectionType,\r
42 OUT EFI_GUID *FileName,\r
43 OUT VOID **Pe32Data\r
44 )\r
45;\r
46\r
47EFI_STATUS\r
48PeiLoadFile (\r
49 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,\r
50 IN VOID *Pe32Data,\r
51 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
52 OUT UINT64 *ImageSize,\r
53 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
54 )\r
55;\r
56\r
57\r
58EFI_STATUS\r
59CreateArchSpecificHobs (\r
60 OUT EFI_PHYSICAL_ADDRESS *BspStore\r
61 )\r
62;\r
63\r
64EFI_STATUS\r
65GetImageReadFunction (\r
66 IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
67 )\r
68;\r
69\r
70EFI_STATUS\r
71PeiImageRead (\r
72 IN VOID *FileHandle,\r
73 IN UINTN FileOffset,\r
74 IN OUT UINTN *ReadSize,\r
75 OUT VOID *Buffer\r
76 )\r
77;\r
78\r
79EFI_STATUS\r
80EFIAPI\r
81DxeIplLoadFile (\r
82 IN EFI_PEI_FV_FILE_LOADER_PPI *This,\r
83 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
84 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
85 OUT UINT64 *ImageSize,\r
86 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
87 );\r
88\r
89EFI_STATUS\r
90ShadowDxeIpl (\r
91 IN EFI_FFS_FILE_HEADER *DxeIpl,\r
92 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader\r
93 );\r
94\r
95EFI_STATUS\r
96EFIAPI\r
97DxeLoadCore (\r
98 IN EFI_DXE_IPL_PPI *This,\r
99 IN EFI_PEI_SERVICES **PeiServices,\r
100 IN EFI_PEI_HOB_POINTERS HobList\r
101 );\r
102\r
103EFI_STATUS\r
104PeiProcessFile (\r
105 IN UINT16 SectionType,\r
d6697471 106 IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r
2ea767cc 107 OUT VOID **Pe32Data,\r
108 IN EFI_PEI_HOB_POINTERS *OrigHob\r
5343eab1
LG
109 );\r
110\r
111EFI_STATUS\r
112EFIAPI\r
113PeimInitializeDxeIpl (\r
114 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
115 IN EFI_PEI_SERVICES **PeiServices\r
116 );\r
117\r
118EFI_STATUS\r
fc198a79 119PeiLoadPeImage (\r
5343eab1
LG
120 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,\r
121 IN VOID *Pe32Data,\r
122 IN EFI_MEMORY_TYPE MemoryType,\r
123 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
124 OUT UINT64 *ImageSize,\r
125 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
126 )\r
127;\r
128\r
129EFI_PHYSICAL_ADDRESS\r
130CreateIdentityMappingPageTables (\r
131 IN UINT32 NumberOfProcessorPhysicalAddressBits\r
132 )\r
133;\r
134\r
135VOID\r
136ActivateLongMode (\r
137 IN EFI_PHYSICAL_ADDRESS PageTables, \r
138 IN EFI_PHYSICAL_ADDRESS HobStart,\r
139 IN EFI_PHYSICAL_ADDRESS Stack,\r
140 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint1,\r
141 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint2\r
142 );\r
143\r
144VOID\r
145LoadGo64Gdt();\r
146\r
147#endif\r