]>
Commit | Line | Data |
---|---|---|
fb3df220 | 1 | /** @file\r |
50a64e5b | 2 | Provides library functions for all PEI Services.\r |
fb3df220 | 3 | \r |
1abe0959 | 4 | Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
fb3df220 | 6 | \r |
fb3df220 | 7 | **/\r |
8 | \r | |
9 | #ifndef __PEI_SERVICES_LIB_H__\r | |
10 | #define __PEI_SERVICES_LIB_H__\r | |
11 | \r | |
12 | /**\r | |
122e2191 | 13 | This service enables a given PEIM to register an interface into the PEI Foundation.\r |
fb3df220 | 14 | \r |
15 | @param PpiList A pointer to the list of interfaces that the caller shall install.\r | |
16 | \r | |
17 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
18 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL.\r | |
19 | @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have the\r | |
20 | EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
21 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
22 | \r | |
23 | **/\r | |
24 | EFI_STATUS\r | |
25 | EFIAPI\r | |
26 | PeiServicesInstallPpi (\r | |
1c280088 | 27 | IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r |
fb3df220 | 28 | );\r |
29 | \r | |
30 | /**\r | |
31 | This service enables PEIMs to replace an entry in the PPI database with an alternate entry.\r | |
32 | \r | |
33 | @param OldPpi Pointer to the old PEI PPI Descriptors.\r | |
34 | @param NewPpi Pointer to the new PEI PPI Descriptors.\r | |
35 | \r | |
36 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
37 | @retval EFI_INVALID_PARAMETER The OldPpi or NewPpi is NULL.\r | |
38 | @retval EFI_INVALID_PARAMETER Any of the PEI PPI descriptors in the list do not have the\r | |
39 | EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
40 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
41 | @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been\r | |
42 | installed.\r | |
43 | \r | |
44 | **/\r | |
45 | EFI_STATUS\r | |
46 | EFIAPI\r | |
47 | PeiServicesReInstallPpi (\r | |
1c280088 | 48 | IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r |
49 | IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi\r | |
fb3df220 | 50 | );\r |
51 | \r | |
52 | /**\r | |
53 | This service enables PEIMs to discover a given instance of an interface.\r | |
54 | \r | |
55 | @param Guid A pointer to the GUID whose corresponding interface needs to be\r | |
56 | found.\r | |
57 | @param Instance The N-th instance of the interface that is required.\r | |
58 | @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.\r | |
59 | @param Ppi A pointer to the instance of the interface.\r | |
60 | \r | |
61 | @retval EFI_SUCCESS The interface was successfully returned.\r | |
62 | @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.\r | |
63 | \r | |
64 | **/\r | |
65 | EFI_STATUS\r | |
66 | EFIAPI\r | |
67 | PeiServicesLocatePpi (\r | |
1c280088 | 68 | IN CONST EFI_GUID *Guid,\r |
fb3df220 | 69 | IN UINTN Instance,\r |
ced8f52f | 70 | IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, OPTIONAL\r |
fb3df220 | 71 | IN OUT VOID **Ppi\r |
72 | );\r | |
73 | \r | |
74 | /**\r | |
75 | This service enables PEIMs to register a given service to be invoked when another service is\r | |
76 | installed or reinstalled.\r | |
77 | \r | |
78 | @param NotifyList A pointer to the list of notification interfaces that the caller\r | |
79 | shall install.\r | |
80 | \r | |
81 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
82 | @retval EFI_INVALID_PARAMETER The NotifyList pointer is NULL.\r | |
83 | @retval EFI_INVALID_PARAMETER Any of the PEI notify descriptors in the list do not have the\r | |
84 | EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES bit set in the Flags field.\r | |
85 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
86 | \r | |
87 | **/\r | |
88 | EFI_STATUS\r | |
89 | EFIAPI\r | |
90 | PeiServicesNotifyPpi (\r | |
1c280088 | 91 | IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r |
fb3df220 | 92 | );\r |
93 | \r | |
94 | /**\r | |
122e2191 | 95 | This service enables PEIMs to ascertain the present value of the boot mode.\r |
fb3df220 | 96 | \r |
97 | @param BootMode A pointer to contain the value of the boot mode.\r | |
98 | \r | |
99 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
100 | @retval EFI_INVALID_PARAMETER BootMode is NULL.\r | |
101 | \r | |
102 | **/\r | |
103 | EFI_STATUS\r | |
104 | EFIAPI\r | |
105 | PeiServicesGetBootMode (\r | |
c3363c92 | 106 | OUT EFI_BOOT_MODE *BootMode\r |
fb3df220 | 107 | );\r |
108 | \r | |
109 | /**\r | |
122e2191 | 110 | This service enables PEIMs to update the boot mode variable.\r |
fb3df220 | 111 | \r |
112 | @param BootMode The value of the boot mode to set.\r | |
113 | \r | |
114 | @retval EFI_SUCCESS The value was successfully updated\r | |
115 | \r | |
116 | **/\r | |
117 | EFI_STATUS\r | |
118 | EFIAPI\r | |
119 | PeiServicesSetBootMode (\r | |
120 | IN EFI_BOOT_MODE BootMode\r | |
121 | );\r | |
122 | \r | |
123 | /**\r | |
124 | This service enables a PEIM to ascertain the address of the list of HOBs in memory.\r | |
125 | \r | |
126 | @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize.\r | |
127 | \r | |
128 | @retval EFI_SUCCESS The list was successfully returned.\r | |
129 | @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.\r | |
130 | \r | |
131 | **/\r | |
132 | EFI_STATUS\r | |
133 | EFIAPI\r | |
134 | PeiServicesGetHobList (\r | |
67c89a21 | 135 | OUT VOID **HobList\r |
fb3df220 | 136 | );\r |
137 | \r | |
138 | /**\r | |
139 | This service enables PEIMs to create various types of HOBs.\r | |
140 | \r | |
141 | @param Type The type of HOB to be installed.\r | |
142 | @param Length The length of the HOB to be added.\r | |
143 | @param Hob The address of a pointer that will contain the HOB header.\r | |
144 | \r | |
145 | @retval EFI_SUCCESS The HOB was successfully created.\r | |
146 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
147 | \r | |
148 | **/\r | |
149 | EFI_STATUS\r | |
150 | EFIAPI\r | |
151 | PeiServicesCreateHob (\r | |
152 | IN UINT16 Type,\r | |
153 | IN UINT16 Length,\r | |
67c89a21 | 154 | OUT VOID **Hob\r |
fb3df220 | 155 | );\r |
156 | \r | |
157 | /**\r | |
158 | This service enables PEIMs to discover additional firmware volumes.\r | |
159 | \r | |
160 | @param Instance This instance of the firmware volume to find. The value 0 is the\r | |
161 | Boot Firmware Volume (BFV).\r | |
122e2191 | 162 | @param VolumeHandle Handle of the firmware volume header of the volume to return.\r |
fb3df220 | 163 | \r |
164 | @retval EFI_SUCCESS The volume was found.\r | |
165 | @retval EFI_NOT_FOUND The volume was not found.\r | |
166 | @retval EFI_INVALID_PARAMETER FwVolHeader is NULL.\r | |
167 | \r | |
168 | **/\r | |
169 | EFI_STATUS\r | |
170 | EFIAPI\r | |
171 | PeiServicesFfsFindNextVolume (\r | |
172 | IN UINTN Instance,\r | |
1c280088 | 173 | IN OUT EFI_PEI_FV_HANDLE *VolumeHandle\r |
fb3df220 | 174 | );\r |
175 | \r | |
176 | /**\r | |
177 | This service enables PEIMs to discover additional firmware files.\r | |
178 | \r | |
179 | @param SearchType A filter to find files only of this type.\r | |
01aef47b | 180 | @param VolumeHandle Pointer to the firmware volume header of the volume to search.\r |
fb3df220 | 181 | This parameter must point to a valid FFS volume.\r |
122e2191 | 182 | @param FileHandle Handle of the current file from which to begin searching.\r |
fb3df220 | 183 | \r |
184 | @retval EFI_SUCCESS The file was found.\r | |
185 | @retval EFI_NOT_FOUND The file was not found.\r | |
186 | @retval EFI_NOT_FOUND The header checksum was not zero.\r | |
187 | \r | |
188 | **/\r | |
189 | EFI_STATUS\r | |
190 | EFIAPI\r | |
191 | PeiServicesFfsFindNextFile (\r | |
192 | IN EFI_FV_FILETYPE SearchType,\r | |
1c280088 | 193 | IN EFI_PEI_FV_HANDLE VolumeHandle,\r |
194 | IN OUT EFI_PEI_FILE_HANDLE *FileHandle\r | |
fb3df220 | 195 | );\r |
196 | \r | |
197 | /**\r | |
198 | This service enables PEIMs to discover sections of a given type within a valid FFS file.\r | |
199 | \r | |
01aef47b | 200 | @param SectionType The value of the section type to find.\r |
201 | @param FileHandle A pointer to the file header that contains the set of sections to\r | |
fb3df220 | 202 | be searched.\r |
203 | @param SectionData A pointer to the discovered section, if successful.\r | |
204 | \r | |
205 | @retval EFI_SUCCESS The section was found.\r | |
206 | @retval EFI_NOT_FOUND The section was not found.\r | |
207 | \r | |
208 | **/\r | |
209 | EFI_STATUS\r | |
210 | EFIAPI\r | |
211 | PeiServicesFfsFindSectionData (\r | |
212 | IN EFI_SECTION_TYPE SectionType,\r | |
1c280088 | 213 | IN EFI_PEI_FILE_HANDLE FileHandle,\r |
67c89a21 | 214 | OUT VOID **SectionData\r |
fb3df220 | 215 | );\r |
216 | \r | |
c7935105 SZ |
217 | /**\r |
218 | This service enables PEIMs to discover sections of a given instance and type within a valid FFS file.\r | |
219 | \r | |
220 | @param SectionType The value of the section type to find.\r | |
221 | @param SectionInstance Section instance to find.\r | |
9095d37b | 222 | @param FileHandle A pointer to the file header that contains the set\r |
c7935105 SZ |
223 | of sections to be searched.\r |
224 | @param SectionData A pointer to the discovered section, if successful.\r | |
225 | @param AuthenticationStatus A pointer to the authentication status for this section.\r | |
226 | \r | |
227 | @retval EFI_SUCCESS The section was found.\r | |
228 | @retval EFI_NOT_FOUND The section was not found.\r | |
229 | \r | |
230 | **/\r | |
231 | EFI_STATUS\r | |
232 | EFIAPI\r | |
233 | PeiServicesFfsFindSectionData3 (\r | |
234 | IN EFI_SECTION_TYPE SectionType,\r | |
235 | IN UINTN SectionInstance,\r | |
236 | IN EFI_PEI_FILE_HANDLE FileHandle,\r | |
237 | OUT VOID **SectionData,\r | |
238 | OUT UINT32 *AuthenticationStatus\r | |
239 | );\r | |
240 | \r | |
fb3df220 | 241 | /**\r |
242 | This service enables PEIMs to register the permanent memory configuration\r | |
243 | that has been initialized with the PEI Foundation.\r | |
244 | \r | |
245 | @param MemoryBegin The value of a region of installed memory.\r | |
246 | @param MemoryLength The corresponding length of a region of installed memory.\r | |
247 | \r | |
248 | @retval EFI_SUCCESS The region was successfully installed in a HOB.\r | |
249 | @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.\r | |
250 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
251 | \r | |
252 | **/\r | |
253 | EFI_STATUS\r | |
254 | EFIAPI\r | |
255 | PeiServicesInstallPeiMemory (\r | |
256 | IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r | |
257 | IN UINT64 MemoryLength\r | |
258 | );\r | |
259 | \r | |
260 | /**\r | |
3f315ecd | 261 | This service enables PEIMs to allocate memory.\r |
fb3df220 | 262 | \r |
263 | @param MemoryType Type of memory to allocate.\r | |
3f315ecd | 264 | @param Pages The number of pages to allocate.\r |
fb3df220 | 265 | @param Memory Pointer of memory allocated.\r |
266 | \r | |
267 | @retval EFI_SUCCESS The memory range was successfully allocated.\r | |
3f315ecd SZ |
268 | @retval EFI_INVALID_PARAMETER Type is not equal to EfiLoaderCode, EfiLoaderData, EfiRuntimeServicesCode,\r |
269 | EfiRuntimeServicesData, EfiBootServicesCode, EfiBootServicesData,\r | |
270 | EfiACPIReclaimMemory, EfiReservedMemoryType, or EfiACPIMemoryNVS.\r | |
fb3df220 | 271 | @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r |
272 | \r | |
273 | **/\r | |
274 | EFI_STATUS\r | |
275 | EFIAPI\r | |
276 | PeiServicesAllocatePages (\r | |
277 | IN EFI_MEMORY_TYPE MemoryType,\r | |
278 | IN UINTN Pages,\r | |
67c89a21 | 279 | OUT EFI_PHYSICAL_ADDRESS *Memory\r |
fb3df220 | 280 | );\r |
281 | \r | |
3f315ecd SZ |
282 | /**\r |
283 | This service enables PEIMs to free memory.\r | |
284 | \r | |
285 | @param Memory Memory to be freed.\r | |
286 | @param Pages The number of pages to free.\r | |
287 | \r | |
288 | @retval EFI_SUCCESS The requested pages were freed.\r | |
289 | @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.\r | |
290 | @retval EFI_NOT_FOUND The requested memory pages were not allocated with\r | |
291 | AllocatePages().\r | |
292 | \r | |
293 | **/\r | |
294 | EFI_STATUS\r | |
295 | EFIAPI\r | |
296 | PeiServicesFreePages (\r | |
297 | IN EFI_PHYSICAL_ADDRESS Memory,\r | |
298 | IN UINTN Pages\r | |
299 | );\r | |
300 | \r | |
fb3df220 | 301 | /**\r |
302 | This service allocates memory from the Hand-Off Block (HOB) heap.\r | |
303 | \r | |
304 | @param Size The number of bytes to allocate from the pool.\r | |
305 | @param Buffer If the call succeeds, a pointer to a pointer to the allocate\r | |
306 | buffer; undefined otherwise.\r | |
307 | \r | |
308 | @retval EFI_SUCCESS The allocation was successful\r | |
309 | @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.\r | |
310 | \r | |
311 | **/\r | |
312 | EFI_STATUS\r | |
313 | EFIAPI\r | |
314 | PeiServicesAllocatePool (\r | |
315 | IN UINTN Size,\r | |
316 | OUT VOID **Buffer\r | |
317 | );\r | |
318 | \r | |
319 | /**\r | |
67c89a21 | 320 | Resets the entire platform.\r |
fb3df220 | 321 | \r |
67c89a21 | 322 | @retval EFI_SUCCESS The function completed successfully.\r |
fb3df220 | 323 | @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.\r |
324 | \r | |
325 | **/\r | |
326 | EFI_STATUS\r | |
327 | EFIAPI\r | |
328 | PeiServicesResetSystem (\r | |
329 | VOID\r | |
330 | );\r | |
331 | \r | |
332 | \r | |
67c89a21 | 333 | /**\r |
9095d37b LG |
334 | This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services\r |
335 | Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface\r | |
336 | Specification for details.\r | |
67c89a21 | 337 | \r |
338 | @param FileName A pointer to the name of the file to\r | |
339 | find within the firmware volume.\r | |
340 | \r | |
341 | @param VolumeHandle The firmware volume to search FileHandle\r | |
342 | Upon exit, points to the found file's\r | |
343 | handle or NULL if it could not be found.\r | |
9095d37b | 344 | @param FileHandle Pointer to found file handle\r |
67c89a21 | 345 | \r |
346 | @retval EFI_SUCCESS File was found.\r | |
347 | \r | |
348 | @retval EFI_NOT_FOUND File was not found.\r | |
349 | \r | |
350 | @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or\r | |
351 | FileName was NULL.\r | |
352 | \r | |
353 | **/\r | |
b0d803fe | 354 | EFI_STATUS\r |
355 | EFIAPI\r | |
98db57b0 | 356 | PeiServicesFfsFindFileByName (\r |
b0d803fe | 357 | IN CONST EFI_GUID *FileName,\r |
358 | IN CONST EFI_PEI_FV_HANDLE VolumeHandle,\r | |
359 | OUT EFI_PEI_FILE_HANDLE *FileHandle\r | |
360 | );\r | |
361 | \r | |
362 | \r | |
67c89a21 | 363 | /**\r |
9095d37b LG |
364 | This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services\r |
365 | Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface\r | |
366 | Specification for details.\r | |
67c89a21 | 367 | \r |
368 | @param FileHandle Handle of the file.\r | |
369 | \r | |
370 | @param FileInfo Upon exit, points to the file's\r | |
371 | information.\r | |
372 | \r | |
373 | @retval EFI_SUCCESS File information returned.\r | |
9095d37b | 374 | \r |
67c89a21 | 375 | @retval EFI_INVALID_PARAMETER If FileHandle does not\r |
376 | represent a valid file.\r | |
9095d37b | 377 | \r |
67c89a21 | 378 | @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r |
9095d37b | 379 | \r |
67c89a21 | 380 | **/\r |
b0d803fe | 381 | EFI_STATUS\r |
9095d37b | 382 | EFIAPI\r |
b0d803fe | 383 | PeiServicesFfsGetFileInfo (\r |
384 | IN CONST EFI_PEI_FILE_HANDLE FileHandle,\r | |
385 | OUT EFI_FV_FILE_INFO *FileInfo\r | |
386 | );\r | |
387 | \r | |
c7935105 SZ |
388 | /**\r |
389 | This service is a wrapper for the PEI Service FfsGetFileInfo2(), except the pointer to the PEI Services\r | |
390 | Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface\r | |
391 | Specification for details.\r | |
392 | \r | |
393 | @param FileHandle Handle of the file.\r | |
394 | \r | |
395 | @param FileInfo Upon exit, points to the file's\r | |
396 | information.\r | |
397 | \r | |
398 | @retval EFI_SUCCESS File information returned.\r | |
9095d37b | 399 | \r |
c7935105 SZ |
400 | @retval EFI_INVALID_PARAMETER If FileHandle does not\r |
401 | represent a valid file.\r | |
9095d37b | 402 | \r |
c7935105 | 403 | @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r |
9095d37b | 404 | \r |
c7935105 SZ |
405 | **/\r |
406 | EFI_STATUS\r | |
407 | EFIAPI\r | |
408 | PeiServicesFfsGetFileInfo2 (\r | |
409 | IN CONST EFI_PEI_FILE_HANDLE FileHandle,\r | |
410 | OUT EFI_FV_FILE_INFO2 *FileInfo\r | |
411 | );\r | |
412 | \r | |
67c89a21 | 413 | /**\r |
9095d37b LG |
414 | This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services\r |
415 | Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface\r | |
416 | Specification for details.\r | |
67c89a21 | 417 | \r |
418 | @param VolumeHandle Handle of the volume.\r | |
419 | \r | |
420 | @param VolumeInfo Upon exit, points to the volume's\r | |
421 | information.\r | |
422 | \r | |
423 | @retval EFI_SUCCESS File information returned.\r | |
9095d37b | 424 | \r |
67c89a21 | 425 | @retval EFI_INVALID_PARAMETER If FileHandle does not\r |
426 | represent a valid file.\r | |
9095d37b | 427 | \r |
67c89a21 | 428 | @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r |
429 | \r | |
430 | **/\r | |
b0d803fe | 431 | EFI_STATUS\r |
432 | EFIAPI\r | |
433 | PeiServicesFfsGetVolumeInfo (\r | |
434 | IN EFI_PEI_FV_HANDLE VolumeHandle,\r | |
435 | OUT EFI_FV_INFO *VolumeInfo\r | |
436 | );\r | |
437 | \r | |
438 | \r | |
67c89a21 | 439 | /**\r |
9095d37b LG |
440 | This service is a wrapper for the PEI Service RegisterForShadow(), except the pointer to the PEI Services\r |
441 | Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface\r | |
442 | Specification for details.\r | |
67c89a21 | 443 | \r |
444 | @param FileHandle PEIM's file handle. Must be the currently\r | |
445 | executing PEIM.\r | |
9095d37b | 446 | \r |
67c89a21 | 447 | @retval EFI_SUCCESS The PEIM was successfully registered for\r |
448 | shadowing.\r | |
449 | \r | |
450 | @retval EFI_ALREADY_STARTED The PEIM was previously\r | |
451 | registered for shadowing.\r | |
452 | \r | |
453 | @retval EFI_NOT_FOUND The FileHandle does not refer to a\r | |
454 | valid file handle.\r | |
455 | **/\r | |
b0d803fe | 456 | EFI_STATUS\r |
457 | EFIAPI\r | |
458 | PeiServicesRegisterForShadow (\r | |
459 | IN EFI_PEI_FILE_HANDLE FileHandle\r | |
460 | );\r | |
461 | \r | |
f26f70ad | 462 | /**\r |
b75a165d | 463 | Install a EFI_PEI_FIRMWARE_VOLUME_INFO_PPI instance so the PEI Core will be notified about a new firmware volume.\r |
9095d37b LG |
464 | \r |
465 | This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO_PPI using\r | |
b75a165d LG |
466 | the parameters passed in to initialize the fields of the EFI_PEI_FIRMWARE_VOLUME_INFO_PPI instance.\r |
467 | If the resources can not be allocated for EFI_PEI_FIRMWARE_VOLUME_INFO_PPI, then ASSERT().\r | |
468 | If the EFI_PEI_FIRMWARE_VOLUME_INFO_PPI can not be installed, then ASSERT().\r | |
469 | \r | |
9095d37b | 470 | \r |
b75a165d | 471 | @param FvFormat Unique identifier of the format of the memory-mapped firmware volume.\r |
9095d37b | 472 | This parameter is optional and may be NULL.\r |
b75a165d | 473 | If NULL is specified, the EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.\r |
9095d37b LG |
474 | @param FvInfo Points to a buffer which allows the EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.\r |
475 | The format of this buffer is specific to the FvFormat. For memory-mapped firmware volumes,\r | |
b75a165d | 476 | this typically points to the first byte of the firmware volume.\r |
9095d37b | 477 | @param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped firmware volumes,\r |
b75a165d | 478 | this is typically the size of the firmware volume.\r |
9095d37b | 479 | @param ParentFvName If the new firmware volume originated from a file in a different firmware volume,\r |
b75a165d LG |
480 | then this parameter specifies the GUID name of the originating firmware volume.\r |
481 | Otherwise, this parameter must be NULL.\r | |
9095d37b | 482 | @param ParentFileName If the new firmware volume originated from a file in a different firmware volume,\r |
b75a165d LG |
483 | then this parameter specifies the GUID file name of the originating firmware file.\r |
484 | Otherwise, this parameter must be NULL.\r | |
f26f70ad | 485 | **/\r |
486 | VOID\r | |
487 | EFIAPI\r | |
488 | PeiServicesInstallFvInfoPpi (\r | |
489 | IN CONST EFI_GUID *FvFormat, OPTIONAL\r | |
490 | IN CONST VOID *FvInfo,\r | |
491 | IN UINT32 FvInfoSize,\r | |
492 | IN CONST EFI_GUID *ParentFvName, OPTIONAL\r | |
493 | IN CONST EFI_GUID *ParentFileName OPTIONAL\r | |
494 | );\r | |
b0d803fe | 495 | \r |
c7935105 SZ |
496 | /**\r |
497 | Install a EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI instance so the PEI Core will be notified about a new firmware volume.\r | |
498 | \r | |
499 | This function allocates, initializes, and installs a new EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI using\r | |
500 | the parameters passed in to initialize the fields of the EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI instance.\r | |
501 | If the resources can not be allocated for EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI, then ASSERT().\r | |
502 | If the EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI can not be installed, then ASSERT().\r | |
503 | \r | |
504 | @param FvFormat Unique identifier of the format of the memory-mapped\r | |
505 | firmware volume. This parameter is optional and\r | |
506 | may be NULL. If NULL is specified, the\r | |
507 | EFI_FIRMWARE_FILE_SYSTEM2_GUID format is assumed.\r | |
508 | @param FvInfo Points to a buffer which allows the\r | |
509 | EFI_PEI_FIRMWARE_VOLUME_PPI to process the volume.\r | |
510 | The format of this buffer is specific to the FvFormat.\r | |
511 | For memory-mapped firmware volumes, this typically\r | |
512 | points to the first byte of the firmware volume.\r | |
513 | @param FvInfoSize The size, in bytes, of FvInfo. For memory-mapped\r | |
514 | firmware volumes, this is typically the size of\r | |
515 | the firmware volume.\r | |
516 | @param ParentFvName If the new firmware volume originated from a file\r | |
517 | in a different firmware volume, then this parameter\r | |
518 | specifies the GUID name of the originating firmware\r | |
519 | volume. Otherwise, this parameter must be NULL.\r | |
520 | @param ParentFileName If the new firmware volume originated from a file\r | |
521 | in a different firmware volume, then this parameter\r | |
522 | specifies the GUID file name of the originating\r | |
523 | firmware file. Otherwise, this parameter must be NULL.\r | |
524 | @param AuthenticationStatus Authentication Status\r | |
525 | **/\r | |
526 | VOID\r | |
527 | EFIAPI\r | |
528 | PeiServicesInstallFvInfo2Ppi (\r | |
529 | IN CONST EFI_GUID *FvFormat, OPTIONAL\r | |
530 | IN CONST VOID *FvInfo,\r | |
531 | IN UINT32 FvInfoSize,\r | |
532 | IN CONST EFI_GUID *ParentFvName, OPTIONAL\r | |
533 | IN CONST EFI_GUID *ParentFileName, OPTIONAL\r | |
534 | IN UINT32 AuthenticationStatus\r | |
535 | );\r | |
536 | \r | |
dacf87e8 MK |
537 | /**\r |
538 | Resets the entire platform.\r | |
539 | \r | |
540 | @param[in] ResetType The type of reset to perform.\r | |
541 | @param[in] ResetStatus The status code for the reset.\r | |
542 | @param[in] DataSize The size, in bytes, of ResetData.\r | |
543 | @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r | |
544 | the data buffer starts with a Null-terminated string, optionally\r | |
545 | followed by additional binary data. The string is a description\r | |
546 | that the caller may use to further indicate the reason for the\r | |
1abe0959 | 547 | system reset.\r |
dacf87e8 MK |
548 | \r |
549 | **/\r | |
550 | VOID\r | |
551 | EFIAPI\r | |
552 | PeiServicesResetSystem2 (\r | |
553 | IN EFI_RESET_TYPE ResetType,\r | |
554 | IN EFI_STATUS ResetStatus,\r | |
555 | IN UINTN DataSize,\r | |
556 | IN VOID *ResetData OPTIONAL\r | |
557 | );\r | |
558 | \r | |
fb3df220 | 559 | #endif\r |