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