]>
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
,
60 Filter IO Write operation before wirte IO port.
61 It is used to filter IO operation.
63 It will return the flag to decide whether require read write IO port.
64 It can be used for emulation environment.
66 @param[in] Width Signifies the width of the I/O operation.
67 @param[in] Address The base address of the I/O operation.
68 @param[in] Buffer The source buffer from which to BeforeWrite data.
70 @retval TRUE Need to excute the IO write.
71 @retval FALSE Skip the IO write.
77 IN FILTER_IO_WIDTH Width
,
83 Trace IO Write operation after wirte IO port.
84 It is used to trace IO operation.
86 @param[in] Width Signifies the width of the I/O operation.
87 @param[in] Address The base address of the I/O operation.
88 @param[in] Buffer The source buffer from which to BeforeWrite data.
94 IN FILTER_IO_WIDTH Width
,
100 Filter memory IO before Read operation.
102 It will return the flag to decide whether require read real MMIO.
103 It can be used for emulation environment.
105 @param[in] Width Signifies the width of the memory I/O operation.
106 @param[in] Address The base address of the memory I/O operation.
107 @param[in] Buffer The destination buffer to store the results.
109 @retval TRUE Need to excute the MMIO read.
110 @retval FALSE Skip the MMIO read.
115 FilterBeforeMmIoRead (
116 IN FILTER_IO_WIDTH Width
,
122 Tracer memory IO after read operation
124 @param[in] Width Signifies the width of the memory I/O operation.
125 @param[in] Address The base address of the memory I/O operation.
126 @param[in] Buffer The destination buffer to store the results.
131 FilterAfterMmIoRead (
132 IN FILTER_IO_WIDTH Width
,
138 Filter memory IO before write operation
140 It will return the flag to decide whether require wirte real MMIO.
141 It can be used for emulation environment.
143 @param[in] Width Signifies the width of the memory I/O operation.
144 @param[in] Address The base address of the memory I/O operation.
145 @param[in] Buffer The source buffer from which to BeforeWrite data.
147 @retval TRUE Need to excute the MMIO write.
148 @retval FALSE Skip the MMIO write.
153 FilterBeforeMmIoWrite (
154 IN FILTER_IO_WIDTH Width
,
160 Tracer memory IO after write operation
162 @param[in] Width Signifies the width of the memory I/O operation.
163 @param[in] Address The base address of the memory I/O operation.
164 @param[in] Buffer The source buffer from which to BeforeWrite data.
169 FilterAfterMmIoWrite (
170 IN FILTER_IO_WIDTH Width
,
176 Filter MSR before read operation.
178 It will return the flag to decide whether require read real MSR.
179 It can be used for emulation environment.
181 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
182 @param Value The 64-bit value to BeforeRead from the Machine Specific Register.
184 @retval TRUE Need to excute the MSR read.
185 @retval FALSE Skip the MSR read.
190 FilterBeforeMsrRead (
196 Trace MSR after read operation
198 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
199 @param Value The 64-bit value to BeforeRead from the Machine Specific Register.
210 Filter MSR before write operation
212 It will return the flag to decide whether require write real MSR.
213 It can be used for emulation environment.
215 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
216 @param Value The 64-bit value to BeforeWrite to the Machine Specific Register.
218 @retval TRUE Need to excute the MSR write.
219 @retval FALSE Skip the MSR write.
224 FilterBeforeMsrWrite (
230 Trace MSR after write operation
232 @param Index The 8-bit Machine Specific Register index to BeforeWrite.
233 @param Value The 64-bit value to BeforeWrite to the Machine Specific Register.
238 FilterAfterMsrWrite (
243 #endif // REGISTER_FILTER_LIB_H_