]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - EdkModulePkg/Core/DxeIplPeim/DxeIpl.h
added EFIAPI for those constructor functions
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplPeim / DxeIpl.h
... / ...
CommitLineData
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
28/**\r
29 Transfers control to a function starting with a new stack.\r
30\r
31 Transfers control to the function specified by EntryPoint using the new stack\r
32 specified by NewStack and passing in the parameters specified by Context1 and\r
33 Context2. Context1 and Context2 are optional and may be NULL. The function\r
34 EntryPoint must never return.\r
35\r
36 If EntryPoint is NULL, then ASSERT().\r
37 If NewStack is NULL, then ASSERT().\r
38\r
39 @param EntryPoint A pointer to function to call with the new stack.\r
40 @param Context1 A pointer to the context to pass into the EntryPoint\r
41 function.\r
42 @param Context2 A pointer to the context to pass into the EntryPoint\r
43 function.\r
44 @param NewStack A pointer to the new stack to use for the EntryPoint\r
45 function.\r
46 @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's\r
47 Reserved on other architectures.\r
48\r
49**/\r
50VOID\r
51EFIAPI\r
52SwitchIplStacks (\r
53 IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
54 IN VOID *Context1, OPTIONAL\r
55 IN VOID *Context2, OPTIONAL\r
56 IN VOID *NewStack,\r
57 IN VOID *NewBsp\r
58 );\r
59\r
60EFI_STATUS\r
61PeiFindFile (\r
62 IN UINT8 Type,\r
63 IN UINT16 SectionType,\r
64 OUT EFI_GUID *FileName,\r
65 OUT VOID **Pe32Data\r
66 )\r
67;\r
68\r
69EFI_STATUS\r
70PeiLoadFile (\r
71 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,\r
72 IN VOID *Pe32Data,\r
73 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
74 OUT UINT64 *ImageSize,\r
75 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
76 )\r
77;\r
78\r
79\r
80EFI_STATUS\r
81CreateArchSpecificHobs (\r
82 OUT EFI_PHYSICAL_ADDRESS *BspStore\r
83 )\r
84;\r
85\r
86EFI_STATUS\r
87GetImageReadFunction (\r
88 IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
89 )\r
90;\r
91\r
92EFI_STATUS\r
93PeiImageRead (\r
94 IN VOID *FileHandle,\r
95 IN UINTN FileOffset,\r
96 IN OUT UINTN *ReadSize,\r
97 OUT VOID *Buffer\r
98 )\r
99;\r
100\r
101EFI_STATUS\r
102EFIAPI\r
103DxeIplLoadFile (\r
104 IN EFI_PEI_FV_FILE_LOADER_PPI *This,\r
105 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
106 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
107 OUT UINT64 *ImageSize,\r
108 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
109 );\r
110\r
111EFI_STATUS\r
112ShadowDxeIpl (\r
113 IN EFI_FFS_FILE_HEADER *DxeIpl,\r
114 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader\r
115 );\r
116\r
117EFI_STATUS\r
118EFIAPI\r
119DxeLoadCore (\r
120 IN EFI_DXE_IPL_PPI *This,\r
121 IN EFI_PEI_SERVICES **PeiServices,\r
122 IN EFI_PEI_HOB_POINTERS HobList\r
123 );\r
124\r
125EFI_STATUS\r
126PeiProcessFile (\r
127 IN UINT16 SectionType,\r
128 IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,\r
129 OUT VOID **Pe32Data\r
130 );\r
131\r
132EFI_STATUS\r
133EFIAPI\r
134PeimInitializeDxeIpl (\r
135 IN EFI_FFS_FILE_HEADER *FfsHeader,\r
136 IN EFI_PEI_SERVICES **PeiServices\r
137 );\r
138\r
139EFI_STATUS\r
140PeiLoadx64File (\r
141 IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader,\r
142 IN VOID *Pe32Data,\r
143 IN EFI_MEMORY_TYPE MemoryType,\r
144 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
145 OUT UINT64 *ImageSize,\r
146 OUT EFI_PHYSICAL_ADDRESS *EntryPoint\r
147 )\r
148;\r
149\r
150EFI_PHYSICAL_ADDRESS\r
151CreateIdentityMappingPageTables (\r
152 IN UINT32 NumberOfProcessorPhysicalAddressBits\r
153 )\r
154;\r
155\r
156VOID\r
157ActivateLongMode (\r
158 IN EFI_PHYSICAL_ADDRESS PageTables,\r
159 IN EFI_PHYSICAL_ADDRESS HobStart,\r
160 IN EFI_PHYSICAL_ADDRESS Stack,\r
161 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint1,\r
162 IN EFI_PHYSICAL_ADDRESS CodeEntryPoint2\r
163 );\r
164\r
165VOID\r
166LoadGo64Gdt();\r
167\r
168#endif\r