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