TianoCore EDK2 master
Loading...
Searching...
No Matches
PeiServicesLib.c
Go to the documentation of this file.
1
9#include <PiPei.h>
10#include <Library/EmuMagicPageLib.h>
12#include <Library/DebugLib.h>
14
16SecFfsFindNextFile (
17 IN EFI_FV_FILETYPE SearchType,
18 IN EFI_PEI_FV_HANDLE VolumeHandle,
19 IN OUT EFI_PEI_FILE_HANDLE *FileHandle
20 );
21
23SecFfsFindSectionData (
24 IN EFI_SECTION_TYPE SectionType,
25 IN EFI_PEI_FILE_HANDLE FileHandle,
26 OUT VOID **SectionData
27 );
28
42EFIAPI
45 )
46{
47 ASSERT (FALSE);
48 return EFI_OUT_OF_RESOURCES;
49}
50
67EFIAPI
71 )
72{
73 ASSERT (FALSE);
74 return EFI_OUT_OF_RESOURCES;
75}
76
94EFIAPI
96 IN CONST EFI_GUID *Guid,
97 IN UINTN Instance,
98 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
99 IN OUT VOID **Ppi
100 )
101{
102 EFI_PEI_PPI_DESCRIPTOR *PpiList;
103
104 if (Instance != 0) {
105 return EFI_NOT_FOUND;
106 }
107
108 for (PpiList = EMU_MAGIC_PAGE ()->PpiList; ; PpiList++) {
109 if (CompareGuid (PpiList->Guid, Guid)) {
110 if (PpiDescriptor != NULL) {
111 *PpiDescriptor = PpiList;
112 }
113
114 if (Ppi != NULL) {
115 *Ppi = PpiList->Ppi;
116 }
117
118 return EFI_SUCCESS;
119 }
120
121 if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) == EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {
122 break;
123 }
124 }
125
126 return EFI_NOT_FOUND;
127}
128
145EFIAPI
148 )
149{
150 ASSERT (FALSE);
151 return EFI_OUT_OF_RESOURCES;
152}
153
164EFIAPI
166 OUT EFI_BOOT_MODE *BootMode
167 )
168{
169 ASSERT (FALSE);
170 return EFI_OUT_OF_RESOURCES;
171}
172
182EFIAPI
184 IN EFI_BOOT_MODE BootMode
185 )
186{
187 ASSERT (FALSE);
188 return EFI_OUT_OF_RESOURCES;
189}
190
202EFIAPI
204 OUT VOID **HobList
205 )
206{
207 ASSERT (FALSE);
208 return EFI_OUT_OF_RESOURCES;
209}
210
224EFIAPI
226 IN UINT16 Type,
227 IN UINT16 Length,
228 OUT VOID **Hob
229 )
230{
231 ASSERT (FALSE);
232 return EFI_OUT_OF_RESOURCES;
233}
234
249EFIAPI
251 IN UINTN Instance,
252 IN OUT EFI_PEI_FV_HANDLE *VolumeHandle
253 )
254{
255 ASSERT (FALSE);
256 return EFI_OUT_OF_RESOURCES;
257}
258
274EFIAPI
276 IN EFI_FV_FILETYPE SearchType,
277 IN EFI_PEI_FV_HANDLE VolumeHandle,
278 IN OUT EFI_PEI_FILE_HANDLE *FileHandle
279 )
280{
281 return SecFfsFindNextFile (SearchType, VolumeHandle, FileHandle);
282}
283
297EFIAPI
299 IN EFI_SECTION_TYPE SectionType,
300 IN EFI_PEI_FILE_HANDLE FileHandle,
301 OUT VOID **SectionData
302 )
303{
304 return SecFfsFindSectionData (SectionType, FileHandle, SectionData);
305}
306
320EFIAPI
322 IN EFI_PHYSICAL_ADDRESS MemoryBegin,
323 IN UINT64 MemoryLength
324 )
325{
326 ASSERT (FALSE);
327 return EFI_OUT_OF_RESOURCES;
328}
329
345EFIAPI
347 IN EFI_MEMORY_TYPE MemoryType,
348 IN UINTN Pages,
350 )
351{
352 ASSERT (FALSE);
353 return EFI_OUT_OF_RESOURCES;
354}
355
368EFIAPI
370 IN UINTN Size,
371 OUT VOID **Buffer
372 )
373{
374 ASSERT (FALSE);
375 return EFI_OUT_OF_RESOURCES;
376}
377
386EFIAPI
388 VOID
389 )
390{
391 ASSERT (FALSE);
392 return EFI_OUT_OF_RESOURCES;
393}
394
413EFIAPI
415 IN EFI_PEI_FILE_HANDLE FileHandle
416 )
417{
418 ASSERT (FALSE);
419 return EFI_OUT_OF_RESOURCES;
420}
421
441EFIAPI
443 IN CONST EFI_PEI_FILE_HANDLE FileHandle,
445 )
446{
447 ASSERT (FALSE);
448 return EFI_OUT_OF_RESOURCES;
449}
450
473EFIAPI
475 IN CONST EFI_GUID *FileName,
476 IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
477 OUT EFI_PEI_FILE_HANDLE *FileHandle
478 )
479{
480 ASSERT (FALSE);
481 return EFI_OUT_OF_RESOURCES;
482}
483
503EFIAPI
505 IN EFI_PEI_FV_HANDLE VolumeHandle,
506 OUT EFI_FV_INFO *VolumeInfo
507 )
508{
509 ASSERT (FALSE);
510 return EFI_OUT_OF_RESOURCES;
511}
512
543VOID
544EFIAPI
546 IN CONST EFI_GUID *FvFormat OPTIONAL,
547 IN CONST VOID *FvInfo,
548 IN UINT32 FvInfoSize,
549 IN CONST EFI_GUID *ParentFvName OPTIONAL,
550 IN CONST EFI_GUID *ParentFileName OPTIONAL
551 )
552{
553 ASSERT (FALSE);
554 return;
555}
UINT64 UINTN
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: MemLibGuid.c:73
EFI_STATUS EFIAPI PeiServicesFfsGetFileInfo(IN CONST EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo)
EFI_STATUS EFIAPI PeiServicesFfsFindSectionData(IN EFI_SECTION_TYPE SectionType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
EFI_STATUS EFIAPI PeiServicesFfsFindNextVolume(IN UINTN Instance, IN OUT EFI_PEI_FV_HANDLE *VolumeHandle)
EFI_STATUS EFIAPI PeiServicesGetBootMode(OUT EFI_BOOT_MODE *BootMode)
EFI_STATUS EFIAPI PeiServicesGetHobList(OUT VOID **HobList)
EFI_STATUS EFIAPI PeiServicesAllocatePool(IN UINTN Size, OUT VOID **Buffer)
EFI_STATUS EFIAPI PeiServicesCreateHob(IN UINT16 Type, IN UINT16 Length, OUT VOID **Hob)
EFI_STATUS EFIAPI PeiServicesFfsFindNextFile(IN EFI_FV_FILETYPE SearchType, IN EFI_PEI_FV_HANDLE VolumeHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle)
VOID EFIAPI PeiServicesInstallFvInfoPpi(IN CONST EFI_GUID *FvFormat OPTIONAL, IN CONST VOID *FvInfo, IN UINT32 FvInfoSize, IN CONST EFI_GUID *ParentFvName OPTIONAL, IN CONST EFI_GUID *ParentFileName OPTIONAL)
EFI_STATUS EFIAPI PeiServicesLocatePpi(IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
EFI_STATUS EFIAPI PeiServicesFfsFindFileByName(IN CONST EFI_GUID *FileName, IN CONST EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
EFI_STATUS EFIAPI PeiServicesResetSystem(VOID)
EFI_STATUS EFIAPI PeiServicesInstallPeiMemory(IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
EFI_STATUS EFIAPI PeiServicesNotifyPpi(IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
EFI_STATUS EFIAPI PeiServicesAllocatePages(IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT EFI_PHYSICAL_ADDRESS *Memory)
EFI_STATUS EFIAPI PeiServicesInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
EFI_STATUS EFIAPI PeiServicesReInstallPpi(IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi)
EFI_STATUS EFIAPI PeiServicesSetBootMode(IN EFI_BOOT_MODE BootMode)
EFI_STATUS EFIAPI PeiServicesRegisterForShadow(IN EFI_PEI_FILE_HANDLE FileHandle)
EFI_STATUS EFIAPI PeiServicesFfsGetVolumeInfo(IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo)
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
VOID * EFI_PEI_FV_HANDLE
Definition: PiPeiCis.h:21
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
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_MEMORY_TYPE
Definition: Base.h:213