]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseIoLibIntrinsic/IoLibFifo.c
2 IoFifo read/write routines.
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "BaseIoLibIntrinsicInternal.h"
12 #include <Uefi/UefiBaseType.h>
13 #include <Library/TdxLib.h>
16 Reads an 8-bit I/O port fifo into a block of memory.
18 Reads the 8-bit I/O fifo port specified by Port.
19 The port is read Count times, and the read data is
20 stored in the provided Buffer.
22 This function must guarantee that all I/O read and write operations are
25 If 8-bit I/O port operations are not supported, then ASSERT().
27 In TDX a serial of TdIoRead8 is invoked to read the I/O port fifo.
29 @param Port The I/O port to read.
30 @param Count The number of times to read I/O port.
31 @param Buffer The buffer to store the read data into.
43 TdIoReadFifo8 (Port
, Count
, Buffer
);
45 SevIoReadFifo8 (Port
, Count
, Buffer
);
50 Writes a block of memory into an 8-bit I/O port fifo.
52 Writes the 8-bit I/O fifo port specified by Port.
53 The port is written Count times, and the write data is
54 retrieved from the provided Buffer.
56 This function must guarantee that all I/O write and write operations are
59 If 8-bit I/O port operations are not supported, then ASSERT().
61 In TDX a serial of TdIoWrite8 is invoked to write data to the I/O port.
63 @param Port The I/O port to write.
64 @param Count The number of times to write I/O port.
65 @param Buffer The buffer to retrieve the write data from.
77 TdIoWriteFifo8 (Port
, Count
, Buffer
);
79 SevIoWriteFifo8 (Port
, Count
, Buffer
);
84 Reads a 16-bit I/O port fifo into a block of memory.
86 Reads the 16-bit I/O fifo port specified by Port.
87 The port is read Count times, and the read data is
88 stored in the provided Buffer.
90 This function must guarantee that all I/O read and write operations are
93 If 16-bit I/O port operations are not supported, then ASSERT().
95 In TDX a serial of TdIoRead16 is invoked to read data from the I/O port.
97 @param Port The I/O port to read.
98 @param Count The number of times to read I/O port.
99 @param Buffer The buffer to store the read data into.
111 TdIoReadFifo16 (Port
, Count
, Buffer
);
113 SevIoReadFifo16 (Port
, Count
, Buffer
);
118 Writes a block of memory into a 16-bit I/O port fifo.
120 Writes the 16-bit I/O fifo port specified by Port.
121 The port is written Count times, and the write data is
122 retrieved from the provided Buffer.
124 This function must guarantee that all I/O write and write operations are
127 If 16-bit I/O port operations are not supported, then ASSERT().
129 In TDX a serial of TdIoWrite16 is invoked to write data to the I/O port.
131 @param Port The I/O port to write.
132 @param Count The number of times to write I/O port.
133 @param Buffer The buffer to retrieve the write data from.
145 TdIoWriteFifo16 (Port
, Count
, Buffer
);
147 SevIoWriteFifo16 (Port
, Count
, Buffer
);
152 Reads a 32-bit I/O port fifo into a block of memory.
154 Reads the 32-bit I/O fifo port specified by Port.
155 The port is read Count times, and the read data is
156 stored in the provided Buffer.
158 This function must guarantee that all I/O read and write operations are
161 If 32-bit I/O port operations are not supported, then ASSERT().
163 In TDX a serial of TdIoRead32 is invoked to read data from the I/O port.
165 @param Port The I/O port to read.
166 @param Count The number of times to read I/O port.
167 @param Buffer The buffer to store the read data into.
179 TdIoReadFifo32 (Port
, Count
, Buffer
);
181 SevIoReadFifo32 (Port
, Count
, Buffer
);
186 Writes a block of memory into a 32-bit I/O port fifo.
188 Writes the 32-bit I/O fifo port specified by Port.
189 The port is written Count times, and the write data is
190 retrieved from the provided Buffer.
192 This function must guarantee that all I/O write and write operations are
195 If 32-bit I/O port operations are not supported, then ASSERT().
197 In TDX a serial of TdIoWrite32 is invoked to write data to the I/O port.
199 @param Port The I/O port to write.
200 @param Count The number of times to write I/O port.
201 @param Buffer The buffer to retrieve the write data from.
213 TdIoWriteFifo32 (Port
, Count
, Buffer
);
215 SevIoWriteFifo32 (Port
, Count
, Buffer
);