]>
Commit | Line | Data |
---|---|---|
1 | /*++\r | |
2 | \r | |
3 | Copyright (c) 2006, Intel Corporation\r | |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | DxeIpl.h\r | |
15 | \r | |
16 | Abstract:\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 | |
26 | extern 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 | |
50 | VOID\r | |
51 | EFIAPI\r | |
52 | SwitchIplStacks (\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 | |
60 | EFI_STATUS\r | |
61 | PeiFindFile (\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 | |
69 | EFI_STATUS\r | |
70 | PeiLoadFile (\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 | |
80 | EFI_STATUS\r | |
81 | CreateArchSpecificHobs (\r | |
82 | OUT EFI_PHYSICAL_ADDRESS *BspStore\r | |
83 | )\r | |
84 | ;\r | |
85 | \r | |
86 | EFI_STATUS\r | |
87 | GetImageReadFunction (\r | |
88 | IN PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r | |
89 | )\r | |
90 | ;\r | |
91 | \r | |
92 | EFI_STATUS\r | |
93 | PeiImageRead (\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 | |
101 | EFI_STATUS\r | |
102 | EFIAPI\r | |
103 | DxeIplLoadFile (\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 | |
111 | EFI_STATUS\r | |
112 | ShadowDxeIpl (\r | |
113 | IN EFI_FFS_FILE_HEADER *DxeIpl,\r | |
114 | IN EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader\r | |
115 | );\r | |
116 | \r | |
117 | EFI_STATUS\r | |
118 | EFIAPI\r | |
119 | DxeLoadCore (\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 | |
125 | EFI_STATUS\r | |
126 | PeiProcessFile (\r | |
127 | IN UINT16 SectionType,\r | |
128 | IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,\r | |
129 | OUT VOID **Pe32Data\r | |
130 | );\r | |
131 | \r | |
132 | EFI_STATUS\r | |
133 | EFIAPI\r | |
134 | PeimInitializeDxeIpl (\r | |
135 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r | |
136 | IN EFI_PEI_SERVICES **PeiServices\r | |
137 | );\r | |
138 | \r | |
139 | EFI_STATUS\r | |
140 | PeiLoadx64File (\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 | |
150 | EFI_PHYSICAL_ADDRESS\r | |
151 | CreateIdentityMappingPageTables (\r | |
152 | IN UINT32 NumberOfProcessorPhysicalAddressBits\r | |
153 | )\r | |
154 | ;\r | |
155 | \r | |
156 | VOID\r | |
157 | ActivateLongMode (\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 | |
165 | VOID\r | |
166 | LoadGo64Gdt();\r | |
167 | \r | |
168 | #endif\r |