TianoCore EDK2 master
Loading...
Searching...
No Matches
MockPeiServicesLib.h
Go to the documentation of this file.
1
8#ifndef MOCK_PEI_SERVICES_LIB_H_
9#define MOCK_PEI_SERVICES_LIB_H_
10
13extern "C" {
14 #include <PiPei.h>
15 #include <Uefi.h>
17}
18
20 MOCK_INTERFACE_DECLARATION (MockPeiServicesLib);
21
22 MOCK_FUNCTION_DECLARATION (
26 );
27 MOCK_FUNCTION_DECLARATION (
32 );
33 MOCK_FUNCTION_DECLARATION (
36 (IN CONST EFI_GUID *Guid,
37 IN UINTN Instance,
38 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL,
39 IN OUT VOID **Ppi)
40 );
41 MOCK_FUNCTION_DECLARATION (
45 );
46 MOCK_FUNCTION_DECLARATION (
49 (OUT EFI_BOOT_MODE *BootMode)
50 );
51 MOCK_FUNCTION_DECLARATION (
54 (IN EFI_BOOT_MODE BootMode)
55 );
56 MOCK_FUNCTION_DECLARATION (
59 (OUT VOID **HobList)
60 );
61 MOCK_FUNCTION_DECLARATION (
64 (IN UINT16 Type,
65 IN UINT16 Length,
66 OUT VOID **Hob)
67 );
68 MOCK_FUNCTION_DECLARATION (
71 (IN UINTN Instance,
72 IN OUT EFI_PEI_FV_HANDLE *VolumeHandle)
73 );
74 MOCK_FUNCTION_DECLARATION (
77 (IN EFI_FV_FILETYPE SearchType,
78 IN EFI_PEI_FV_HANDLE VolumeHandle,
79 IN OUT EFI_PEI_FILE_HANDLE *FileHandle)
80 );
81 MOCK_FUNCTION_DECLARATION (
84 (IN EFI_SECTION_TYPE SectionType,
85 IN EFI_PEI_FILE_HANDLE FileHandle,
86 OUT VOID **SectionData)
87 );
88 MOCK_FUNCTION_DECLARATION (
91 (IN EFI_SECTION_TYPE SectionType,
92 IN UINTN SectionInstance,
93 IN EFI_PEI_FILE_HANDLE FileHandle,
94 OUT VOID **SectionData,
95 OUT UINT32 *AuthenticationStatus)
96 );
97 MOCK_FUNCTION_DECLARATION (
100 (IN EFI_PHYSICAL_ADDRESS MemoryBegin,
101 IN UINT64 MemoryLength)
102 );
103 MOCK_FUNCTION_DECLARATION (
106 (IN EFI_MEMORY_TYPE MemoryType,
107 IN UINTN Pages,
109 );
110 MOCK_FUNCTION_DECLARATION (
113 (IN EFI_PHYSICAL_ADDRESS Memory,
114 IN UINTN Pages)
115 );
116 MOCK_FUNCTION_DECLARATION (
119 (IN UINTN Size,
120 OUT VOID **Buffer)
121 );
122 MOCK_FUNCTION_DECLARATION (
125 ()
126 );
127 MOCK_FUNCTION_DECLARATION (
130 (IN CONST EFI_GUID *FileName,
131 IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
132 OUT EFI_PEI_FILE_HANDLE *FileHandle)
133 );
134
135 MOCK_FUNCTION_DECLARATION (
138 (IN CONST EFI_PEI_FILE_HANDLE FileHandle,
140 );
141 MOCK_FUNCTION_DECLARATION (
144 (IN CONST EFI_PEI_FILE_HANDLE FileHandle,
146 );
147 MOCK_FUNCTION_DECLARATION (
150 (IN EFI_PEI_FV_HANDLE VolumeHandle,
151 OUT EFI_FV_INFO *VolumeInfo)
152 );
153
154 MOCK_FUNCTION_DECLARATION (
157 (IN EFI_PEI_FILE_HANDLE FileHandle)
158 );
159 MOCK_FUNCTION_DECLARATION (
160 VOID,
162 (IN CONST EFI_GUID *FvFormat OPTIONAL,
163 IN CONST VOID *FvInfo,
164 IN UINT32 FvInfoSize,
165 IN CONST EFI_GUID *ParentFvName OPTIONAL,
166 IN CONST EFI_GUID *ParentFileName OPTIONAL)
167 );
168
169 MOCK_FUNCTION_DECLARATION (
170 VOID,
172 (IN CONST EFI_GUID *FvFormat OPTIONAL,
173 IN CONST VOID *FvInfo,
174 IN UINT32 FvInfoSize,
175 IN CONST EFI_GUID *ParentFvName OPTIONAL,
176 IN CONST EFI_GUID *ParentFileName OPTIONAL,
177 IN UINT32 AuthenticationStatus)
178 );
179 MOCK_FUNCTION_DECLARATION (
180 VOID,
182 (IN EFI_RESET_TYPE ResetType,
183 IN EFI_STATUS ResetStatus,
184 IN UINTN DataSize,
185 IN VOID *ResetData OPTIONAL)
186 );
187};
188
189#endif
UINT64 UINTN
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)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS EFIAPI PeiServicesFfsGetFileInfo2(IN CONST EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo)
EFI_STATUS EFIAPI PeiServicesFreePages(IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages)
VOID EFIAPI PeiServicesInstallFvInfo2Ppi(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, IN UINT32 AuthenticationStatus)
VOID EFIAPI PeiServicesResetSystem2(IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN VOID *ResetData OPTIONAL)
EFI_STATUS EFIAPI PeiServicesFfsFindSectionData3(IN EFI_SECTION_TYPE SectionType, IN UINTN SectionInstance, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData, OUT UINT32 *AuthenticationStatus)
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
EFI_MEMORY_TYPE
EFI_RESET_TYPE
Definition: Base.h:213