]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / RegisterFilterLibNull / RegisterFilterLibNull.c
CommitLineData
1c11e7a2
DB
1/** @file\r
2 Null instance of RegisterFilterLib.\r
3\r
4 Copyright (c) 2021 Intel Corporation. All rights reserved.<BR>\r
5\r
6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8**/\r
9\r
10#include <Library/RegisterFilterLib.h>\r
11\r
12/**\r
13 Filter IO read operation before read IO port.\r
14 It is used to filter IO read operation.\r
15\r
16 It will return the flag to decide whether require read real IO port.\r
17 It can be used for emulation environment.\r
18\r
19 @param[in] Width Signifies the width of the I/O operation.\r
20 @param[in] Address The base address of the I/O operation.\r
21 @param[in,out] Buffer The destination buffer to store the results.\r
22\r
23 @retval TRUE Need to excute the IO read.\r
24 @retval FALSE Skip the IO read.\r
25\r
26**/\r
27BOOLEAN\r
28EFIAPI\r
29FilterBeforeIoRead (\r
30 IN FILTER_IO_WIDTH Width,\r
31 IN UINTN Address,\r
32 IN OUT VOID *Buffer\r
33 )\r
34{\r
35 return TRUE;\r
36}\r
37\r
38/**\r
39 Trace IO read operation after read IO port.\r
40 It is used to trace IO operation.\r
41\r
42 @param[in] Width Signifies the width of the I/O operation.\r
43 @param[in] Address The base address of the I/O operation.\r
44 @param[in] Buffer The destination buffer to store the results.\r
45\r
46**/\r
47VOID\r
48EFIAPI\r
49FilterAfterIoRead (\r
50 IN FILTER_IO_WIDTH Width,\r
51 IN UINTN Address,\r
52 IN VOID *Buffer\r
53 )\r
54{\r
55 return;\r
56}\r
57\r
58/**\r
59 Filter IO Write operation before wirte IO port.\r
60 It is used to filter IO operation.\r
61\r
62 It will return the flag to decide whether require read write IO port.\r
63 It can be used for emulation environment.\r
64\r
65 @param[in] Width Signifies the width of the I/O operation.\r
66 @param[in] Address The base address of the I/O operation.\r
67 @param[in] Buffer The source buffer from which to write data.\r
68\r
69 @retval TRUE Need to excute the IO write.\r
70 @retval FALSE Skip the IO write.\r
71\r
72**/\r
73BOOLEAN\r
74EFIAPI\r
75FilterBeforeIoWrite (\r
76 IN FILTER_IO_WIDTH Width,\r
77 IN UINTN Address,\r
78 IN VOID *Buffer\r
79 )\r
80{\r
81 return TRUE;\r
82}\r
83\r
2f88bd3a
MK
84/**\r
85Trace IO Write operation after wirte IO port.\r
86It is used to trace IO operation.\r
1c11e7a2 87\r
2f88bd3a
MK
88@param[in] Width Signifies the width of the I/O operation.\r
89@param[in] Address The base address of the I/O operation.\r
90@param[in] Buffer The source buffer from which to Write data.\r
1c11e7a2
DB
91\r
92**/\r
93VOID\r
94EFIAPI\r
95FilterAfterIoWrite (\r
96 IN FILTER_IO_WIDTH Width,\r
97 IN UINTN Address,\r
98 IN VOID *Buffer\r
99 )\r
100{\r
101 return;\r
102}\r
103\r
104/**\r
105 Filter memory IO before Read operation.\r
106\r
107 It will return the flag to decide whether require read real MMIO.\r
108 It can be used for emulation environment.\r
109\r
110 @param[in] Width Signifies the width of the memory I/O operation.\r
111 @param[in] Address The base address of the memory I/O operation.\r
112 @param[in,out] Buffer The destination buffer to store the results.\r
113\r
114 @retval TRUE Need to excute the MMIO read.\r
115 @retval FALSE Skip the MMIO read.\r
116\r
117**/\r
118BOOLEAN\r
119EFIAPI\r
120FilterBeforeMmIoRead (\r
121 IN FILTER_IO_WIDTH Width,\r
122 IN UINTN Address,\r
123 IN OUT VOID *Buffer\r
124 )\r
125{\r
126 return TRUE;\r
127}\r
128\r
129/**\r
130 Tracer memory IO after read operation.\r
131\r
132 @param[in] Width Signifies the width of the memory I/O operation.\r
133 @param[in] Address The base address of the memory I/O operation.\r
134 @param[in] Buffer The destination buffer to store the results.\r
135\r
136**/\r
137VOID\r
138EFIAPI\r
139FilterAfterMmIoRead (\r
140 IN FILTER_IO_WIDTH Width,\r
141 IN UINTN Address,\r
142 IN VOID *Buffer\r
143 )\r
144{\r
145 return;\r
146}\r
147\r
148/**\r
149 Filter memory IO before write operation.\r
150\r
151 It will return the flag to decide whether require wirte real MMIO.\r
152 It can be used for emulation environment.\r
153\r
154 @param[in] Width Signifies the width of the memory I/O operation.\r
155 @param[in] Address The base address of the memory I/O operation.\r
156 @param[in] Buffer The source buffer from which to write data.\r
157\r
158 @retval TRUE Need to excute the MMIO write.\r
159 @retval FALSE Skip the MMIO write.\r
160\r
161**/\r
162BOOLEAN\r
163EFIAPI\r
164FilterBeforeMmIoWrite (\r
165 IN FILTER_IO_WIDTH Width,\r
166 IN UINTN Address,\r
167 IN VOID *Buffer\r
168 )\r
169{\r
170 return TRUE;\r
171}\r
172\r
173/**\r
174 Tracer memory IO after write operation.\r
175\r
176 @param[in] Width Signifies the width of the memory I/O operation.\r
177 @param[in] Address The base address of the memory I/O operation.\r
178 @param[in] Buffer The source buffer from which to write data.\r
179\r
180**/\r
181VOID\r
182EFIAPI\r
183FilterAfterMmIoWrite (\r
184 IN FILTER_IO_WIDTH Width,\r
185 IN UINTN Address,\r
186 IN VOID *Buffer\r
187 )\r
188{\r
189 return;\r
190}\r
191\r
192/**\r
193 Filter MSR before read operation.\r
194\r
195 It will return the flag to decide whether require read real MSR.\r
196 It can be used for emulation environment.\r
197\r
198 @param Index The Register index of the MSR.\r
199 @param Value Point to the data will be read from the MSR.\r
200\r
201 @retval TRUE Need to excute the MSR read.\r
202 @retval FALSE Skip the MSR read.\r
203\r
204**/\r
205BOOLEAN\r
206EFIAPI\r
207FilterBeforeMsrRead (\r
2f88bd3a
MK
208 IN UINT32 Index,\r
209 IN OUT UINT64 *Value\r
1c11e7a2
DB
210 )\r
211{\r
212 return TRUE;\r
213}\r
214\r
215/**\r
216 Trace MSR after read operation.\r
217\r
218 @param Index The Register index of the MSR.\r
219 @param Value Point to the data has been be read from the MSR.\r
220\r
221**/\r
222VOID\r
223EFIAPI\r
224FilterAfterMsrRead (\r
2f88bd3a
MK
225 IN UINT32 Index,\r
226 IN UINT64 *Value\r
1c11e7a2
DB
227 )\r
228{\r
229 return;\r
230}\r
231\r
232/**\r
233 Filter MSR before write operation.\r
234\r
235 It will return the flag to decide whether require write real MSR.\r
236 It can be used for emulation environment.\r
237\r
238 @param Index The Register index of the MSR.\r
239 @param Value Point to the data want to be written to the MSR.\r
240\r
241 @retval TRUE Need to excute the MSR write.\r
242 @retval FALSE Skip the MSR write.\r
243\r
244**/\r
245BOOLEAN\r
246EFIAPI\r
247FilterBeforeMsrWrite (\r
2f88bd3a
MK
248 IN UINT32 Index,\r
249 IN UINT64 *Value\r
1c11e7a2
DB
250 )\r
251{\r
252 return TRUE;\r
253}\r
254\r
255/**\r
256 Trace MSR after write operation.\r
257\r
258 @param Index The Register index of the MSR.\r
259 @param Value Point to the data has been be written to the MSR.\r
260\r
261**/\r
262VOID\r
263EFIAPI\r
264FilterAfterMsrWrite (\r
2f88bd3a
MK
265 IN UINT32 Index,\r
266 IN UINT64 *Value\r
1c11e7a2
DB
267 )\r
268{\r
269 return;\r
270}\r