TianoCore EDK2 master
Loading...
Searching...
No Matches
MockSmmServicesTableLib.h
Go to the documentation of this file.
1
8#ifndef MOCK_SMM_SERVICES_TABLE_LIB_H_
9#define MOCK_SMM_SERVICES_TABLE_LIB_H_
10
13extern "C" {
14 #include <Uefi.h>
16}
17
18//
19// Declarations to handle usage of the SmmServicesTableLib by creating mock
20//
22 MOCK_INTERFACE_DECLARATION (MockSmmServicesTableLib);
23
24 MOCK_FUNCTION_DECLARATION (
26 gSmst_SmmAllocatePool,
27 (
28 IN EFI_MEMORY_TYPE PoolType,
29 IN UINTN Size,
30 OUT VOID **Buffer
31 )
32 );
33
34 MOCK_FUNCTION_DECLARATION (
36 gSmst_SmmFreePool,
37 (
38 IN VOID *Buffer
39 )
40 );
41
42 MOCK_FUNCTION_DECLARATION (
44 gSmst_SmmAllocatePages,
45 (
47 IN EFI_MEMORY_TYPE MemoryType,
48 IN UINTN Pages,
50 )
51 );
52
53 MOCK_FUNCTION_DECLARATION (
55 gSmst_SmmFreePages,
56 (
58 IN UINTN Pages
59 )
60 );
61
62 // MP service
63 MOCK_FUNCTION_DECLARATION (
65 gSmst_SmmStartupThisAp,
66 (
67 IN EFI_AP_PROCEDURE Procedure,
68 IN UINTN CpuNumber,
69 IN OUT VOID *ProcArguments OPTIONAL
70 )
71 );
72
73 MOCK_FUNCTION_DECLARATION (
75 gSmst_SmmInstallProtocolInterface,
76 (
77 IN OUT EFI_HANDLE *Handle,
78 IN EFI_GUID *Protocol,
79 IN EFI_INTERFACE_TYPE InterfaceType,
80 IN VOID *Interface
81 )
82 );
83
84 MOCK_FUNCTION_DECLARATION (
86 gSmst_SmmUninstallProtocolInterface,
87 (
88 IN EFI_HANDLE Handle,
89 IN EFI_GUID *Protocol,
90 IN VOID *Interface
91 )
92 );
93
94 MOCK_FUNCTION_DECLARATION (
96 gSmst_SmmHandleProtocol,
97 (
98 IN EFI_HANDLE Handle,
99 IN EFI_GUID *Protocol,
100 OUT VOID **Interface
101 )
102 );
103
104 MOCK_FUNCTION_DECLARATION (
106 gSmst_SmmRegisterProtocolNotify,
107 (
108 IN CONST EFI_GUID *Protocol,
109 IN EFI_MM_NOTIFY_FN Function,
110 OUT VOID **Registration
111 )
112 );
113
114 MOCK_FUNCTION_DECLARATION (
116 gSmst_SmmLocateHandle,
117 (
118 IN EFI_LOCATE_SEARCH_TYPE SearchType,
119 IN EFI_GUID *Protocol,
120 IN VOID *SearchKey,
121 IN OUT UINTN *BufferSize,
122 OUT EFI_HANDLE *Buffer
123 )
124 );
125
126 MOCK_FUNCTION_DECLARATION (
128 gSmst_SmmLocateProtocol,
129 (
130 IN EFI_GUID *Protocol,
131 IN VOID *Registration OPTIONAL,
132 OUT VOID **Interface
133 )
134 );
135
136 MOCK_FUNCTION_DECLARATION (
138 gSmst_SmiManage,
139 (
140 IN CONST EFI_GUID *HandlerType,
141 IN CONST VOID *Context,
142 IN OUT VOID *CommBuffer,
143 IN OUT UINTN *CommBufferSize
144 )
145 );
146
147 MOCK_FUNCTION_DECLARATION (
149 gSmst_SmmInterruptRegister,
150 (
151 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
152 IN CONST EFI_GUID *HandlerType,
153 OUT EFI_HANDLE *DispatchHandle
154 )
155 );
156
157 MOCK_FUNCTION_DECLARATION (
159 gSmst_SmmInterruptUnRegister,
160 (
161 IN EFI_HANDLE DispatchHandle
162 )
163 );
164};
165
166#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_MM_NOTIFY_FN)(IN CONST EFI_GUID *Protocol, IN VOID *Interface, IN EFI_HANDLE Handle)
Definition: PiMmCis.h:88
VOID(EFIAPI * EFI_AP_PROCEDURE)(IN OUT VOID *Buffer)
Definition: PiMultiPhase.h:198
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_MEMORY_TYPE
EFI_INTERFACE_TYPE
Definition: UefiSpec.h:1189
EFI_LOCATE_SEARCH_TYPE
Definition: UefiSpec.h:1505
EFI_ALLOCATE_TYPE
Definition: UefiSpec.h:29
Definition: Base.h:213