]> git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/Include/Library/PrePiLib.h
f60b6678185ac11dad8625aec038d896ad1a6168
[mirror_edk2.git] / EmbeddedPkg / Include / Library / PrePiLib.h
1 /** @file
2 Library that helps implement monolithic PEI. (SEC goes to DXE)
3
4 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __PRE_PI_LIB_H__
11 #define __PRE_PI_LIB_H__
12
13 #include <Guid/ExtractSection.h>
14
15 /**
16 This service enables discovery of additional firmware volumes.
17
18 @param Instance This instance of the firmware volume to find. The value 0 is the
19 Boot Firmware Volume (BFV).
20 @param FwVolHeader Pointer to the firmware volume header of the volume to return.
21
22 @retval EFI_SUCCESS The volume was found.
23 @retval EFI_NOT_FOUND The volume was not found.
24 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL.
25
26 **/
27 EFI_STATUS
28 EFIAPI
29 FfsFindNextVolume (
30 IN UINTN Instance,
31 IN OUT EFI_PEI_FV_HANDLE *VolumeHandle
32 );
33
34 /**
35 This service enables discovery of additional firmware files.
36
37 @param SearchType A filter to find files only of this type.
38 @param FwVolHeader Pointer to the firmware volume header of the volume to search.
39 This parameter must point to a valid FFS volume.
40 @param FileHeader Pointer to the current file from which to begin searching.
41
42 @retval EFI_SUCCESS The file was found.
43 @retval EFI_NOT_FOUND The file was not found.
44 @retval EFI_NOT_FOUND The header checksum was not zero.
45
46 **/
47 EFI_STATUS
48 EFIAPI
49 FfsFindNextFile (
50 IN EFI_FV_FILETYPE SearchType,
51 IN EFI_PEI_FV_HANDLE VolumeHandle,
52 IN OUT EFI_PEI_FILE_HANDLE *FileHandle
53 );
54
55 /**
56 * This is a hook which is used to check if the section is the target one.
57 *
58 */
59 typedef
60 EFI_STATUS
61 (EFIAPI *FFS_CHECK_SECTION_HOOK)(
62 IN EFI_COMMON_SECTION_HEADER *Section
63 );
64
65 /**
66 This service enables discovery sections of a given type within a valid FFS file.
67 Caller also can provide a SectionCheckHook to do additional checking.
68
69 @param SectionType The value of the section type to find.
70 @param SectionCheckHook A hook which can check if the section is the target one.
71 @param FileHeader A pointer to the file header that contains the set of sections to
72 be searched.
73 @param SectionData A pointer to the discovered section, if successful.
74
75 @retval EFI_SUCCESS The section was found.
76 @retval EFI_NOT_FOUND The section was not found.
77
78 **/
79 EFI_STATUS
80 EFIAPI
81 FfsFindSectionData (
82 IN EFI_SECTION_TYPE SectionType,
83 IN FFS_CHECK_SECTION_HOOK SectionCheckHook,
84 IN EFI_PEI_FILE_HANDLE FileHandle,
85 OUT VOID **SectionData
86 );
87
88 /**
89 Find a file in the volume by name
90
91 @param FileName A pointer to the name of the file to
92 find within the firmware volume.
93
94 @param VolumeHandle The firmware volume to search FileHandle
95 Upon exit, points to the found file's
96 handle or NULL if it could not be found.
97
98 @retval EFI_SUCCESS File was found.
99
100 @retval EFI_NOT_FOUND File was not found.
101
102 @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or
103 FileName was NULL.
104
105 **/
106 EFI_STATUS
107 EFIAPI
108 FfsFindFileByName (
109 IN CONST EFI_GUID *FileName,
110 IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
111 OUT EFI_PEI_FILE_HANDLE *FileHandle
112 );
113
114 /**
115 Get information about the file by name.
116
117 @param FileHandle Handle of the file.
118
119 @param FileInfo Upon exit, points to the file's
120 information.
121
122 @retval EFI_SUCCESS File information returned.
123
124 @retval EFI_INVALID_PARAMETER If FileHandle does not
125 represent a valid file.
126
127 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.
128
129 **/
130 EFI_STATUS
131 EFIAPI
132 FfsGetFileInfo (
133 IN CONST EFI_PEI_FILE_HANDLE FileHandle,
134 OUT EFI_FV_FILE_INFO *FileInfo
135 );
136
137 /**
138 Get Information about the volume by name
139
140 @param VolumeHandle Handle of the volume.
141
142 @param VolumeInfo Upon exit, points to the volume's
143 information.
144
145 @retval EFI_SUCCESS File information returned.
146
147 @retval EFI_INVALID_PARAMETER If FileHandle does not
148 represent a valid file.
149
150 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.
151
152 **/
153 EFI_STATUS
154 EFIAPI
155 FfsGetVolumeInfo (
156 IN EFI_PEI_FV_HANDLE VolumeHandle,
157 OUT EFI_FV_INFO *VolumeInfo
158 );
159
160 /**
161 Get Fv image from the FV type file, then add FV & FV2 Hob.
162
163 @param FileHandle File handle of a Fv type file.
164
165 @retval EFI_NOT_FOUND FV image can't be found.
166 @retval EFI_SUCCESS Successfully to process it.
167
168 **/
169 EFI_STATUS
170 EFIAPI
171 FfsProcessFvFile (
172 IN EFI_PEI_FILE_HANDLE FvFileHandle
173 );
174
175 /**
176 Search through every FV until you find a file of type FileType
177
178 @param FileType File handle of a Fv type file.
179 @param Volumehandle On success Volume Handle of the match
180 @param FileHandle On success File Handle of the match
181
182 @retval EFI_NOT_FOUND FV image can't be found.
183 @retval EFI_SUCCESS Successfully found FileType
184
185 **/
186 EFI_STATUS
187 EFIAPI
188 FfsAnyFvFindFirstFile (
189 IN EFI_FV_FILETYPE FileType,
190 OUT EFI_PEI_FV_HANDLE *VolumeHandle,
191 OUT EFI_PEI_FILE_HANDLE *FileHandle
192 );
193
194 /**
195 Get Fv image from the FV type file, then add FV & FV2 Hob.
196
197 @param FileHandle File handle of a Fv type file.
198
199
200 @retval EFI_NOT_FOUND FV image can't be found.
201 @retval EFI_SUCCESS Successfully to process it.
202
203 **/
204 EFI_STATUS
205 EFIAPI
206 FfsProcessFvFile (
207 IN EFI_PEI_FILE_HANDLE FvFileHandle
208 );
209
210 /**
211 This service enables PEIMs to ascertain the present value of the boot mode.
212
213
214 @retval BootMode
215
216 **/
217 EFI_BOOT_MODE
218 EFIAPI
219 GetBootMode (
220 VOID
221 );
222
223 /**
224 This service enables PEIMs to update the boot mode variable.
225
226 @param BootMode The value of the boot mode to set.
227
228 @retval EFI_SUCCESS The value was successfully updated
229
230 **/
231 EFI_STATUS
232 EFIAPI
233 SetBootMode (
234 IN EFI_BOOT_MODE BootMode
235 );
236
237 /**
238 This service enables a PEIM to ascertain the address of the list of HOBs in memory.
239
240 @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize.
241
242 @retval EFI_SUCCESS The list was successfully returned.
243 @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
244
245 **/
246 VOID *
247 EFIAPI
248 GetHobList (
249 VOID
250 );
251
252 /**
253 Updates the pointer to the HOB list.
254
255 @param HobList Hob list pointer to store
256
257 **/
258 EFI_STATUS
259 EFIAPI
260 SetHobList (
261 IN VOID *HobList
262 );
263
264 EFI_HOB_HANDOFF_INFO_TABLE *
265 HobConstructor (
266 IN VOID *EfiMemoryBegin,
267 IN UINTN EfiMemoryLength,
268 IN VOID *EfiFreeMemoryBottom,
269 IN VOID *EfiFreeMemoryTop
270 );
271
272 /**
273 This service enables PEIMs to create various types of HOBs.
274
275 @param Type The type of HOB to be installed.
276 @param Length The length of the HOB to be added.
277
278 @retval !NULL The HOB was successfully created.
279 @retval NULL There is no additional space for HOB creation.
280
281 **/
282 VOID *
283 CreateHob (
284 IN UINT16 HobType,
285 IN UINT16 HobLenght
286 );
287
288 /**
289 Returns the next instance of a HOB type from the starting HOB.
290
291 This function searches the first instance of a HOB type from the starting HOB pointer.
292 If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
293 In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
294 unconditionally: it returns HobStart back if HobStart itself meets the requirement;
295 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
296 If HobStart is NULL, then ASSERT().
297
298 @param Type The HOB type to return.
299 @param HobStart The starting HOB pointer to search from.
300
301 @return The next instance of a HOB type from the starting HOB.
302
303 **/
304 VOID *
305 EFIAPI
306 GetNextHob (
307 IN UINT16 Type,
308 IN CONST VOID *HobStart
309 );
310
311 /**
312 Returns the first instance of a HOB type among the whole HOB list.
313
314 This function searches the first instance of a HOB type among the whole HOB list.
315 If there does not exist such HOB type in the HOB list, it will return NULL.
316
317 @param Type The HOB type to return.
318
319 @return The next instance of a HOB type from the starting HOB.
320
321 **/
322 VOID *
323 EFIAPI
324 GetFirstHob (
325 IN UINT16 Type
326 );
327
328 /**
329 This function searches the first instance of a HOB from the starting HOB pointer.
330 Such HOB should satisfy two conditions:
331 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
332 If there does not exist such HOB from the starting HOB pointer, it will return NULL.
333 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
334 to extract the data section and its size info respectively.
335 In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
336 unconditionally: it returns HobStart back if HobStart itself meets the requirement;
337 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
338 If Guid is NULL, then ASSERT().
339 If HobStart is NULL, then ASSERT().
340
341 @param Guid The GUID to match with in the HOB list.
342 @param HobStart A pointer to a Guid.
343
344 @return The next instance of the matched GUID HOB from the starting HOB.
345
346 **/
347 VOID *
348 EFIAPI
349 GetNextGuidHob (
350 IN CONST EFI_GUID *Guid,
351 IN CONST VOID *HobStart
352 );
353
354 /**
355 This function searches the first instance of a HOB among the whole HOB list.
356 Such HOB should satisfy two conditions:
357 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
358 If there does not exist such HOB from the starting HOB pointer, it will return NULL.
359 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
360 to extract the data section and its size info respectively.
361 If Guid is NULL, then ASSERT().
362
363 @param Guid The GUID to match with in the HOB list.
364
365 @return The first instance of the matched GUID HOB among the whole HOB list.
366
367 **/
368 VOID *
369 EFIAPI
370 GetFirstGuidHob (
371 IN CONST EFI_GUID *Guid
372 );
373
374 /**
375 Builds a HOB for a loaded PE32 module.
376
377 This function builds a HOB for a loaded PE32 module.
378 It can only be invoked during PEI phase;
379 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
380 If ModuleName is NULL, then ASSERT().
381 If there is no additional space for HOB creation, then ASSERT().
382
383 @param ModuleName The GUID File Name of the module.
384 @param MemoryAllocationModule The 64 bit physical address of the module.
385 @param ModuleLength The length of the module in bytes.
386 @param EntryPoint The 64 bit physical address of the module entry point.
387
388 **/
389 VOID
390 EFIAPI
391 BuildModuleHob (
392 IN CONST EFI_GUID *ModuleName,
393 IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
394 IN UINT64 ModuleLength,
395 IN EFI_PHYSICAL_ADDRESS EntryPoint
396 );
397
398 /**
399 Builds a HOB that describes a chunk of system memory.
400
401 This function builds a HOB that describes a chunk of system memory.
402 It can only be invoked during PEI phase;
403 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
404 If there is no additional space for HOB creation, then ASSERT().
405
406 @param ResourceType The type of resource described by this HOB.
407 @param ResourceAttribute The resource attributes of the memory described by this HOB.
408 @param PhysicalStart The 64 bit physical address of memory described by this HOB.
409 @param NumberOfBytes The length of the memory described by this HOB in bytes.
410
411 **/
412 VOID
413 EFIAPI
414 BuildResourceDescriptorHob (
415 IN EFI_RESOURCE_TYPE ResourceType,
416 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
417 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
418 IN UINT64 NumberOfBytes
419 );
420
421 /**
422 Builds a GUID HOB with a certain data length.
423
424 This function builds a customized HOB tagged with a GUID for identification
425 and returns the start address of GUID HOB data so that caller can fill the customized data.
426 The HOB Header and Name field is already stripped.
427 It can only be invoked during PEI phase;
428 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
429 If Guid is NULL, then ASSERT().
430 If there is no additional space for HOB creation, then ASSERT().
431 If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
432
433 @param Guid The GUID to tag the customized HOB.
434 @param DataLength The size of the data payload for the GUID HOB.
435
436 @return The start address of GUID HOB data.
437
438 **/
439 VOID *
440 EFIAPI
441 BuildGuidHob (
442 IN CONST EFI_GUID *Guid,
443 IN UINTN DataLength
444 );
445
446 /**
447 Copies a data buffer to a newly-built HOB.
448
449 This function builds a customized HOB tagged with a GUID for identification,
450 copies the input data to the HOB data field and returns the start address of the GUID HOB data.
451 The HOB Header and Name field is already stripped.
452 It can only be invoked during PEI phase;
453 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
454 If Guid is NULL, then ASSERT().
455 If Data is NULL and DataLength > 0, then ASSERT().
456 If there is no additional space for HOB creation, then ASSERT().
457 If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
458
459 @param Guid The GUID to tag the customized HOB.
460 @param Data The data to be copied into the data field of the GUID HOB.
461 @param DataLength The size of the data payload for the GUID HOB.
462
463 @return The start address of GUID HOB data.
464
465 **/
466 VOID *
467 EFIAPI
468 BuildGuidDataHob (
469 IN CONST EFI_GUID *Guid,
470 IN VOID *Data,
471 IN UINTN DataLength
472 );
473
474 /**
475 Builds a Firmware Volume HOB.
476
477 This function builds a Firmware Volume HOB.
478 It can only be invoked during PEI phase;
479 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
480 If there is no additional space for HOB creation, then ASSERT().
481
482 @param BaseAddress The base address of the Firmware Volume.
483 @param Length The size of the Firmware Volume in bytes.
484
485 **/
486 VOID
487 EFIAPI
488 BuildFvHob (
489 IN EFI_PHYSICAL_ADDRESS BaseAddress,
490 IN UINT64 Length
491 );
492
493 /**
494 Builds a Firmware Volume HOB and a resource descriptor hob
495
496 This function builds a Firmware Volume HOB.
497 It can only be invoked during PEI phase;
498 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
499 If there is no additional space for HOB creation, then ASSERT().
500
501 @param BaseAddress The base address of the Firmware Volume.
502 @param Length The size of the Firmware Volume in bytes.
503
504 **/
505 VOID
506 EFIAPI
507 BuildFvHobs (
508 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
509 IN UINT64 NumberOfBytes,
510 IN EFI_RESOURCE_ATTRIBUTE_TYPE *ResourceAttribute OPTIONAL
511 );
512
513 /**
514 Builds a EFI_HOB_TYPE_FV2 HOB.
515
516 This function builds a EFI_HOB_TYPE_FV2 HOB.
517 It can only be invoked during PEI phase;
518 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
519 If there is no additional space for HOB creation, then ASSERT().
520
521 @param BaseAddress The base address of the Firmware Volume.
522 @param Length The size of the Firmware Volume in bytes.
523 @param FvName The name of the Firmware Volume.
524 @param FileName The name of the file.
525
526 **/
527 VOID
528 EFIAPI
529 BuildFv2Hob (
530 IN EFI_PHYSICAL_ADDRESS BaseAddress,
531 IN UINT64 Length,
532 IN CONST EFI_GUID *FvName,
533 IN CONST EFI_GUID *FileName
534 );
535
536 /**
537 Builds a Capsule Volume HOB.
538
539 This function builds a Capsule Volume HOB.
540 It can only be invoked during PEI phase;
541 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
542 If there is no additional space for HOB creation, then ASSERT().
543
544 @param BaseAddress The base address of the Capsule Volume.
545 @param Length The size of the Capsule Volume in bytes.
546
547 **/
548 VOID
549 EFIAPI
550 BuildCvHob (
551 IN EFI_PHYSICAL_ADDRESS BaseAddress,
552 IN UINT64 Length
553 );
554
555 /**
556 Builds a HOB for the CPU.
557
558 This function builds a HOB for the CPU.
559 It can only be invoked during PEI phase;
560 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
561 If there is no additional space for HOB creation, then ASSERT().
562
563 @param SizeOfMemorySpace The maximum physical memory addressability of the processor.
564 @param SizeOfIoSpace The maximum physical I/O addressability of the processor.
565
566 **/
567 VOID
568 EFIAPI
569 BuildCpuHob (
570 IN UINT8 SizeOfMemorySpace,
571 IN UINT8 SizeOfIoSpace
572 );
573
574 /**
575 Builds a HOB for the Stack.
576
577 This function builds a HOB for the stack.
578 It can only be invoked during PEI phase;
579 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
580 If there is no additional space for HOB creation, then ASSERT().
581
582 @param BaseAddress The 64 bit physical address of the Stack.
583 @param Length The length of the stack in bytes.
584
585 **/
586 VOID
587 EFIAPI
588 BuildStackHob (
589 IN EFI_PHYSICAL_ADDRESS BaseAddress,
590 IN UINT64 Length
591 );
592
593 /**
594 Update the Stack Hob if the stack has been moved
595
596 @param BaseAddress The 64 bit physical address of the Stack.
597 @param Length The length of the stack in bytes.
598
599 **/
600 VOID
601 UpdateStackHob (
602 IN EFI_PHYSICAL_ADDRESS BaseAddress,
603 IN UINT64 Length
604 );
605
606 /**
607 Builds a HOB for the BSP store.
608
609 This function builds a HOB for BSP store.
610 It can only be invoked during PEI phase;
611 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
612 If there is no additional space for HOB creation, then ASSERT().
613
614 @param BaseAddress The 64 bit physical address of the BSP.
615 @param Length The length of the BSP store in bytes.
616 @param MemoryType Type of memory allocated by this HOB.
617
618 **/
619 VOID
620 EFIAPI
621 BuildBspStoreHob (
622 IN EFI_PHYSICAL_ADDRESS BaseAddress,
623 IN UINT64 Length,
624 IN EFI_MEMORY_TYPE MemoryType
625 );
626
627 /**
628 Builds a HOB for the memory allocation.
629
630 This function builds a HOB for the memory allocation.
631 It can only be invoked during PEI phase;
632 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
633 If there is no additional space for HOB creation, then ASSERT().
634
635 @param BaseAddress The 64 bit physical address of the memory.
636 @param Length The length of the memory allocation in bytes.
637 @param MemoryType Type of memory allocated by this HOB.
638
639 **/
640 VOID
641 EFIAPI
642 BuildMemoryAllocationHob (
643 IN EFI_PHYSICAL_ADDRESS BaseAddress,
644 IN UINT64 Length,
645 IN EFI_MEMORY_TYPE MemoryType
646 );
647
648 VOID
649 EFIAPI
650 BuildExtractSectionHob (
651 IN EFI_GUID *Guid,
652 IN EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER SectionGetInfo,
653 IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction
654 );
655
656 VOID
657 EFIAPI
658 BuildPeCoffLoaderHob (
659 VOID
660 );
661
662 /**
663 Allocates one or more 4KB pages of type EfiBootServicesData.
664
665 Allocates the number of 4KB pages of MemoryType and returns a pointer to the
666 allocated buffer. The buffer returned is aligned on a 4KB boundary. If Pages is 0, then NULL
667 is returned. If there is not enough memory remaining to satisfy the request, then NULL is
668 returned.
669
670 @param Pages The number of 4 KB pages to allocate.
671
672 @return A pointer to the allocated buffer or NULL if allocation fails.
673
674 **/
675 VOID *
676 EFIAPI
677 AllocatePages (
678 IN UINTN Pages
679 );
680
681 /**
682 Allocates one or more 4KB pages of type EfiRuntimeServicesData.
683
684 Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a pointer to the
685 allocated buffer. The buffer returned is aligned on a 4KB boundary. If Pages is 0, then NULL
686 is returned. If there is not enough memory remaining to satisfy the request, then NULL is
687 returned.
688
689 @param Pages The number of 4 KB pages to allocate.
690
691 @return A pointer to the allocated buffer or NULL if allocation fails.
692
693 **/
694 VOID *
695 EFIAPI
696 AllocateRuntimePages (
697 IN UINTN Pages
698 );
699
700 /**
701 Allocates a buffer of type EfiBootServicesData.
702
703 Allocates the number bytes specified by AllocationSize of type EfiBootServicesData and returns a
704 pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is
705 returned. If there is not enough memory remaining to satisfy the request, then NULL is returned.
706
707 @param AllocationSize The number of bytes to allocate.
708
709 @return A pointer to the allocated buffer or NULL if allocation fails.
710
711 **/
712 VOID *
713 EFIAPI
714 AllocatePool (
715 IN UINTN AllocationSize
716 );
717
718 /**
719 Allocates one or more 4KB pages of type EfiBootServicesData at a specified alignment.
720
721 Allocates the number of 4KB pages specified by Pages of type EfiBootServicesData with an
722 alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is
723 returned. If there is not enough memory at the specified alignment remaining to satisfy the
724 request, then NULL is returned.
725 If Alignment is not a power of two and Alignment is not zero, then ASSERT().
726
727 @param Pages The number of 4 KB pages to allocate.
728 @param Alignment The requested alignment of the allocation. Must be a power of two.
729 If Alignment is zero, then byte alignment is used.
730
731 @return A pointer to the allocated buffer or NULL if allocation fails.
732
733 **/
734 VOID *
735 EFIAPI
736 AllocateAlignedPages (
737 IN UINTN Pages,
738 IN UINTN Alignment
739 );
740
741 EFI_STATUS
742 EFIAPI
743 LoadPeCoffImage (
744 IN VOID *PeCoffImage,
745 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
746 OUT UINT64 *ImageSize,
747 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
748 );
749
750 EFI_STATUS
751 EFIAPI
752 LoadDxeCoreFromFfsFile (
753 IN EFI_PEI_FILE_HANDLE FileHandle,
754 IN UINTN StackSize
755 );
756
757 EFI_STATUS
758 EFIAPI
759 LoadDxeCoreFromFv (
760 IN UINTN *FvInstance OPTIONAL,
761 IN UINTN StackSize
762 );
763
764 EFI_STATUS
765 EFIAPI
766 DecompressFirstFv (
767 VOID
768 );
769
770 #endif