TianoCore EDK2 master
Loading...
Searching...
No Matches
PrePiLib.h
Go to the documentation of this file.
1
10#ifndef __PRE_PI_LIB_H__
11#define __PRE_PI_LIB_H__
12
13#include <Guid/ExtractSection.h>
14
28EFIAPI
30 IN UINTN Instance,
31 IN OUT EFI_PEI_FV_HANDLE *VolumeHandle
32 );
33
48EFIAPI
50 IN EFI_FV_FILETYPE SearchType,
51 IN EFI_PEI_FV_HANDLE VolumeHandle,
52 IN OUT EFI_PEI_FILE_HANDLE *FileHandle
53 );
54
59typedef
63 );
64
80EFIAPI
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
101EFIAPI
103 IN EFI_SECTION_TYPE SectionType,
104 IN EFI_PEI_FILE_HANDLE FileHandle,
105 OUT VOID **SectionData
106 );
107
127EFIAPI
129 IN CONST EFI_GUID *FileName,
130 IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
131 OUT EFI_PEI_FILE_HANDLE *FileHandle
132 );
133
151EFIAPI
153 IN CONST EFI_PEI_FILE_HANDLE FileHandle,
155 );
156
174EFIAPI
176 IN EFI_PEI_FV_HANDLE VolumeHandle,
177 OUT EFI_FV_INFO *VolumeInfo
178 );
179
190EFIAPI
192 IN EFI_PEI_FILE_HANDLE FvFileHandle
193 );
194
207EFIAPI
209 IN EFI_FV_FILETYPE FileType,
210 OUT EFI_PEI_FV_HANDLE *VolumeHandle,
211 OUT EFI_PEI_FILE_HANDLE *FileHandle
212 );
213
225EFIAPI
227 IN EFI_PEI_FILE_HANDLE FvFileHandle
228 );
229
238EFIAPI
240 VOID
241 );
242
252EFIAPI
254 IN EFI_BOOT_MODE BootMode
255 );
256
266VOID *
267EFIAPI
269 VOID
270 );
271
279EFIAPI
281 IN VOID *HobList
282 );
283
285HobConstructor (
286 IN VOID *EfiMemoryBegin,
287 IN UINTN EfiMemoryLength,
288 IN VOID *EfiFreeMemoryBottom,
289 IN VOID *EfiFreeMemoryTop
290 );
291
302VOID *
303CreateHob (
304 IN UINT16 HobType,
305 IN UINT16 HobLenght
306 );
307
324VOID *
325EFIAPI
327 IN UINT16 Type,
328 IN CONST VOID *HobStart
329 );
330
342VOID *
343EFIAPI
345 IN UINT16 Type
346 );
347
367VOID *
368EFIAPI
370 IN CONST EFI_GUID *Guid,
371 IN CONST VOID *HobStart
372 );
373
388VOID *
389EFIAPI
391 IN CONST EFI_GUID *Guid
392 );
393
409VOID
410EFIAPI
412 IN CONST EFI_GUID *ModuleName,
413 IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
414 IN UINT64 ModuleLength,
415 IN EFI_PHYSICAL_ADDRESS EntryPoint
416 );
417
432VOID
433EFIAPI
435 IN EFI_RESOURCE_TYPE ResourceType,
436 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
437 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
438 IN UINT64 NumberOfBytes
439 );
440
459VOID *
460EFIAPI
462 IN CONST EFI_GUID *Guid,
463 IN UINTN DataLength
464 );
465
486VOID *
487EFIAPI
489 IN CONST EFI_GUID *Guid,
490 IN VOID *Data,
491 IN UINTN DataLength
492 );
493
506VOID
507EFIAPI
509 IN EFI_PHYSICAL_ADDRESS BaseAddress,
510 IN UINT64 Length
511 );
512
525VOID
526EFIAPI
528 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
529 IN UINT64 NumberOfBytes,
530 IN EFI_RESOURCE_ATTRIBUTE_TYPE *ResourceAttribute OPTIONAL
531 );
532
547VOID
548EFIAPI
550 IN EFI_PHYSICAL_ADDRESS BaseAddress,
551 IN UINT64 Length,
552 IN CONST EFI_GUID *FvName,
553 IN CONST EFI_GUID *FileName
554 );
555
568VOID
569EFIAPI
571 IN EFI_PHYSICAL_ADDRESS BaseAddress,
572 IN UINT64 Length
573 );
574
587VOID
588EFIAPI
590 IN UINT8 SizeOfMemorySpace,
591 IN UINT8 SizeOfIoSpace
592 );
593
606VOID
607EFIAPI
609 IN EFI_PHYSICAL_ADDRESS BaseAddress,
610 IN UINT64 Length
611 );
612
620VOID
622 IN EFI_PHYSICAL_ADDRESS BaseAddress,
623 IN UINT64 Length
624 );
625
639VOID
640EFIAPI
642 IN EFI_PHYSICAL_ADDRESS BaseAddress,
643 IN UINT64 Length,
644 IN EFI_MEMORY_TYPE MemoryType
645 );
646
660VOID
661EFIAPI
663 IN EFI_PHYSICAL_ADDRESS BaseAddress,
664 IN UINT64 Length,
665 IN EFI_MEMORY_TYPE MemoryType
666 );
667
668VOID
669EFIAPI
670BuildExtractSectionHob (
671 IN EFI_GUID *Guid,
674 );
675
676VOID
677EFIAPI
678BuildPeCoffLoaderHob (
679 VOID
680 );
681
695VOID *
696EFIAPI
698 IN UINTN Pages
699 );
700
714VOID *
715EFIAPI
717 IN UINTN Pages
718 );
719
732VOID *
733EFIAPI
735 IN UINTN AllocationSize
736 );
737
754VOID *
755EFIAPI
757 IN UINTN Pages,
758 IN UINTN Alignment
759 );
760
762EFIAPI
764 IN VOID *PeCoffImage,
765 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
766 OUT UINT64 *ImageSize,
767 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
768 );
769
771EFIAPI
772LoadDxeCoreFromFfsFile (
773 IN EFI_PEI_FILE_HANDLE FileHandle,
774 IN UINTN StackSize
775 );
776
778EFIAPI
779LoadDxeCoreFromFv (
780 IN UINTN *FvInstance OPTIONAL,
781 IN UINTN StackSize
782 );
783
785EFIAPI
786DecompressFirstFv (
787 VOID
788 );
789
790#endif
UINT64 UINTN
RETURN_STATUS(EFIAPI * EXTRACT_GUIDED_SECTION_DECODE_HANDLER)(IN CONST VOID *InputSection, OUT VOID **OutputBuffer, IN VOID *ScratchBuffer OPTIONAL, OUT UINT32 *AuthenticationStatus)
RETURN_STATUS(EFIAPI * EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)(IN CONST VOID *InputSection, OUT UINT32 *OutputBufferSize, OUT UINT32 *ScratchBufferSize, OUT UINT16 *SectionAttribute)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
UINT32 EFI_RESOURCE_TYPE
Definition: PiHob.h:223
UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE
Definition: PiHob.h:241
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
VOID * EFI_PEI_FV_HANDLE
Definition: PiPeiCis.h:21
VOID EFIAPI BuildFv2Hob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN CONST EFI_GUID *FvName, IN CONST EFI_GUID *FileName)
Definition: HobLib.c:433
EFI_STATUS EFIAPI FfsFindSectionDataWithHook(IN EFI_SECTION_TYPE SectionType, IN FFS_CHECK_SECTION_HOOK SectionCheckHook, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
Definition: FwVol.c:476
EFI_STATUS EFIAPI SetBootMode(IN EFI_BOOT_MODE BootMode)
Definition: Hob.c:364
EFI_STATUS EFIAPI FfsFindSectionData(IN EFI_SECTION_TYPE SectionType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
Definition: FwVol.c:521
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID *EFIAPI GetFirstHob(IN UINT16 Type)
Definition: HobLib.c:142
EFI_STATUS EFIAPI SetHobList(IN VOID *HobList)
Definition: Hob.c:55
VOID *EFIAPI AllocateAlignedPages(IN UINTN Pages, IN UINTN Alignment)
VOID * CreateHob(IN UINT16 HobType, IN UINT16 HobLenght)
Definition: Hob.c:101
EFI_STATUS EFIAPI FfsFindFileByName(IN CONST EFI_GUID *FileName, IN CONST EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
Definition: HobLib.c:215
VOID *EFIAPI BuildGuidDataHob(IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN DataLength)
Definition: HobLib.c:375
VOID *EFIAPI AllocatePages(IN UINTN Pages)
EFI_STATUS EFIAPI FfsFindNextVolume(IN UINTN Instance, IN OUT EFI_PEI_FV_HANDLE *VolumeHandle)
Definition: FwVol.c:567
VOID EFIAPI BuildModuleHob(IN CONST EFI_GUID *ModuleName, IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, IN UINT64 ModuleLength, IN EFI_PHYSICAL_ADDRESS EntryPoint)
Definition: HobLib.c:269
VOID EFIAPI BuildCpuHob(IN UINT8 SizeOfMemorySpace, IN UINT8 SizeOfIoSpace)
Definition: HobLib.c:520
EFI_STATUS EFIAPI FfsAnyFvFindFirstFile(IN EFI_FV_FILETYPE FileType, OUT EFI_PEI_FV_HANDLE *VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
Definition: FwVol.c:771
VOID EFIAPI BuildResourceDescriptorHob(IN EFI_RESOURCE_TYPE ResourceType, IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute, IN EFI_PHYSICAL_ADDRESS PhysicalStart, IN UINT64 NumberOfBytes)
Definition: HobLib.c:299
EFI_STATUS EFIAPI FfsProcessFvFile(IN EFI_PEI_FILE_HANDLE FvFileHandle)
Definition: FwVol.c:813
VOID EFIAPI BuildFvHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:404
VOID *EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
Definition: HobLib.c:336
EFI_BOOT_MODE EFIAPI GetBootMode(VOID)
Definition: Hob.c:344
VOID EFIAPI BuildBspStoreHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
Definition: HobLib.c:573
EFI_STATUS EFIAPI FfsFindNextFile(IN EFI_FV_FILETYPE SearchType, IN EFI_PEI_FV_HANDLE VolumeHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle)
Definition: FwVol.c:545
EFI_STATUS EFIAPI FfsGetVolumeInfo(IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo)
Definition: FwVol.c:720
EFI_STATUS(EFIAPI * FFS_CHECK_SECTION_HOOK)(IN EFI_COMMON_SECTION_HEADER *Section)
Definition: PrePiLib.h:61
VOID UpdateStackHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: Hob.c:731
VOID EFIAPI BuildMemoryAllocationHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
Definition: HobLib.c:601
VOID *EFIAPI GetNextHob(IN UINT16 Type, IN CONST VOID *HobStart)
Definition: HobLib.c:103
VOID *EFIAPI AllocateRuntimePages(IN UINTN Pages)
EFI_STATUS EFIAPI LoadPeCoffImage(IN VOID *PeCoffImage, OUT EFI_PHYSICAL_ADDRESS *ImageAddress, OUT UINT64 *ImageSize, OUT EFI_PHYSICAL_ADDRESS *EntryPoint)
Definition: PrePiLib.c:59
VOID EFIAPI BuildCvHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:494
VOID *EFIAPI GetNextGuidHob(IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart)
Definition: HobLib.c:176
VOID *EFIAPI GetHobList(VOID)
Definition: HobLib.c:76
EFI_STATUS EFIAPI FfsGetFileInfo(IN CONST EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo)
VOID EFIAPI BuildStackHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:546
VOID EFIAPI BuildFvHobs(IN EFI_PHYSICAL_ADDRESS PhysicalStart, IN UINT64 NumberOfBytes, IN EFI_RESOURCE_ATTRIBUTE_TYPE *ResourceAttribute OPTIONAL)
EFI_FILE_INFO * FileInfo(IN EFI_FILE_HANDLE FHand)
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
EFI_MEMORY_TYPE
Definition: Base.h:213