Move ConPlatform module from EdkNT32 package to EdkModulePkg, and remove EdkPeCoffLoa...
[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
106 IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,\r
107 OUT VOID **Pe32Data\r
108 );\r
109\r
110EFI_STATUS\r
111EFIAPI\r
112PeimInitializeDxeIpl (\r
113 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
114 IN EFI_PEI_SERVICES **PeiServices\r
115 );\r
116\r
117EFI_STATUS\r
fc198a79 118PeiLoadPeImage (\r
5343eab1
LG
119 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,\r
120 IN VOID *Pe32Data,\r
121 IN EFI_MEMORY_TYPE MemoryType,\r
122 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
123 OUT UINT64 *ImageSize,\r
124 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
125 )\r
126;\r
127\r
128EFI_PHYSICAL_ADDRESS\r
129CreateIdentityMappingPageTables (\r
130 IN UINT32 NumberOfProcessorPhysicalAddressBits\r
131 )\r
132;\r
133\r
134VOID\r
135ActivateLongMode (\r
136 IN EFI_PHYSICAL_ADDRESS PageTables, \r
137 IN EFI_PHYSICAL_ADDRESS HobStart,\r
138 IN EFI_PHYSICAL_ADDRESS Stack,\r
139 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint1,\r
140 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint2\r
141 );\r
142\r
143VOID\r
144LoadGo64Gdt();\r
145\r
146#endif\r