]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/RegisterFilterLib.h
2 Public include file for the Port IO/MMIO/MSR RegisterFilterLib.
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef REGISTER_FILTER_LIB_H_
11 #define REGISTER_FILTER_LIB_H_
21 Filter IO read operation before read IO port.
22 It is used to filter IO read operation.
24 It will return the flag to decide whether require read real IO port.
25 It can be used for emulation environment.
27 @param[in] Width Signifies the width of the I/O operation.
28 @param[in] Address The base address of the I/O operation.
29 @param[in] Buffer The destination buffer to store the results.
31 @retval TRUE Need to excute the IO read.
32 @retval FALSE Skip the IO read.
38 IN FILTER_IO_WIDTH Width
,
44 Trace IO read operation after read IO port.
45 It is used to trace IO operation.
47 @param[in] Width Signifies the width of the I/O operation.
48 @param[in] Address The base address of the I/O operation.
49 @param[in] Buffer The destination buffer to store the results.
55 IN FILTER_IO_WIDTH Width
,
61 Filter IO Write operation before wirte IO port.
62 It is used to filter IO operation.
64 It will return the flag to decide whether require read write IO port.
65 It can be used for emulation environment.
67 @param[in] Width Signifies the width of the I/O operation.
68 @param[in] Address The base address of the I/O operation.
69 @param[in] Buffer The source buffer from which to BeforeWrite data.
71 @retval TRUE Need to excute the IO write.
72 @retval FALSE Skip the IO write.
78 IN FILTER_IO_WIDTH Width
,
84 Trace IO Write operation after wirte IO port.
85 It is used to trace IO operation.
87 @param[in] Width Signifies the width of the I/O operation.
88 @param[in] Address The base address of the I/O operation.
89 @param[in] Buffer The source buffer from which to BeforeWrite data.
95 IN FILTER_IO_WIDTH Width
,
101 Filter memory IO before Read operation.
103 It will return the flag to decide whether require read real MMIO.
104 It can be used for emulation environment.
106 @param[in] Width Signifies the width of the memory I/O operation.
107 @param[in] Address The base address of the memory I/O operation.
108 @param[in] Buffer The destination buffer to store the results.
110 @retval TRUE Need to excute the MMIO read.
111 @retval FALSE Skip the MMIO read.
116 FilterBeforeMmIoRead (
117 IN FILTER_IO_WIDTH Width
,
123 Tracer memory IO after read operation
125 @param[in] Width Signifies the width of the memory I/O operation.
126 @param[in] Address The base address of the memory I/O operation.
127 @param[in] Buffer The destination buffer to store the results.
132 FilterAfterMmIoRead (
133 IN FILTER_IO_WIDTH Width
,
139 Filter memory IO before write operation
141 It will return the flag to decide whether require wirte real MMIO.
142 It can be used for emulation environment.
144 @param[in] Width Signifies the width of the memory I/O operation.
145 @param[in] Address The base address of the memory I/O operation.
146 @param[in] Buffer The source buffer from which to BeforeWrite data.
148 @retval TRUE Need to excute the MMIO write.
149 @retval FALSE Skip the MMIO write.
154 FilterBeforeMmIoWrite (
155 IN FILTER_IO_WIDTH Width
,
161 Tracer memory IO after write operation
163 @param[in] Width Signifies the width of the memory I/O operation.
164 @param[in] Address The base address of the memory I/O operation.
165 @param[in] Buffer The source buffer from which to BeforeWrite data.
170 FilterAfterMmIoWrite (
171 IN FILTER_IO_WIDTH Width
,
177 Filter MSR before read operation.
179 It will return the flag to decide whether require read real MSR.
180 It can be used for emulation environment.
182 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
183 @param Value The 64-bit value to BeforeRead from the Machine Specific Register.
185 @retval TRUE Need to excute the MSR read.
186 @retval FALSE Skip the MSR read.
191 FilterBeforeMsrRead (
197 Trace MSR after read operation
199 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
200 @param Value The 64-bit value to BeforeRead from the Machine Specific Register.
211 Filter MSR before write operation
213 It will return the flag to decide whether require write real MSR.
214 It can be used for emulation environment.
216 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
217 @param Value The 64-bit value to BeforeWrite to the Machine Specific Register.
219 @retval TRUE Need to excute the MSR write.
220 @retval FALSE Skip the MSR write.
225 FilterBeforeMsrWrite (
231 Trace MSR after write operation
233 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
234 @param Value The 64-bit value to BeforeWrite to the Machine Specific Register.
239 FilterAfterMsrWrite (
244 #endif // REGISTER_FILTER_LIB_H_