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