]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | /** @file\r |
2 | PI PEI master include file. This file should match the PI spec.\r | |
3 | \r | |
7b1bf9f6 | 4 | Copyright (c) 2006 - 2008, Intel Corporation \r |
959ccb23 | 5 | All rights reserved. This program and the accompanying materials \r |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
959ccb23 | 13 | @par Revision Reference:\r |
0047820e | 14 | PI Version 1.0\r |
959ccb23 | 15 | \r |
16 | **/\r | |
17 | \r | |
18 | #ifndef __PI_PEICIS_H__\r | |
19 | #define __PI_PEICIS_H__\r | |
20 | \r | |
21 | #include <Pi/PiMultiPhase.h>\r | |
22 | \r | |
6de794cd | 23 | ///\r |
24 | /// Handles of EFI FV.\r | |
25 | /// \r | |
00edb218 | 26 | typedef VOID *EFI_PEI_FV_HANDLE;\r |
6de794cd | 27 | \r |
28 | ///\r | |
29 | /// Handles of EFI FFS\r | |
30 | /// \r | |
00edb218 | 31 | typedef VOID *EFI_PEI_FILE_HANDLE;\r |
959ccb23 | 32 | \r |
6de794cd | 33 | ///\r |
34 | /// Declare forward reference data structure for EFI_PEI_SERVICE\r | |
35 | /// \r | |
959ccb23 | 36 | typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES;\r |
6de794cd | 37 | \r |
38 | ///\r | |
39 | /// Declare forward reference data structure for EFI_PEI_NOTIFY_DESCRIPTOR\r | |
40 | /// \r | |
959ccb23 | 41 | typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;\r |
42 | \r | |
43 | \r | |
44 | #include <Ppi/CpuIo.h>\r | |
45 | #include <Ppi/PciCfg2.h>\r | |
46 | \r | |
fb3df220 | 47 | \r |
959ccb23 | 48 | /**\r |
49 | The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI \r | |
50 | Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header. \r | |
51 | \r | |
6de794cd | 52 | @param FileHandle Pointer to the FFS file header.\r |
959ccb23 | 53 | @param PeiServices Describes the list of possible PEI Services.\r |
54 | \r | |
373b5cf9 | 55 | @retval EFI_SUCCESS The PEI completed successfully.\r |
56 | @retval !EFI_SUCCESS There is error in PEIM.\r | |
959ccb23 | 57 | \r |
58 | **/\r | |
59 | typedef\r | |
60 | EFI_STATUS\r | |
1c9d209f | 61 | (EFIAPI *EFI_PEIM_ENTRY_POINT2)(\r |
b0d803fe | 62 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
63 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
959ccb23 | 64 | );\r |
65 | \r | |
66 | /**\r | |
67 | Entry point of the notification callback function itself within the PEIM.\r | |
68 | \r | |
69 | @param PeiServices Indirect reference to the PEI Services Table.\r | |
70 | @param NotifyDescriptor Address of the notification descriptor data structure.\r | |
71 | @param Ppi Address of the PPI that was installed.\r | |
72 | \r | |
373b5cf9 | 73 | @return Status of the notification.\r |
959ccb23 | 74 | **/\r |
75 | typedef\r | |
76 | EFI_STATUS\r | |
6de794cd | 77 | (EFIAPI *EFI_PEIM_NOTIFY_ENTRY_POINT)(\r |
959ccb23 | 78 | IN EFI_PEI_SERVICES **PeiServices,\r |
79 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r | |
80 | IN VOID *Ppi\r | |
81 | );\r | |
82 | \r | |
83 | //\r | |
84 | // PEI Ppi Services List Descriptors\r | |
85 | //\r | |
86 | #define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001\r | |
87 | #define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010\r | |
88 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020\r | |
89 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040\r | |
90 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060\r | |
91 | #define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000\r | |
92 | \r | |
6de794cd | 93 | ///\r |
94 | /// The data structure through which a PEIM describes available services to the PEI Foundation.\r | |
95 | /// \r | |
959ccb23 | 96 | typedef struct {\r |
97 | UINTN Flags;\r | |
98 | EFI_GUID *Guid;\r | |
99 | VOID *Ppi;\r | |
100 | } EFI_PEI_PPI_DESCRIPTOR;\r | |
101 | \r | |
6de794cd | 102 | /// \r |
103 | /// The data structure in a given PEIM that tells the PEI \r | |
104 | /// Foundation where to invoke the notification service.\r | |
105 | /// \r | |
959ccb23 | 106 | struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r |
107 | UINTN Flags;\r | |
108 | EFI_GUID *Guid;\r | |
109 | EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r | |
110 | };\r | |
111 | \r | |
6de794cd | 112 | ///\r |
113 | /// Describes request of the module to be loaded to \r | |
114 | /// the permanent memory once it is available. Unlike most of the other HOBs, \r | |
115 | /// this HOB is produced and consumed during the HOB producer phase.\r | |
116 | /// \r | |
959ccb23 | 117 | typedef struct _EFI_HOB_LOAD_PEIM {\r |
00edb218 A |
118 | EFI_HOB_GENERIC_HEADER Header;\r |
119 | EFI_PEI_FILE_HANDLE FileHandle;\r | |
1c9d209f | 120 | EFI_PEIM_ENTRY_POINT2 EntryPoint;\r |
121 | EFI_PEIM_ENTRY_POINT2 InMemEntryPoint;\r | |
959ccb23 | 122 | } EFI_HOB_LOAD_PEIM;\r |
123 | \r | |
124 | \r | |
125 | /**\r | |
126 | This service is the first one provided by the PEI Foundation. This function \r | |
127 | installs an interface in the PEI PPI database by GUID. The purpose of the \r | |
128 | service is to publish an interface that other parties can use to call \r | |
129 | additional PEIMs.\r | |
130 | \r | |
131 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r | |
132 | published by the PEI Foundation.\r | |
133 | @param PpiList A pointer to the list of interfaces that the caller shall install.\r | |
134 | \r | |
135 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
136 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
137 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
138 | \r | |
139 | **/\r | |
140 | typedef\r | |
141 | EFI_STATUS\r | |
6de794cd | 142 | (EFIAPI *EFI_PEI_INSTALL_PPI)(\r |
1c280088 | 143 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
144 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
959ccb23 | 145 | );\r |
146 | \r | |
147 | /**\r | |
148 | This function reinstalls an interface in the PEI PPI database by GUID. \r | |
149 | The purpose of the service is to publish an interface that other parties \r | |
150 | can use to replace a same-named interface in the protocol database \r | |
151 | with a different interface. \r | |
152 | \r | |
153 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r | |
154 | published by the PEI Foundation.\r | |
155 | @param OldPpi A pointer to the former PPI in the database.\r | |
156 | @param NewPpi A pointer to the new interfaces that the caller shall install.\r | |
157 | \r | |
158 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
159 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the \r | |
160 | list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
161 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
162 | @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.\r | |
163 | \r | |
164 | **/\r | |
165 | typedef\r | |
166 | EFI_STATUS\r | |
6de794cd | 167 | (EFIAPI *EFI_PEI_REINSTALL_PPI)(\r |
1c280088 | 168 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
169 | IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r | |
170 | IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi\r | |
959ccb23 | 171 | );\r |
172 | \r | |
173 | /**\r | |
174 | This function locates an interface in the PEI PPI database by GUID. \r | |
175 | \r | |
176 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.\r | |
177 | @param Guid A pointer to the GUID whose corresponding interface needs to be found.\r | |
178 | @param Instance The N-th instance of the interface that is required.\r | |
179 | @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.\r | |
180 | @param Ppi A pointer to the instance of the interface.\r | |
181 | \r | |
182 | @retval EFI_SUCCESS The interface was successfully returned.\r | |
183 | @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.\r | |
184 | \r | |
185 | **/\r | |
186 | typedef\r | |
187 | EFI_STATUS\r | |
6de794cd | 188 | (EFIAPI *EFI_PEI_LOCATE_PPI)(\r |
1c280088 | 189 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
190 | IN CONST EFI_GUID *Guid,\r | |
191 | IN UINTN Instance,\r | |
192 | IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL,\r | |
193 | IN OUT VOID **Ppi\r | |
959ccb23 | 194 | );\r |
195 | \r | |
196 | /**\r | |
197 | This function installs a notification service to be called back when a \r | |
198 | given interface is installed or reinstalled. The purpose of the service \r | |
199 | is to publish an interface that other parties can use to call additional PPIs \r | |
200 | that may materialize later.\r | |
201 | \r | |
202 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
203 | @param NotifyList A pointer to the list of notification interfaces that the caller shall install.\r | |
204 | \r | |
205 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
206 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the \r | |
207 | list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
208 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
209 | \r | |
210 | **/\r | |
211 | typedef\r | |
212 | EFI_STATUS\r | |
6de794cd | 213 | (EFIAPI *EFI_PEI_NOTIFY_PPI)(\r |
1c280088 | 214 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
215 | IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r | |
959ccb23 | 216 | );\r |
217 | \r | |
218 | /**\r | |
219 | This function returns the present value of the boot mode.\r | |
220 | \r | |
221 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
222 | @param BootMode A pointer to contain the value of the boot mode.\r | |
223 | \r | |
224 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
225 | \r | |
226 | **/\r | |
227 | typedef\r | |
228 | EFI_STATUS\r | |
6de794cd | 229 | (EFIAPI *EFI_PEI_GET_BOOT_MODE)(\r |
1c280088 | 230 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
231 | OUT EFI_BOOT_MODE *BootMode\r | |
959ccb23 | 232 | );\r |
233 | \r | |
234 | /**\r | |
235 | This function sets the value of the boot mode.\r | |
236 | \r | |
237 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
238 | @param BootMode The value of the boot mode to set.\r | |
239 | \r | |
240 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
241 | \r | |
242 | **/\r | |
243 | typedef\r | |
244 | EFI_STATUS\r | |
6de794cd | 245 | (EFIAPI *EFI_PEI_SET_BOOT_MODE)(\r |
1c280088 | 246 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
247 | IN EFI_BOOT_MODE BootMode\r | |
959ccb23 | 248 | );\r |
249 | \r | |
250 | /**\r | |
251 | This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory. \r | |
252 | \r | |
253 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
254 | @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize\r | |
255 | \r | |
256 | @retval EFI_SUCCESS The list was successfully returned.\r | |
257 | @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.\r | |
258 | \r | |
259 | **/\r | |
260 | typedef\r | |
261 | EFI_STATUS\r | |
6de794cd | 262 | (EFIAPI *EFI_PEI_GET_HOB_LIST)(\r |
1c280088 | 263 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
67c89a21 | 264 | OUT VOID **HobList\r |
959ccb23 | 265 | );\r |
266 | \r | |
267 | /**\r | |
268 | This service published by the PEI Foundation abstracts the creation of a Hand-Off Block's (HOB's) headers.\r | |
269 | \r | |
270 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
271 | @param Type The type of HOB to be installed.\r | |
272 | @param Length The length of the HOB to be added.\r | |
273 | @param Hob The address of a pointer that will contain the HOB header.\r | |
274 | \r | |
275 | @retval EFI_SUCCESS The HOB was successfully created.\r | |
276 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
277 | \r | |
278 | **/\r | |
279 | typedef\r | |
280 | EFI_STATUS\r | |
6de794cd | 281 | (EFIAPI *EFI_PEI_CREATE_HOB)(\r |
1c280088 | 282 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
283 | IN UINT16 Type,\r | |
284 | IN UINT16 Length,\r | |
7b1bf9f6 | 285 | IN OUT VOID **Hob\r |
959ccb23 | 286 | );\r |
287 | \r | |
288 | /**\r | |
289 | The purpose of the service is to abstract the capability of the PEI \r | |
290 | Foundation to discover instances of firmware volumes in the system. \r | |
c7c308ad | 291 | \r |
292 | This service enables PEIMs to discover additional firmware volumes. The PEI Foundation uses this\r | |
293 | service to abstract the locations and formats of various firmware volumes. These volumes include\r | |
294 | the Boot Firmware Volume and any other volumes exposed by EFI_PEI_FV_PPI. The service\r | |
295 | returns a volume handle of type EFI_PEI_FV_HANDLE, which must be unique within the system.\r | |
959ccb23 | 296 | \r |
297 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
c7c308ad | 298 | @param Instance This instance of the firmware volume to find.\r |
299 | The value 0 is the Boot Firmware Volume (BFV).\r | |
300 | @param VolumeHandle On exit, points to the next volumn handle or NULL if it does not exist.\r | |
959ccb23 | 301 | \r |
302 | @retval EFI_SUCCESS The volume was found.\r | |
303 | @retval EFI_NOT_FOUND The volume was not found.\r | |
7b1bf9f6 | 304 | @retval EFI_INVALID_PARAMETER VolumeHandle is NULL.\r |
959ccb23 | 305 | \r |
306 | **/\r | |
307 | typedef\r | |
308 | EFI_STATUS\r | |
6de794cd | 309 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME2)(\r |
1c280088 | 310 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
311 | IN UINTN Instance,\r | |
312 | OUT EFI_PEI_FV_HANDLE *VolumeHandle\r | |
959ccb23 | 313 | );\r |
314 | \r | |
315 | /**\r | |
c7c308ad | 316 | Searches for the next matching file in the firmware volume.\r |
317 | \r | |
318 | This service enables PEIMs to discover firmware files within a specified volume.\r | |
319 | To find the first instance of a firmware file, pass a FileHandle value of NULL into the service.\r | |
320 | The service returns a file handle of type EFI_PEI_FILE_HANDLE, which must be unique within\r | |
321 | the system.\r | |
959ccb23 | 322 | \r |
323 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
324 | @param SearchType A filter to find files only of this type.\r | |
c7c308ad | 325 | @param FvHandle Handle of firmware volume in which to search.\r |
326 | @param FileHandle On entry, points to the current handle from which to begin searching\r | |
327 | or NULL to start at the beginning of the firmware volume.\r | |
328 | On exit, points the file handle of the next file in the volume or NULL\r | |
329 | if there are no more files.\r | |
959ccb23 | 330 | \r |
c7c308ad | 331 | @retval EFI_SUCCESS The file was found.\r |
332 | @retval EFI_NOT_FOUND The file was not found.\r | |
333 | @retval EFI_NOT_FOUND The header checksum was not zero.\r | |
959ccb23 | 334 | \r |
335 | **/\r | |
336 | typedef\r | |
337 | EFI_STATUS\r | |
6de794cd | 338 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE2)(\r |
1c280088 | 339 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
340 | IN EFI_FV_FILETYPE SearchType,\r | |
c7c308ad | 341 | IN CONST EFI_PEI_FV_HANDLE FvHandle,\r |
1c280088 | 342 | IN OUT EFI_PEI_FILE_HANDLE *FileHandle\r |
959ccb23 | 343 | );\r |
344 | \r | |
345 | /**\r | |
c7c308ad | 346 | Searches for the next matching section within the specified file.\r |
347 | \r | |
348 | This service enables PEI modules to discover the first section of a given type within a valid file.\r | |
349 | This service will search within encapsulation sections (compression and GUIDed) as well. It will\r | |
350 | search inside of a GUIDed section or a compressed section, but may not, for example, search a\r | |
351 | GUIDed section inside a GUIDes section.\r | |
352 | This service will not search within compression sections or GUIDed sections which require\r | |
353 | extraction if memory is not present.\r | |
959ccb23 | 354 | \r |
355 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
356 | @param SectionType The value of the section type to find.\r | |
c7c308ad | 357 | @param FileHandle Handle of the firmware file to search.\r |
959ccb23 | 358 | @param SectionData A pointer to the discovered section, if successful.\r |
359 | \r | |
c7c308ad | 360 | @retval EFI_SUCCESS The section was found.\r |
361 | @retval EFI_NOT_FOUND The section was not found.\r | |
959ccb23 | 362 | \r |
363 | **/\r | |
364 | typedef\r | |
365 | EFI_STATUS\r | |
6de794cd | 366 | (EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA2)(\r |
1c280088 | 367 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
368 | IN EFI_SECTION_TYPE SectionType,\r | |
369 | IN EFI_PEI_FILE_HANDLE FileHandle,\r | |
c7c308ad | 370 | OUT VOID **SectionData\r |
959ccb23 | 371 | );\r |
372 | \r | |
373 | /**\r | |
374 | This function registers the found memory configuration with the PEI Foundation.\r | |
375 | \r | |
376 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
377 | @param MemoryBegin The value of a region of installed memory\r | |
378 | @param MemoryLength The corresponding length of a region of installed memory.\r | |
379 | \r | |
380 | @retval EFI_SUCCESS The region was successfully installed in a HOB.\r | |
381 | @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.\r | |
382 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
383 | \r | |
384 | **/\r | |
385 | typedef\r | |
386 | EFI_STATUS\r | |
6de794cd | 387 | (EFIAPI *EFI_PEI_INSTALL_PEI_MEMORY)(\r |
1c280088 | 388 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
959ccb23 | 389 | IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r |
390 | IN UINT64 MemoryLength\r | |
391 | );\r | |
392 | \r | |
393 | /**\r | |
394 | The purpose of the service is to publish an interface that allows \r | |
395 | PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r | |
396 | \r | |
397 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
398 | @param MemoryType The type of memory to allocate.\r | |
399 | @param Pages The number of contiguous 4 KB pages to allocate.\r | |
400 | @param Memory Pointer to a physical address. On output, the address is set to the base \r | |
401 | of the page range that was allocated.\r | |
402 | \r | |
403 | @retval EFI_SUCCESS The memory range was successfully allocated.\r | |
404 | @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r | |
405 | @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.\r | |
406 | \r | |
407 | **/\r | |
408 | typedef\r | |
409 | EFI_STATUS\r | |
6de794cd | 410 | (EFIAPI *EFI_PEI_ALLOCATE_PAGES)(\r |
1c280088 | 411 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
959ccb23 | 412 | IN EFI_MEMORY_TYPE MemoryType,\r |
413 | IN UINTN Pages,\r | |
c7c308ad | 414 | OUT EFI_PHYSICAL_ADDRESS *Memory\r |
959ccb23 | 415 | );\r |
416 | \r | |
417 | /**\r | |
418 | The purpose of this service is to publish an interface that \r | |
419 | allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r | |
420 | \r | |
421 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
422 | @param Size The number of bytes to allocate from the pool.\r | |
423 | @param Buffer If the call succeeds, a pointer to a pointer to the allocated buffer; undefined otherwise.\r | |
424 | \r | |
425 | @retval EFI_SUCCESS The allocation was successful.\r | |
426 | @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.\r | |
427 | \r | |
428 | **/\r | |
429 | typedef\r | |
430 | EFI_STATUS\r | |
6de794cd | 431 | (EFIAPI *EFI_PEI_ALLOCATE_POOL)(\r |
1c280088 | 432 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
959ccb23 | 433 | IN UINTN Size,\r |
434 | OUT VOID **Buffer\r | |
435 | );\r | |
436 | \r | |
437 | /**\r | |
438 | This service copies the contents of one buffer to another buffer.\r | |
439 | \r | |
440 | @param Destination Pointer to the destination buffer of the memory copy.\r | |
441 | @param Source Pointer to the source buffer of the memory copy\r | |
442 | @param Length Number of bytes to copy from Source to Destination.\r | |
443 | \r | |
959ccb23 | 444 | **/\r |
445 | typedef\r | |
446 | VOID\r | |
6de794cd | 447 | (EFIAPI *EFI_PEI_COPY_MEM)(\r |
959ccb23 | 448 | IN VOID *Destination,\r |
449 | IN VOID *Source,\r | |
450 | IN UINTN Length\r | |
451 | );\r | |
452 | \r | |
453 | /**\r | |
454 | The service fills a buffer with a specified value.\r | |
455 | \r | |
456 | @param Buffer Pointer to the buffer to fill.\r | |
457 | @param Size Number of bytes in Buffer to fill.\r | |
458 | @param Value Value to fill Buffer with\r | |
459 | \r | |
959ccb23 | 460 | **/\r |
461 | typedef\r | |
462 | VOID\r | |
6de794cd | 463 | (EFIAPI *EFI_PEI_SET_MEM)(\r |
959ccb23 | 464 | IN VOID *Buffer,\r |
465 | IN UINTN Size,\r | |
466 | IN UINT8 Value\r | |
467 | );\r | |
468 | \r | |
469 | /**\r | |
470 | This service publishes an interface that allows PEIMs to report status codes.\r | |
471 | \r | |
c7c308ad | 472 | ReportStatusCode() is called by PEIMs that wish to report status information on their\r |
473 | progress. The principal use model is for a PEIM to emit one of the standard 32-bit error codes. This\r | |
474 | will allow a platform owner to ascertain the state of the system, especially under conditions where\r | |
475 | the full consoles might not have been installed.\r | |
476 | \r | |
959ccb23 | 477 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
478 | @param Type Indicates the type of status code being reported.\r | |
479 | @param Value Describes the current status of a hardware or\r | |
480 | software entity. This includes information about the class and\r | |
481 | subclass that is used to classify the entity as well as an operation.\r | |
482 | For progress codes, the operation is the current activity.\r | |
483 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
484 | @param Instance The enumeration of a hardware or software entity within\r | |
485 | the system. A system may contain multiple entities that match a class/subclass\r | |
486 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
487 | that instance information is unavailable, not meaningful, or not relevant.\r | |
488 | Valid instance numbers start with 1.\r | |
489 | @param CallerId This optional parameter may be used to identify the caller.\r | |
490 | This parameter allows the status code driver to apply different rules to\r | |
491 | different callers.\r | |
492 | @param Data This optional parameter may be used to pass additional data.\r | |
493 | \r | |
494 | @retval EFI_SUCCESS The function completed successfully.\r | |
495 | @retval EFI_NOT_AVAILABLE_YET No progress code provider has installed an interface in the system.\r | |
496 | \r | |
497 | **/\r | |
498 | typedef\r | |
499 | EFI_STATUS\r | |
6de794cd | 500 | (EFIAPI *EFI_PEI_REPORT_STATUS_CODE)(\r |
1c280088 | 501 | IN CONST EFI_PEI_SERVICES **PeiServices,\r |
502 | IN EFI_STATUS_CODE_TYPE Type,\r | |
503 | IN EFI_STATUS_CODE_VALUE Value,\r | |
504 | IN UINT32 Instance,\r | |
505 | IN CONST EFI_GUID *CallerId OPTIONAL,\r | |
506 | IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
959ccb23 | 507 | );\r |
508 | \r | |
509 | /**\r | |
510 | Resets the entire platform.\r | |
511 | \r | |
c7c308ad | 512 | This service resets the entire platform, including all processors\r |
513 | and devices, and reboots the system.\r | |
514 | This service will never return EFI_SUCCESS. \r | |
515 | \r | |
959ccb23 | 516 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES\r |
517 | table published by the PEI Foundation.\r | |
518 | \r | |
959ccb23 | 519 | @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.\r |
520 | \r | |
521 | **/\r | |
522 | typedef\r | |
523 | EFI_STATUS\r | |
6de794cd | 524 | (EFIAPI *EFI_PEI_RESET_SYSTEM)(\r |
b0d803fe | 525 | IN CONST EFI_PEI_SERVICES **PeiServices\r |
959ccb23 | 526 | );\r |
527 | \r | |
528 | /**\r | |
c7c308ad | 529 | Find a file within a volume by its name.\r |
530 | \r | |
00edb218 A |
531 | This service searches for files with a specific name, within\r |
532 | either the specified firmware volume or all firmware volumes.\r | |
533 | The service returns a file handle of type EFI_PEI_FILE_HANDLE,\r | |
959ccb23 | 534 | which must be unique within the system.\r |
535 | \r | |
00edb218 A |
536 | @param FileName A pointer to the name of the file to\r |
537 | find within the firmware volume.\r | |
c7c308ad | 538 | @param VolumeHandle The firmware volume to search.\r |
539 | @param FileHandle Upon exit, points to the found file's\r | |
959ccb23 | 540 | handle or NULL if it could not be found.\r |
541 | \r | |
00edb218 | 542 | @retval EFI_SUCCESS File was found.\r |
00edb218 | 543 | @retval EFI_NOT_FOUND File was not found.\r |
00edb218 A |
544 | @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or\r |
545 | FileName was NULL.\r | |
959ccb23 | 546 | \r |
959ccb23 | 547 | **/\r |
548 | typedef\r | |
549 | EFI_STATUS\r | |
6de794cd | 550 | (EFIAPI *EFI_PEI_FFS_FIND_BY_NAME)(\r |
c7c308ad | 551 | IN CONST EFI_GUID *FileName,\r |
552 | IN EFI_PEI_FV_HANDLE VolumeHandle,\r | |
553 | OUT EFI_PEI_FILE_HANDLE *FileHandle\r | |
00edb218 | 554 | );\r |
959ccb23 | 555 | \r |
c7c308ad | 556 | ///\r |
557 | /// Information of FV file.\r | |
558 | ///\r | |
959ccb23 | 559 | typedef struct {\r |
c7c308ad | 560 | ///\r |
561 | /// Name of the file.\r | |
562 | ///\r | |
00edb218 | 563 | EFI_GUID FileName;\r |
c7c308ad | 564 | ///\r |
565 | /// File type.\r | |
566 | ///\r | |
00edb218 | 567 | EFI_FV_FILETYPE FileType;\r |
c7c308ad | 568 | ///\r |
569 | /// Attributes of the file.\r | |
570 | ///\r | |
00edb218 | 571 | EFI_FV_FILE_ATTRIBUTES FileAttributes;\r |
c7c308ad | 572 | ///\r |
573 | /// Points to the file's data (not the header).\r | |
574 | /// Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED\r | |
575 | /// is zero.\r | |
576 | ///\r | |
00edb218 | 577 | VOID *Buffer;\r |
c7c308ad | 578 | ///\r |
242942b2 | 579 | /// Size of the file's data.\r |
c7c308ad | 580 | ///\r |
00edb218 | 581 | UINT32 BufferSize;\r |
959ccb23 | 582 | } EFI_FV_FILE_INFO;\r |
583 | \r | |
584 | /**\r | |
c7c308ad | 585 | Returns information about a specific file.\r |
586 | \r | |
00edb218 A |
587 | This function returns information about a specific file,\r |
588 | including its file name, type, attributes, starting address and\r | |
589 | size. If the firmware volume is not memory mapped then the\r | |
959ccb23 | 590 | Buffer member will be NULL.\r |
591 | \r | |
592 | @param FileHandle Handle of the file.\r | |
5528573c | 593 | @param FileInfo Upon exit, points to the file's\r |
959ccb23 | 594 | information.\r |
595 | \r | |
00edb218 | 596 | @retval EFI_SUCCESS File information returned.\r |
00edb218 | 597 | @retval EFI_INVALID_PARAMETER If FileHandle does not\r |
959ccb23 | 598 | represent a valid file.\r |
00edb218 | 599 | @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r |
959ccb23 | 600 | \r |
601 | **/\r | |
602 | typedef\r | |
603 | EFI_STATUS\r | |
6de794cd | 604 | (EFIAPI *EFI_PEI_FFS_GET_FILE_INFO)(\r |
c7c308ad | 605 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
1c280088 | 606 | OUT EFI_FV_FILE_INFO *FileInfo\r |
00edb218 | 607 | );\r |
959ccb23 | 608 | \r |
c7c308ad | 609 | ///\r |
610 | /// Information of FV volume.\r | |
611 | ///\r | |
959ccb23 | 612 | typedef struct {\r |
c7c308ad | 613 | ///\r |
614 | /// Attributes of the firmware volume.\r | |
615 | ///\r | |
4ba967e7 | 616 | EFI_FVB_ATTRIBUTES_2 FvAttributes;\r |
c7c308ad | 617 | ///\r |
618 | /// Format of the firmware volume.\r | |
619 | ///\r | |
4ba967e7 | 620 | EFI_GUID FvFormat;\r |
c7c308ad | 621 | ///\r |
622 | /// Name of the firmware volume.\r | |
623 | ///\r | |
4ba967e7 | 624 | EFI_GUID FvName;\r |
c7c308ad | 625 | ///\r |
626 | /// Points to the first byte of the firmware\r | |
627 | /// volume, if bit EFI_FVB_MEMORY_MAPPED is\r | |
628 | /// set in FvAttributes.\r | |
629 | ///\r | |
4ba967e7 | 630 | VOID *FvStart;\r |
c7c308ad | 631 | ///\r |
632 | /// Size of the firmware volume.\r | |
633 | ///\r | |
4ba967e7 | 634 | UINT64 FvSize;\r |
959ccb23 | 635 | } EFI_FV_INFO;\r |
636 | \r | |
637 | /**\r | |
4b503a77 | 638 | Returns information about the specified volume.\r |
c7c308ad | 639 | \r |
00edb218 A |
640 | This function returns information about a specific firmware\r |
641 | volume, including its name, type, attributes, starting address\r | |
959ccb23 | 642 | and size.\r |
643 | \r | |
644 | @param VolumeHandle Handle of the volume.\r | |
645 | \r | |
5528573c | 646 | @param VolumeInfo Upon exit, points to the volume's\r |
959ccb23 | 647 | information.\r |
648 | \r | |
00edb218 | 649 | @retval EFI_SUCCESS File information returned.\r |
00edb218 | 650 | @retval EFI_INVALID_PARAMETER If FileHandle does not\r |
959ccb23 | 651 | represent a valid file.\r |
00edb218 | 652 | @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r |
959ccb23 | 653 | \r |
654 | **/\r | |
655 | typedef\r | |
656 | EFI_STATUS\r | |
6de794cd | 657 | (EFIAPI *EFI_PEI_FFS_GET_VOLUME_INFO)(\r |
1c280088 | 658 | IN EFI_PEI_FV_HANDLE VolumeHandle,\r |
659 | OUT EFI_FV_INFO *VolumeInfo\r | |
00edb218 | 660 | );\r |
959ccb23 | 661 | \r |
662 | /**\r | |
4b503a77 | 663 | Register a PEIM so that it will be shadowed and called again.\r |
c7c308ad | 664 | \r |
00edb218 A |
665 | This service registers a file handle so that after memory is\r |
666 | available, the PEIM will be re-loaded into permanent memory and\r | |
667 | re-initialized. The PEIM registered this way will always be\r | |
668 | initialized twice. The first time, this function call will\r | |
669 | return EFI_SUCCESS. The second time, this function call will\r | |
670 | return EFI_ALREADY_STARTED. Depending on the order in which\r | |
671 | PEIMs are dispatched, the PEIM making this call may be\r | |
672 | initialized after permanent memory is installed, even the first\r | |
959ccb23 | 673 | time.\r |
674 | \r | |
c7c308ad | 675 | @param FileHandle PEIM's file handle. Must be the currently\r |
4b503a77 | 676 | executing PEIM.\r |
959ccb23 | 677 | \r |
4ba967e7 | 678 | @retval EFI_SUCCESS The PEIM was successfully registered for\r |
679 | shadowing.\r | |
00edb218 | 680 | @retval EFI_ALREADY_STARTED The PEIM was previously\r |
959ccb23 | 681 | registered for shadowing.\r |
4ba967e7 | 682 | @retval EFI_NOT_FOUND The FileHandle does not refer to a\r |
683 | valid file handle.\r | |
959ccb23 | 684 | \r |
685 | **/\r | |
686 | typedef\r | |
687 | EFI_STATUS\r | |
6de794cd | 688 | (EFIAPI *EFI_PEI_REGISTER_FOR_SHADOW)(\r |
1c280088 | 689 | IN EFI_PEI_FILE_HANDLE FileHandle\r |
00edb218 | 690 | );\r |
959ccb23 | 691 | \r |
692 | \r | |
693 | //\r | |
694 | // PEI Specification Revision information\r | |
695 | //\r | |
696 | #define PEI_SPECIFICATION_MAJOR_REVISION 1\r | |
697 | #define PEI_SPECIFICATION_MINOR_REVISION 0\r | |
698 | \r | |
699 | //\r | |
700 | // PEI Services Table\r | |
701 | //\r | |
f490a61d | 702 | #define PEI_SERVICES_SIGNATURE 0x5652455320494550ULL\r |
ef4fa1a4 | 703 | #define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION))\r |
959ccb23 | 704 | \r |
6de794cd | 705 | /// \r |
706 | /// EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI\r | |
707 | /// Foundation. These services fall into various classes, including the following:\r | |
708 | /// - Managing the boot mode\r | |
709 | /// - Allocating both early and permanent memory\r | |
710 | /// - Supporting the Firmware File System (FFS)\r | |
711 | /// - Abstracting the PPI database abstraction\r | |
712 | /// - Creating Hand-Off Blocks (HOBs)\r | |
713 | ///\r | |
146332ae | 714 | struct _EFI_PEI_SERVICES {\r |
c7c308ad | 715 | ///\r |
716 | /// The table header for the PEI Services Table.\r | |
717 | ///\r | |
44717a39 | 718 | EFI_TABLE_HEADER Hdr;\r |
719 | \r | |
720 | //\r | |
721 | // PPI Functions\r | |
722 | //\r | |
723 | EFI_PEI_INSTALL_PPI InstallPpi;\r | |
724 | EFI_PEI_REINSTALL_PPI ReInstallPpi;\r | |
725 | EFI_PEI_LOCATE_PPI LocatePpi;\r | |
726 | EFI_PEI_NOTIFY_PPI NotifyPpi;\r | |
727 | \r | |
728 | //\r | |
729 | // Boot Mode Functions\r | |
730 | //\r | |
731 | EFI_PEI_GET_BOOT_MODE GetBootMode;\r | |
732 | EFI_PEI_SET_BOOT_MODE SetBootMode;\r | |
733 | \r | |
734 | //\r | |
735 | // HOB Functions\r | |
736 | //\r | |
737 | EFI_PEI_GET_HOB_LIST GetHobList;\r | |
738 | EFI_PEI_CREATE_HOB CreateHob;\r | |
739 | \r | |
740 | //\r | |
741 | // Firmware Volume Functions\r | |
742 | //\r | |
00edb218 A |
743 | EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume;\r |
744 | EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile;\r | |
745 | EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData;\r | |
44717a39 | 746 | \r |
747 | //\r | |
748 | // PEI Memory Functions\r | |
749 | //\r | |
750 | EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r | |
751 | EFI_PEI_ALLOCATE_PAGES AllocatePages;\r | |
752 | EFI_PEI_ALLOCATE_POOL AllocatePool;\r | |
753 | EFI_PEI_COPY_MEM CopyMem;\r | |
754 | EFI_PEI_SET_MEM SetMem;\r | |
755 | \r | |
756 | //\r | |
757 | // Status Code\r | |
758 | //\r | |
759 | EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;\r | |
760 | \r | |
761 | //\r | |
762 | // Reset\r | |
763 | //\r | |
764 | EFI_PEI_RESET_SYSTEM ResetSystem;\r | |
765 | \r | |
766 | //\r | |
767 | // (the following interfaces are installed by publishing PEIM)\r | |
768 | // I/O Abstractions\r | |
769 | //\r | |
770 | EFI_PEI_CPU_IO_PPI *CpuIo;\r | |
771 | EFI_PEI_PCI_CFG2_PPI *PciCfg;\r | |
772 | \r | |
773 | //\r | |
774 | // Future Installed Services\r | |
775 | //\r | |
776 | EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;\r | |
777 | EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;\r | |
778 | EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;\r | |
779 | EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;\r | |
00edb218 | 780 | };\r |
959ccb23 | 781 | \r |
782 | \r | |
6de794cd | 783 | ///\r |
784 | /// EFI_SEC_PEI_HAND_OFF structure hold information about\r | |
785 | /// PEI core's operating environment, such as the size of location of\r | |
786 | /// temporary RAM, the stack location and BFV location.\r | |
787 | /// \r | |
959ccb23 | 788 | typedef struct _EFI_SEC_PEI_HAND_OFF {\r |
c7c308ad | 789 | ///\r |
790 | /// Size of the data structure.\r | |
791 | /// \r | |
959ccb23 | 792 | UINT16 DataSize;\r |
793 | \r | |
c7c308ad | 794 | ///\r |
795 | /// Points to the first byte of the boot firmware volume, \r | |
796 | /// which the PEI Dispatcher should search for \r | |
797 | /// PEI modules.\r | |
798 | /// \r | |
959ccb23 | 799 | VOID *BootFirmwareVolumeBase;\r |
800 | \r | |
c7c308ad | 801 | ///\r |
802 | /// Size of the boot firmware volume, in bytes.\r | |
803 | /// \r | |
959ccb23 | 804 | UINTN BootFirmwareVolumeSize;\r |
805 | \r | |
c7c308ad | 806 | ///\r |
807 | /// Points to the first byte of the temporary RAM.\r | |
808 | /// \r | |
959ccb23 | 809 | VOID *TemporaryRamBase;\r |
810 | \r | |
c7c308ad | 811 | ///\r |
812 | /// Size of the temporary RAM, in bytes.\r | |
813 | /// \r | |
959ccb23 | 814 | UINTN TemporaryRamSize;\r |
815 | \r | |
c7c308ad | 816 | ///\r |
817 | /// Points to the first byte of the temporary RAM \r | |
818 | /// available for use by the PEI Foundation. The area \r | |
819 | /// described by PeiTemporaryRamBase and PeiTemporaryRamSize \r | |
820 | /// must not extend outside beyond the area described by\r | |
821 | /// TemporaryRamBase & TemporaryRamSize. This area should not\r | |
822 | /// overlap with the area reported by StackBase and \r | |
823 | /// StackSize.\r | |
824 | ///\r | |
959ccb23 | 825 | VOID *PeiTemporaryRamBase;\r |
826 | \r | |
c7c308ad | 827 | ///\r |
828 | /// Size of the available temporary RAM available for \r | |
829 | /// use by the PEI Foundation, in bytes.\r | |
830 | /// \r | |
959ccb23 | 831 | UINTN PeiTemporaryRamSize;\r |
832 | \r | |
c7c308ad | 833 | ///\r |
834 | /// Points to the first byte of the stack. \r | |
835 | /// This are may be part of the memory described by \r | |
836 | /// TemporaryRamBase and TemporaryRamSize \r | |
837 | /// or may be an entirely separate area.\r | |
838 | /// \r | |
959ccb23 | 839 | VOID *StackBase;\r |
840 | \r | |
c7c308ad | 841 | ///\r |
842 | /// Size of the stack, in bytes.\r | |
843 | /// \r | |
959ccb23 | 844 | UINTN StackSize;\r |
845 | } EFI_SEC_PEI_HAND_OFF;\r | |
846 | \r | |
fb3df220 | 847 | \r |
848 | /**\r | |
4b503a77 | 849 | Entry point of PEI Foundation.\r |
fb3df220 | 850 | \r |
851 | This function is the entry point for the PEI Foundation, which\r | |
852 | allows the SEC phase to pass information about the stack,\r | |
853 | temporary RAM and the Boot Firmware Volume. In addition, it also\r | |
854 | allows the SEC phase to pass services and data forward for use\r | |
855 | during the PEI phase in the form of one or more PPIs. There is\r | |
856 | no limit to the number of additional PPIs that can be passed\r | |
857 | from SEC into the PEI Foundation. As part of its initialization\r | |
858 | phase, the PEI Foundation will add these SEC-hosted PPIs to its\r | |
859 | PPI database such that both the PEI Foundation and any modules\r | |
860 | can leverage the associated service calls and/or code in these\r | |
861 | early PPIs.\r | |
862 | \r | |
863 | @param SecCoreData Points to a data structure containing\r | |
864 | information about the PEI core's\r | |
865 | operating environment, such as the size\r | |
866 | and location of temporary RAM, the stack\r | |
4b503a77 | 867 | location and the BFV location.\r |
fb3df220 | 868 | \r |
869 | @param PpiList Points to a list of one or more PPI\r | |
870 | descriptors to be installed initially by\r | |
871 | the PEI core. An empty PPI list consists\r | |
872 | of a single descriptor with the end-tag\r | |
873 | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r | |
874 | As part of its initialization phase, the\r | |
875 | PEI Foundation will add these SEC-hosted\r | |
876 | PPIs to its PPI database such that both\r | |
877 | the PEI Foundation and any modules can\r | |
878 | leverage the associated service calls\r | |
879 | and/or code in these early PPIs.\r | |
880 | \r | |
881 | \r | |
882 | **/\r | |
883 | typedef\r | |
884 | VOID\r | |
e5544398 | 885 | (EFIAPI *EFI_PEI_CORE_ENTRY_POINT)(\r |
fb3df220 | 886 | IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r |
887 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
888 | );\r | |
889 | \r | |
959ccb23 | 890 | #endif\r |