]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseIoLibIntrinsic/IoLibTdx.h
2 Header file for Tdx IO library.
4 Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 Check if it is Tdx guest.
14 @return TRUE It is Tdx guest
15 @return FALSE It is not Tdx guest
25 Reads an 8-bit I/O port.
27 TDVMCALL_IO is invoked to read I/O port.
29 @param Port The I/O port to read.
31 @return The value read.
41 Reads a 16-bit I/O port.
43 TDVMCALL_IO is invoked to write I/O port.
45 @param Port The I/O port to read.
47 @return The value read.
57 Reads a 32-bit I/O port.
59 TDVMCALL_IO is invoked to read I/O port.
61 @param Port The I/O port to read.
63 @return The value read.
73 Writes an 8-bit I/O port.
75 TDVMCALL_IO is invoked to write I/O port.
77 @param Port The I/O port to write.
78 @param Value The value to write to the I/O port.
80 @return The value written the I/O port.
91 Writes a 16-bit I/O port.
93 TDVMCALL_IO is invoked to write I/O port.
95 @param Port The I/O port to write.
96 @param Value The value to write to the I/O port.
98 @return The value written the I/O port.
109 Writes a 32-bit I/O port.
111 TDVMCALL_IO is invoked to write I/O port.
113 @param Port The I/O port to write.
114 @param Value The value to write to the I/O port.
116 @return The value written the I/O port.
127 Reads an 8-bit MMIO register.
129 TDVMCALL_MMIO is invoked to read MMIO registers.
131 @param Address The MMIO register to read.
133 @return The value read.
143 Writes an 8-bit MMIO register.
145 TDVMCALL_MMIO is invoked to read write registers.
147 @param Address The MMIO register to write.
148 @param Value The value to write to the MMIO register.
161 Reads a 16-bit MMIO register.
163 TDVMCALL_MMIO is invoked to read MMIO registers.
165 @param Address The MMIO register to read.
167 @return The value read.
177 Writes a 16-bit MMIO register.
179 TDVMCALL_MMIO is invoked to write MMIO registers.
181 @param Address The MMIO register to write.
182 @param Value The value to write to the MMIO register.
195 Reads a 32-bit MMIO register.
197 TDVMCALL_MMIO is invoked to read MMIO registers.
199 @param Address The MMIO register to read.
201 @return The value read.
211 Writes a 32-bit MMIO register.
213 TDVMCALL_MMIO is invoked to write MMIO registers.
215 @param Address The MMIO register to write.
216 @param Value The value to write to the MMIO register.
229 Reads a 64-bit MMIO register.
231 TDVMCALL_MMIO is invoked to read MMIO registers.
233 @param Address The MMIO register to read.
235 @return The value read.
245 Writes a 64-bit MMIO register.
247 TDVMCALL_MMIO is invoked to write MMIO registers.
249 @param Address The MMIO register to write.
250 @param Value The value to write to the MMIO register.
261 Reads an 8-bit I/O port fifo into a block of memory in Tdx.
263 Reads the 8-bit I/O fifo port specified by Port.
264 The port is read Count times, and the read data is
265 stored in the provided Buffer.
267 This function must guarantee that all I/O read and write operations are
270 If 8-bit I/O port operations are not supported, then ASSERT().
272 @param Port The I/O port to read.
273 @param Count The number of times to read I/O port.
274 @param Buffer The buffer to store the read data into.
286 Writes a block of memory into an 8-bit I/O port fifo in Tdx.
288 Writes the 8-bit I/O fifo port specified by Port.
289 The port is written Count times, and the write data is
290 retrieved from the provided Buffer.
292 This function must guarantee that all I/O write and write operations are
295 If 8-bit I/O port operations are not supported, then ASSERT().
297 @param Port The I/O port to write.
298 @param Count The number of times to write I/O port.
299 @param Buffer The buffer to retrieve the write data from.
311 Reads a 16-bit I/O port fifo into a block of memory in Tdx.
313 Reads the 16-bit I/O fifo port specified by Port.
314 The port is read Count times, and the read data is
315 stored in the provided Buffer.
317 This function must guarantee that all I/O read and write operations are
320 If 16-bit I/O port operations are not supported, then ASSERT().
322 @param Port The I/O port to read.
323 @param Count The number of times to read I/O port.
324 @param Buffer The buffer to store the read data into.
336 Writes a block of memory into a 16-bit I/O port fifo in Tdx.
338 Writes the 16-bit I/O fifo port specified by Port.
339 The port is written Count times, and the write data is
340 retrieved from the provided Buffer.
342 This function must guarantee that all I/O write and write operations are
345 If 16-bit I/O port operations are not supported, then ASSERT().
347 @param Port The I/O port to write.
348 @param Count The number of times to write I/O port.
349 @param Buffer The buffer to retrieve the write data from.
361 Reads a 32-bit I/O port fifo into a block of memory in Tdx.
363 Reads the 32-bit I/O fifo port specified by Port.
364 The port is read Count times, and the read data is
365 stored in the provided Buffer.
367 This function must guarantee that all I/O read and write operations are
370 If 32-bit I/O port operations are not supported, then ASSERT().
372 @param Port The I/O port to read.
373 @param Count The number of times to read I/O port.
374 @param Buffer The buffer to store the read data into.
386 Writes a block of memory into a 32-bit I/O port fifo in Tdx.
388 Writes the 32-bit I/O fifo port specified by Port.
389 The port is written Count times, and the write data is
390 retrieved from the provided Buffer.
392 This function must guarantee that all I/O write and write operations are
395 If 32-bit I/O port operations are not supported, then ASSERT().
397 @param Port The I/O port to write.
398 @param Count The number of times to write I/O port.
399 @param Buffer The buffer to retrieve the write data from.