TianoCore EDK2 master
Loading...
Searching...
No Matches
MockHobLib.h
Go to the documentation of this file.
1
8#ifndef MOCK_HOB_LIB_H_
9#define MOCK_HOB_LIB_H_
10
13extern "C" {
14 #include <Pi/PiMultiPhase.h>
15 #include <Uefi.h>
16 #include <Library/HobLib.h>
17}
18
19struct MockHobLib {
20 MOCK_INTERFACE_DECLARATION (MockHobLib);
21
22 MOCK_FUNCTION_DECLARATION (
23 VOID *,
25 ()
26 );
27 MOCK_FUNCTION_DECLARATION (
28 VOID *,
30 (IN UINT16 Type,
31 IN CONST VOID *HobStart)
32 );
33 MOCK_FUNCTION_DECLARATION (
34 VOID *,
36 (IN UINT16 Type)
37 );
38 MOCK_FUNCTION_DECLARATION (
39 VOID *,
41 (IN CONST EFI_GUID *Guid,
42 IN CONST VOID *HobStart)
43 );
44 MOCK_FUNCTION_DECLARATION (
45 VOID *,
47 (IN CONST EFI_GUID *Guid)
48 );
49 MOCK_FUNCTION_DECLARATION (
52 ()
53 );
54 MOCK_FUNCTION_DECLARATION (
55 VOID,
57 (IN CONST EFI_GUID *ModuleName,
58 IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
59 IN UINT64 ModuleLength,
60 IN EFI_PHYSICAL_ADDRESS EntryPoint)
61 );
62 MOCK_FUNCTION_DECLARATION (
63 VOID,
65 (IN EFI_RESOURCE_TYPE ResourceType,
66 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
67 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
68 IN UINT64 NumberOfBytes,
69 IN EFI_GUID *OwnerGUID)
70 );
71 MOCK_FUNCTION_DECLARATION (
72 VOID,
74 (IN EFI_RESOURCE_TYPE ResourceType,
75 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
76 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
77 IN UINT64 NumberOfBytes)
78 );
79 MOCK_FUNCTION_DECLARATION (
80 VOID *,
82 (IN CONST EFI_GUID *Guid,
83 IN UINTN DataLength)
84 );
85 MOCK_FUNCTION_DECLARATION (
86 VOID *,
88 (IN CONST EFI_GUID *Guid,
89 IN VOID *Data,
90 IN UINTN DataLength)
91 );
92 MOCK_FUNCTION_DECLARATION (
93 VOID,
95 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
96 IN UINT64 Length)
97 );
98 MOCK_FUNCTION_DECLARATION (
99 VOID,
101 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
102 IN UINT64 Length,
103 IN CONST EFI_GUID *FvName,
104 IN CONST EFI_GUID *FileName)
105 );
106 MOCK_FUNCTION_DECLARATION (
107 VOID,
109 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
110 IN UINT64 Length,
111 IN UINT32 AuthenticationStatus,
112 IN BOOLEAN ExtractedFv,
113 IN CONST EFI_GUID *FvName OPTIONAL,
114 IN CONST EFI_GUID *FileName OPTIONAL)
115 );
116 MOCK_FUNCTION_DECLARATION (
117 VOID,
119 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
120 IN UINT64 Length)
121 );
122 MOCK_FUNCTION_DECLARATION (
123 VOID,
125 (IN UINT8 SizeOfMemorySpace,
126 IN UINT8 SizeOfIoSpace)
127 );
128 MOCK_FUNCTION_DECLARATION (
129 VOID,
131 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
132 IN UINT64 Length)
133 );
134 MOCK_FUNCTION_DECLARATION (
135 VOID,
137 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
138 IN UINT64 Length,
139 IN EFI_MEMORY_TYPE MemoryType)
140 );
141 MOCK_FUNCTION_DECLARATION (
142 VOID,
144 (IN EFI_PHYSICAL_ADDRESS BaseAddress,
145 IN UINT64 Length,
146 IN EFI_MEMORY_TYPE MemoryType)
147 );
148};
149
150#endif
UINT64 UINTN
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
VOID *EFIAPI GetFirstHob(IN UINT16 Type)
Definition: HobLib.c:142
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 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
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
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
VOID EFIAPI BuildBspStoreHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
Definition: HobLib.c:573
VOID EFIAPI BuildFv3Hob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT32 AuthenticationStatus, IN BOOLEAN ExtractedFv, IN CONST EFI_GUID *FvName OPTIONAL, IN CONST EFI_GUID *FileName OPTIONAL)
Definition: HobLib.c:466
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 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
VOID EFIAPI BuildStackHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:546
EFI_BOOT_MODE EFIAPI GetBootModeHob(VOID)
Definition: HobLib.c:240
VOID EFIAPI BuildResourceDescriptorWithOwnerHob(IN EFI_RESOURCE_TYPE ResourceType, IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute, IN EFI_PHYSICAL_ADDRESS PhysicalStart, IN UINT64 NumberOfBytes, IN EFI_GUID *OwnerGUID)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
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
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
EFI_MEMORY_TYPE
Definition: Base.h:213