]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | \r |
2 | /** @file\r | |
3 | PI PEI master include file. This file should match the PI spec.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2007, Intel Corporation \r | |
6 | All rights reserved. This program and the accompanying materials \r | |
7 | are licensed and made available under the terms and conditions of the BSD License \r | |
8 | which accompanies this distribution. The full text of the license may be found at \r | |
9 | http://opensource.org/licenses/bsd-license.php \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
13 | \r | |
14 | Module Name: PiPeiCis.h\r | |
15 | \r | |
16 | @par Revision Reference:\r | |
17 | Version 1.0.\r | |
18 | \r | |
19 | **/\r | |
20 | \r | |
21 | #ifndef __PI_PEICIS_H__\r | |
22 | #define __PI_PEICIS_H__\r | |
23 | \r | |
24 | #include <Pi/PiMultiPhase.h>\r | |
25 | \r | |
26 | #define EFI_NOT_AVAILABLE_YET EFIERR (28)\r | |
27 | \r | |
28 | //\r | |
29 | // Handles of EFI FV/FFS.\r | |
30 | // \r | |
00edb218 A |
31 | typedef VOID *EFI_PEI_FV_HANDLE;\r |
32 | typedef VOID *EFI_PEI_FILE_HANDLE;\r | |
959ccb23 | 33 | \r |
34 | //\r | |
35 | // Declare forward referenced data structures\r | |
36 | //\r | |
37 | typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES;\r | |
38 | typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;\r | |
39 | \r | |
40 | \r | |
41 | #include <Ppi/CpuIo.h>\r | |
42 | #include <Ppi/PciCfg2.h>\r | |
43 | \r | |
fb3df220 | 44 | \r |
959ccb23 | 45 | /**\r |
46 | The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI \r | |
47 | Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header. \r | |
48 | \r | |
49 | @param FfsHeader Pointer to the FFS file header.\r | |
50 | @param PeiServices Describes the list of possible PEI Services.\r | |
51 | \r | |
52 | @return Status code\r | |
53 | \r | |
54 | **/\r | |
55 | typedef\r | |
56 | EFI_STATUS\r | |
57 | (EFIAPI *EFI_PEIM_ENTRY_POINT)(\r | |
00edb218 | 58 | IN EFI_PEI_FILE_HANDLE *FfsHeader,\r |
959ccb23 | 59 | IN EFI_PEI_SERVICES **PeiServices\r |
60 | );\r | |
61 | \r | |
62 | /**\r | |
63 | Entry point of the notification callback function itself within the PEIM.\r | |
64 | \r | |
65 | @param PeiServices Indirect reference to the PEI Services Table.\r | |
66 | @param NotifyDescriptor Address of the notification descriptor data structure.\r | |
67 | @param Ppi Address of the PPI that was installed.\r | |
68 | \r | |
69 | @return Status code\r | |
70 | \r | |
71 | **/\r | |
72 | typedef\r | |
73 | EFI_STATUS\r | |
74 | (EFIAPI *EFI_PEIM_NOTIFY_ENTRY_POINT) (\r | |
75 | IN EFI_PEI_SERVICES **PeiServices,\r | |
76 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r | |
77 | IN VOID *Ppi\r | |
78 | );\r | |
79 | \r | |
80 | //\r | |
81 | // PEI Ppi Services List Descriptors\r | |
82 | //\r | |
83 | #define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001\r | |
84 | #define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010\r | |
85 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020\r | |
86 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040\r | |
87 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060\r | |
88 | #define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000\r | |
89 | \r | |
90 | typedef struct {\r | |
91 | UINTN Flags;\r | |
92 | EFI_GUID *Guid;\r | |
93 | VOID *Ppi;\r | |
94 | } EFI_PEI_PPI_DESCRIPTOR;\r | |
95 | \r | |
96 | struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r | |
97 | UINTN Flags;\r | |
98 | EFI_GUID *Guid;\r | |
99 | EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r | |
100 | };\r | |
101 | \r | |
102 | //\r | |
103 | // Describes request of the module to be loaded to \r | |
104 | // the permanent memory once it is available. Unlike most of the other HOBs, \r | |
105 | // this HOB is produced and consumed during the HOB producer phase.\r | |
106 | // \r | |
107 | typedef struct _EFI_HOB_LOAD_PEIM {\r | |
00edb218 A |
108 | EFI_HOB_GENERIC_HEADER Header;\r |
109 | EFI_PEI_FILE_HANDLE FileHandle;\r | |
110 | EFI_PEIM_ENTRY_POINT EntryPoint;\r | |
111 | EFI_PEIM_ENTRY_POINT InMemEntryPoint;\r | |
959ccb23 | 112 | } EFI_HOB_LOAD_PEIM;\r |
113 | \r | |
114 | \r | |
115 | /**\r | |
116 | This service is the first one provided by the PEI Foundation. This function \r | |
117 | installs an interface in the PEI PPI database by GUID. The purpose of the \r | |
118 | service is to publish an interface that other parties can use to call \r | |
119 | additional PEIMs.\r | |
120 | \r | |
121 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r | |
122 | published by the PEI Foundation.\r | |
123 | @param PpiList A pointer to the list of interfaces that the caller shall install.\r | |
124 | \r | |
125 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
126 | @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 | |
127 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
128 | \r | |
129 | **/\r | |
130 | typedef\r | |
131 | EFI_STATUS\r | |
132 | (EFIAPI *EFI_PEI_INSTALL_PPI) (\r | |
133 | IN EFI_PEI_SERVICES **PeiServices,\r | |
134 | IN EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
135 | );\r | |
136 | \r | |
137 | /**\r | |
138 | This function reinstalls an interface in the PEI PPI database by GUID. \r | |
139 | The purpose of the service is to publish an interface that other parties \r | |
140 | can use to replace a same-named interface in the protocol database \r | |
141 | with a different interface. \r | |
142 | \r | |
143 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r | |
144 | published by the PEI Foundation.\r | |
145 | @param OldPpi A pointer to the former PPI in the database.\r | |
146 | @param NewPpi A pointer to the new interfaces that the caller shall install.\r | |
147 | \r | |
148 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
149 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the \r | |
150 | list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
151 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
152 | @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.\r | |
153 | \r | |
154 | **/\r | |
155 | typedef\r | |
156 | EFI_STATUS\r | |
157 | (EFIAPI *EFI_PEI_REINSTALL_PPI) (\r | |
158 | IN EFI_PEI_SERVICES **PeiServices,\r | |
159 | IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r | |
160 | IN EFI_PEI_PPI_DESCRIPTOR *NewPpi\r | |
161 | );\r | |
162 | \r | |
163 | /**\r | |
164 | This function locates an interface in the PEI PPI database by GUID. \r | |
165 | \r | |
166 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.\r | |
167 | @param Guid A pointer to the GUID whose corresponding interface needs to be found.\r | |
168 | @param Instance The N-th instance of the interface that is required.\r | |
169 | @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.\r | |
170 | @param Ppi A pointer to the instance of the interface.\r | |
171 | \r | |
172 | @retval EFI_SUCCESS The interface was successfully returned.\r | |
173 | @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.\r | |
174 | \r | |
175 | **/\r | |
176 | typedef\r | |
177 | EFI_STATUS\r | |
178 | (EFIAPI *EFI_PEI_LOCATE_PPI) (\r | |
179 | IN EFI_PEI_SERVICES **PeiServices,\r | |
180 | IN EFI_GUID *Guid,\r | |
181 | IN UINTN Instance,\r | |
182 | IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r | |
183 | IN OUT VOID **Ppi\r | |
184 | );\r | |
185 | \r | |
186 | /**\r | |
187 | This function installs a notification service to be called back when a \r | |
188 | given interface is installed or reinstalled. The purpose of the service \r | |
189 | is to publish an interface that other parties can use to call additional PPIs \r | |
190 | that may materialize later.\r | |
191 | \r | |
192 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
193 | @param NotifyList A pointer to the list of notification interfaces that the caller shall install.\r | |
194 | \r | |
195 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
196 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the \r | |
197 | list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
198 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
199 | \r | |
200 | **/\r | |
201 | typedef\r | |
202 | EFI_STATUS\r | |
203 | (EFIAPI *EFI_PEI_NOTIFY_PPI) (\r | |
204 | IN EFI_PEI_SERVICES **PeiServices,\r | |
205 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r | |
206 | );\r | |
207 | \r | |
208 | /**\r | |
209 | This function returns the present value of the boot mode.\r | |
210 | \r | |
211 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
212 | @param BootMode A pointer to contain the value of the boot mode.\r | |
213 | \r | |
214 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
215 | \r | |
216 | **/\r | |
217 | typedef\r | |
218 | EFI_STATUS\r | |
219 | (EFIAPI *EFI_PEI_GET_BOOT_MODE) (\r | |
220 | IN EFI_PEI_SERVICES **PeiServices,\r | |
221 | OUT EFI_BOOT_MODE *BootMode\r | |
222 | );\r | |
223 | \r | |
224 | /**\r | |
225 | This function sets the value of the boot mode.\r | |
226 | \r | |
227 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
228 | @param BootMode The value of the boot mode to set.\r | |
229 | \r | |
230 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
231 | \r | |
232 | **/\r | |
233 | typedef\r | |
234 | EFI_STATUS\r | |
235 | (EFIAPI *EFI_PEI_SET_BOOT_MODE) (\r | |
236 | IN EFI_PEI_SERVICES **PeiServices,\r | |
237 | IN EFI_BOOT_MODE BootMode\r | |
238 | );\r | |
239 | \r | |
240 | /**\r | |
241 | This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory. \r | |
242 | \r | |
243 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
244 | @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize\r | |
245 | \r | |
246 | @retval EFI_SUCCESS The list was successfully returned.\r | |
247 | @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.\r | |
248 | \r | |
249 | **/\r | |
250 | typedef\r | |
251 | EFI_STATUS\r | |
252 | (EFIAPI *EFI_PEI_GET_HOB_LIST) (\r | |
253 | IN EFI_PEI_SERVICES **PeiServices,\r | |
254 | IN OUT VOID **HobList\r | |
255 | );\r | |
256 | \r | |
257 | /**\r | |
258 | This service published by the PEI Foundation abstracts the creation of a Hand-Off Block's (HOB's) headers.\r | |
259 | \r | |
260 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
261 | @param Type The type of HOB to be installed.\r | |
262 | @param Length The length of the HOB to be added.\r | |
263 | @param Hob The address of a pointer that will contain the HOB header.\r | |
264 | \r | |
265 | @retval EFI_SUCCESS The HOB was successfully created.\r | |
266 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
267 | \r | |
268 | **/\r | |
269 | typedef\r | |
270 | EFI_STATUS\r | |
271 | (EFIAPI *EFI_PEI_CREATE_HOB) (\r | |
272 | IN EFI_PEI_SERVICES **PeiServices,\r | |
273 | IN UINT16 Type,\r | |
274 | IN UINT16 Length,\r | |
275 | IN OUT VOID **Hob\r | |
276 | );\r | |
277 | \r | |
278 | /**\r | |
279 | The purpose of the service is to abstract the capability of the PEI \r | |
280 | Foundation to discover instances of firmware volumes in the system. \r | |
281 | Given the input file pointer, this service searches for the next \r | |
282 | matching file in the Firmware File System (FFS) volume.\r | |
283 | \r | |
284 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
285 | @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).\r | |
286 | @param FwVolHeader Pointer to the firmware volume header of the volume to return.\r | |
287 | \r | |
288 | @retval EFI_SUCCESS The volume was found.\r | |
289 | @retval EFI_NOT_FOUND The volume was not found.\r | |
290 | @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r | |
291 | \r | |
292 | **/\r | |
293 | typedef\r | |
294 | EFI_STATUS\r | |
295 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME2) (\r | |
296 | IN EFI_PEI_SERVICES **PeiServices,\r | |
297 | IN UINTN Instance,\r | |
298 | IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r | |
299 | );\r | |
300 | \r | |
301 | /**\r | |
302 | The purpose of the service is to abstract the capability of the PEI \r | |
303 | Foundation to discover instances of firmware files in the system. \r | |
304 | Given the input file pointer, this service searches for the next matching \r | |
305 | file in the Firmware File System (FFS) volume.\r | |
306 | \r | |
307 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
308 | @param SearchType A filter to find files only of this type.\r | |
309 | @param FwVolHeader Pointer to the firmware volume header of the volume to search.This parameter \r | |
310 | must point to a valid FFS volume.\r | |
311 | @param FileHeader Pointer to the current file from which to begin searching.This pointer will be \r | |
312 | updated upon return to reflect the file found.\r | |
313 | \r | |
314 | @retval EFI_SUCCESS The file was found.\r | |
315 | @retval EFI_NOT_FOUND The file was not found.\r | |
316 | @retval EFI_NOT_FOUND The header checksum was not zero.\r | |
317 | \r | |
318 | **/\r | |
319 | typedef\r | |
320 | EFI_STATUS\r | |
321 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE2) (\r | |
322 | IN EFI_PEI_SERVICES **PeiServices,\r | |
323 | IN EFI_FV_FILETYPE SearchType,\r | |
324 | IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r | |
325 | IN OUT EFI_FFS_FILE_HEADER **FileHeader\r | |
326 | );\r | |
327 | \r | |
328 | /**\r | |
329 | Given the input file pointer, this service searches for the next \r | |
330 | matching file in the Firmware File System (FFS) volume. \r | |
331 | \r | |
332 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
333 | @param SectionType The value of the section type to find.\r | |
334 | @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.\r | |
335 | @param SectionData A pointer to the discovered section, if successful.\r | |
336 | \r | |
337 | @retval EFI_SUCCESS The section was found.\r | |
338 | @retval EFI_NOT_FOUND The section was not found.\r | |
339 | \r | |
340 | **/\r | |
341 | typedef\r | |
342 | EFI_STATUS\r | |
343 | (EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA2) (\r | |
344 | IN EFI_PEI_SERVICES **PeiServices,\r | |
345 | IN EFI_SECTION_TYPE SectionType,\r | |
346 | IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r | |
347 | IN OUT VOID **SectionData\r | |
348 | );\r | |
349 | \r | |
350 | /**\r | |
351 | This function registers the found memory configuration with the PEI Foundation.\r | |
352 | \r | |
353 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
354 | @param MemoryBegin The value of a region of installed memory\r | |
355 | @param MemoryLength The corresponding length of a region of installed memory.\r | |
356 | \r | |
357 | @retval EFI_SUCCESS The region was successfully installed in a HOB.\r | |
358 | @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.\r | |
359 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
360 | \r | |
361 | **/\r | |
362 | typedef\r | |
363 | EFI_STATUS\r | |
364 | (EFIAPI *EFI_PEI_INSTALL_PEI_MEMORY) (\r | |
365 | IN EFI_PEI_SERVICES **PeiServices,\r | |
366 | IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r | |
367 | IN UINT64 MemoryLength\r | |
368 | );\r | |
369 | \r | |
370 | /**\r | |
371 | The purpose of the service is to publish an interface that allows \r | |
372 | PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r | |
373 | \r | |
374 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
375 | @param MemoryType The type of memory to allocate.\r | |
376 | @param Pages The number of contiguous 4 KB pages to allocate.\r | |
377 | @param Memory Pointer to a physical address. On output, the address is set to the base \r | |
378 | of the page range that was allocated.\r | |
379 | \r | |
380 | @retval EFI_SUCCESS The memory range was successfully allocated.\r | |
381 | @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r | |
382 | @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.\r | |
383 | \r | |
384 | **/\r | |
385 | typedef\r | |
386 | EFI_STATUS\r | |
387 | (EFIAPI *EFI_PEI_ALLOCATE_PAGES) (\r | |
388 | IN EFI_PEI_SERVICES **PeiServices,\r | |
389 | IN EFI_MEMORY_TYPE MemoryType,\r | |
390 | IN UINTN Pages,\r | |
391 | IN OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
392 | );\r | |
393 | \r | |
394 | /**\r | |
395 | The purpose of this service is to publish an interface that \r | |
396 | allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r | |
397 | \r | |
398 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
399 | @param Size The number of bytes to allocate from the pool.\r | |
400 | @param Buffer If the call succeeds, a pointer to a pointer to the allocated buffer; undefined otherwise.\r | |
401 | \r | |
402 | @retval EFI_SUCCESS The allocation was successful.\r | |
403 | @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.\r | |
404 | \r | |
405 | **/\r | |
406 | typedef\r | |
407 | EFI_STATUS\r | |
408 | (EFIAPI *EFI_PEI_ALLOCATE_POOL) (\r | |
409 | IN EFI_PEI_SERVICES **PeiServices,\r | |
410 | IN UINTN Size,\r | |
411 | OUT VOID **Buffer\r | |
412 | );\r | |
413 | \r | |
414 | /**\r | |
415 | This service copies the contents of one buffer to another buffer.\r | |
416 | \r | |
417 | @param Destination Pointer to the destination buffer of the memory copy.\r | |
418 | @param Source Pointer to the source buffer of the memory copy\r | |
419 | @param Length Number of bytes to copy from Source to Destination.\r | |
420 | \r | |
421 | @return None\r | |
422 | \r | |
423 | **/\r | |
424 | typedef\r | |
425 | VOID\r | |
426 | (EFIAPI *EFI_PEI_COPY_MEM) (\r | |
427 | IN VOID *Destination,\r | |
428 | IN VOID *Source,\r | |
429 | IN UINTN Length\r | |
430 | );\r | |
431 | \r | |
432 | /**\r | |
433 | The service fills a buffer with a specified value.\r | |
434 | \r | |
435 | @param Buffer Pointer to the buffer to fill.\r | |
436 | @param Size Number of bytes in Buffer to fill.\r | |
437 | @param Value Value to fill Buffer with\r | |
438 | \r | |
439 | @return None\r | |
440 | \r | |
441 | **/\r | |
442 | typedef\r | |
443 | VOID\r | |
444 | (EFIAPI *EFI_PEI_SET_MEM) (\r | |
445 | IN VOID *Buffer,\r | |
446 | IN UINTN Size,\r | |
447 | IN UINT8 Value\r | |
448 | );\r | |
449 | \r | |
450 | /**\r | |
451 | This service publishes an interface that allows PEIMs to report status codes.\r | |
452 | \r | |
453 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r | |
454 | @param Type Indicates the type of status code being reported.\r | |
455 | @param Value Describes the current status of a hardware or\r | |
456 | software entity. This includes information about the class and\r | |
457 | subclass that is used to classify the entity as well as an operation.\r | |
458 | For progress codes, the operation is the current activity.\r | |
459 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
460 | @param Instance The enumeration of a hardware or software entity within\r | |
461 | the system. A system may contain multiple entities that match a class/subclass\r | |
462 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
463 | that instance information is unavailable, not meaningful, or not relevant.\r | |
464 | Valid instance numbers start with 1.\r | |
465 | @param CallerId This optional parameter may be used to identify the caller.\r | |
466 | This parameter allows the status code driver to apply different rules to\r | |
467 | different callers.\r | |
468 | @param Data This optional parameter may be used to pass additional data.\r | |
469 | \r | |
470 | @retval EFI_SUCCESS The function completed successfully.\r | |
471 | @retval EFI_NOT_AVAILABLE_YET No progress code provider has installed an interface in the system.\r | |
472 | \r | |
473 | **/\r | |
474 | typedef\r | |
475 | EFI_STATUS\r | |
476 | (EFIAPI *EFI_PEI_REPORT_STATUS_CODE) (\r | |
477 | IN EFI_PEI_SERVICES **PeiServices,\r | |
478 | IN EFI_STATUS_CODE_TYPE Type,\r | |
479 | IN EFI_STATUS_CODE_VALUE Value,\r | |
480 | IN UINT32 Instance,\r | |
481 | IN EFI_GUID *CallerId OPTIONAL,\r | |
482 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
483 | );\r | |
484 | \r | |
485 | /**\r | |
486 | Resets the entire platform.\r | |
487 | \r | |
488 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES\r | |
489 | table published by the PEI Foundation.\r | |
490 | \r | |
491 | @retval EFI_SUCCESS The function completed successfully.\r | |
492 | @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.\r | |
493 | \r | |
494 | **/\r | |
495 | typedef\r | |
496 | EFI_STATUS\r | |
497 | (EFIAPI *EFI_PEI_RESET_SYSTEM) (\r | |
498 | IN EFI_PEI_SERVICES **PeiServices\r | |
499 | );\r | |
500 | \r | |
501 | /**\r | |
502 | \r | |
00edb218 A |
503 | This service searches for files with a specific name, within\r |
504 | either the specified firmware volume or all firmware volumes.\r | |
505 | The service returns a file handle of type EFI_PEI_FILE_HANDLE,\r | |
959ccb23 | 506 | which must be unique within the system.\r |
507 | \r | |
00edb218 A |
508 | @param FileName A pointer to the name of the file to\r |
509 | find within the firmware volume.\r | |
959ccb23 | 510 | \r |
00edb218 | 511 | @param VolumeHandle The firmware volume to search FileHandle\r |
959ccb23 | 512 | Upon exit, points to the found file's\r |
513 | handle or NULL if it could not be found.\r | |
514 | \r | |
00edb218 | 515 | @retval EFI_SUCCESS File was found.\r |
959ccb23 | 516 | \r |
00edb218 | 517 | @retval EFI_NOT_FOUND File was not found.\r |
959ccb23 | 518 | \r |
00edb218 A |
519 | @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or\r |
520 | FileName was NULL.\r | |
959ccb23 | 521 | \r |
522 | \r | |
523 | **/\r | |
524 | typedef\r | |
525 | EFI_STATUS\r | |
526 | (EFIAPI *EFI_PEI_FFS_FIND_BY_NAME) (\r | |
00edb218 A |
527 | IN CONST EFI_GUID *FileName,\r |
528 | IN CONST EFI_PEI_FV_HANDLE VolumeHandle,\r | |
529 | OUT EFI_PEI_FILE_HANDLE *FileHandle\r | |
530 | );\r | |
959ccb23 | 531 | \r |
532 | \r | |
533 | /**\r | |
534 | \r | |
00edb218 | 535 | @param FileName Name of the file.\r |
959ccb23 | 536 | \r |
00edb218 | 537 | @param FileType File type. See EFI_FV_FILETYPE, which is\r |
959ccb23 | 538 | defined in the Platform Initialization\r |
539 | Firmware Storage Specification.\r | |
540 | \r | |
00edb218 | 541 | @param FileAttributes Attributes of the file. Type\r |
959ccb23 | 542 | EFI_FV_FILE_ATTRIBUTES is defined in\r |
543 | the Platform Initialization Firmware\r | |
544 | Storage Specification.\r | |
545 | \r | |
00edb218 | 546 | @param Buffer Points to the file's data (not the header).\r |
959ccb23 | 547 | Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED\r |
548 | is zero.\r | |
549 | \r | |
00edb218 | 550 | @param BufferSize Size of the file's data.\r |
959ccb23 | 551 | \r |
552 | **/\r | |
553 | typedef struct {\r | |
00edb218 A |
554 | EFI_GUID FileName;\r |
555 | EFI_FV_FILETYPE FileType;\r | |
556 | EFI_FV_FILE_ATTRIBUTES FileAttributes;\r | |
557 | VOID *Buffer;\r | |
558 | UINT32 BufferSize;\r | |
959ccb23 | 559 | } EFI_FV_FILE_INFO;\r |
560 | \r | |
561 | /**\r | |
562 | \r | |
00edb218 A |
563 | This function returns information about a specific file,\r |
564 | including its file name, type, attributes, starting address and\r | |
565 | size. If the firmware volume is not memory mapped then the\r | |
959ccb23 | 566 | Buffer member will be NULL.\r |
567 | \r | |
568 | @param FileHandle Handle of the file.\r | |
569 | \r | |
570 |