]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseIoLibIntrinsic / IoLibEbc.c
1 /** @file
2 I/O Library for EBC.
3
4 EBC does not support port I/O. All APIs in this file ASSERT().
5
6 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
7 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
8
9 SPDX-License-Identifier: BSD-2-Clause-Patent
10
11 **/
12
13 #include "BaseIoLibIntrinsicInternal.h"
14
15 /**
16 Reads an 8-bit I/O port.
17
18 Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
19 This function must guarantee that all I/O read and write operations are
20 serialized.
21
22 If 8-bit I/O port operations are not supported, then ASSERT().
23
24 @param Port The I/O port to read.
25
26 @return The value read.
27
28 **/
29 UINT8
30 EFIAPI
31 IoRead8 (
32 IN UINTN Port
33 )
34 {
35 ASSERT (FALSE);
36 return 0;
37 }
38
39 /**
40 Writes an 8-bit I/O port.
41
42 Writes the 8-bit I/O port specified by Port with the value specified by Value
43 and returns Value. This function must guarantee that all I/O read and write
44 operations are serialized.
45
46 If 8-bit I/O port operations are not supported, then ASSERT().
47
48 @param Port The I/O port to write.
49 @param Value The value to write to the I/O port.
50
51 @return The value written to the I/O port.
52
53 **/
54 UINT8
55 EFIAPI
56 IoWrite8 (
57 IN UINTN Port,
58 IN UINT8 Value
59 )
60 {
61 ASSERT (FALSE);
62 return 0;
63 }
64
65 /**
66 Reads a 16-bit I/O port.
67
68 Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
69 This function must guarantee that all I/O read and write operations are
70 serialized.
71
72 If 16-bit I/O port operations are not supported, then ASSERT().
73 If Port is not aligned on a 16-bit boundary, then ASSERT().
74
75 @param Port The I/O port to read.
76
77 @return The value read.
78
79 **/
80 UINT16
81 EFIAPI
82 IoRead16 (
83 IN UINTN Port
84 )
85 {
86 ASSERT (FALSE);
87 return 0;
88 }
89
90 /**
91 Writes a 16-bit I/O port.
92
93 Writes the 16-bit I/O port specified by Port with the value specified by Value
94 and returns Value. This function must guarantee that all I/O read and write
95 operations are serialized.
96
97 If 16-bit I/O port operations are not supported, then ASSERT().
98 If Port is not aligned on a 16-bit boundary, then ASSERT().
99
100 @param Port The I/O port to write.
101 @param Value The value to write to the I/O port.
102
103 @return The value written to the I/O port.
104
105 **/
106 UINT16
107 EFIAPI
108 IoWrite16 (
109 IN UINTN Port,
110 IN UINT16 Value
111 )
112 {
113 ASSERT (FALSE);
114 return 0;
115 }
116
117 /**
118 Reads a 32-bit I/O port.
119
120 Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
121 This function must guarantee that all I/O read and write operations are
122 serialized.
123
124 If 32-bit I/O port operations are not supported, then ASSERT().
125 If Port is not aligned on a 32-bit boundary, then ASSERT().
126
127 @param Port The I/O port to read.
128
129 @return The value read.
130
131 **/
132 UINT32
133 EFIAPI
134 IoRead32 (
135 IN UINTN Port
136 )
137 {
138 ASSERT (FALSE);
139 return 0;
140 }
141
142 /**
143 Writes a 32-bit I/O port.
144
145 Writes the 32-bit I/O port specified by Port with the value specified by Value
146 and returns Value. This function must guarantee that all I/O read and write
147 operations are serialized.
148
149 If 32-bit I/O port operations are not supported, then ASSERT().
150 If Port is not aligned on a 32-bit boundary, then ASSERT().
151
152 @param Port The I/O port to write.
153 @param Value The value to write to the I/O port.
154
155 @return The value written to the I/O port.
156
157 **/
158 UINT32
159 EFIAPI
160 IoWrite32 (
161 IN UINTN Port,
162 IN UINT32 Value
163 )
164 {
165 ASSERT (FALSE);
166 return 0;
167 }
168
169 /**
170 Reads an 8-bit I/O port fifo into a block of memory.
171
172 Reads the 8-bit I/O fifo port specified by Port.
173 The port is read Count times, and the read data is
174 stored in the provided Buffer.
175
176 This function must guarantee that all I/O read and write operations are
177 serialized.
178
179 If 8-bit I/O port operations are not supported, then ASSERT().
180
181 @param Port The I/O port to read.
182 @param Count The number of times to read I/O port.
183 @param Buffer The buffer to store the read data into.
184
185 **/
186 VOID
187 EFIAPI
188 IoReadFifo8 (
189 IN UINTN Port,
190 IN UINTN Count,
191 OUT VOID *Buffer
192 )
193 {
194 ASSERT (FALSE);
195 }
196
197 /**
198 Writes a block of memory into an 8-bit I/O port fifo.
199
200 Writes the 8-bit I/O fifo port specified by Port.
201 The port is written Count times, and the write data is
202 retrieved from the provided Buffer.
203
204 This function must guarantee that all I/O write and write operations are
205 serialized.
206
207 If 8-bit I/O port operations are not supported, then ASSERT().
208
209 @param Port The I/O port to write.
210 @param Count The number of times to write I/O port.
211 @param Buffer The buffer to retrieve the write data from.
212
213 **/
214 VOID
215 EFIAPI
216 IoWriteFifo8 (
217 IN UINTN Port,
218 IN UINTN Count,
219 IN VOID *Buffer
220 )
221 {
222 ASSERT (FALSE);
223 }
224
225 /**
226 Reads a 16-bit I/O port fifo into a block of memory.
227
228 Reads the 16-bit I/O fifo port specified by Port.
229 The port is read Count times, and the read data is
230 stored in the provided Buffer.
231
232 This function must guarantee that all I/O read and write operations are
233 serialized.
234
235 If 16-bit I/O port operations are not supported, then ASSERT().
236
237 @param Port The I/O port to read.
238 @param Count The number of times to read I/O port.
239 @param Buffer The buffer to store the read data into.
240
241 **/
242 VOID
243 EFIAPI
244 IoReadFifo16 (
245 IN UINTN Port,
246 IN UINTN Count,
247 OUT VOID *Buffer
248 )
249 {
250 ASSERT (FALSE);
251 }
252
253 /**
254 Writes a block of memory into a 16-bit I/O port fifo.
255
256 Writes the 16-bit I/O fifo port specified by Port.
257 The port is written Count times, and the write data is
258 retrieved from the provided Buffer.
259
260 This function must guarantee that all I/O write and write operations are
261 serialized.
262
263 If 16-bit I/O port operations are not supported, then ASSERT().
264
265 @param Port The I/O port to write.
266 @param Count The number of times to write I/O port.
267 @param Buffer The buffer to retrieve the write data from.
268
269 **/
270 VOID
271 EFIAPI
272 IoWriteFifo16 (
273 IN UINTN Port,
274 IN UINTN Count,
275 IN VOID *Buffer
276 )
277 {
278 ASSERT (FALSE);
279 }
280
281 /**
282 Reads a 32-bit I/O port fifo into a block of memory.
283
284 Reads the 32-bit I/O fifo port specified by Port.
285 The port is read Count times, and the read data is
286 stored in the provided Buffer.
287
288 This function must guarantee that all I/O read and write operations are
289 serialized.
290
291 If 32-bit I/O port operations are not supported, then ASSERT().
292
293 @param Port The I/O port to read.
294 @param Count The number of times to read I/O port.
295 @param Buffer The buffer to store the read data into.
296
297 **/
298 VOID
299 EFIAPI
300 IoReadFifo32 (
301 IN UINTN Port,
302 IN UINTN Count,
303 OUT VOID *Buffer
304 )
305 {
306 ASSERT (FALSE);
307 }
308
309 /**
310 Writes a block of memory into a 32-bit I/O port fifo.
311
312 Writes the 32-bit I/O fifo port specified by Port.
313 The port is written Count times, and the write data is
314 retrieved from the provided Buffer.
315
316 This function must guarantee that all I/O write and write operations are
317 serialized.
318
319 If 32-bit I/O port operations are not supported, then ASSERT().
320
321 @param Port The I/O port to write.
322 @param Count The number of times to write I/O port.
323 @param Buffer The buffer to retrieve the write data from.
324
325 **/
326 VOID
327 EFIAPI
328 IoWriteFifo32 (
329 IN UINTN Port,
330 IN UINTN Count,
331 IN VOID *Buffer
332 )
333 {
334 ASSERT (FALSE);
335 }