]>
Commit | Line | Data |
---|---|---|
1fd376d9 | 1 | /** @file |
2 | I/O FIFO routines | |
3 | ||
4 | Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR> | |
5 | This program and the accompanying materials are | |
6 | licensed and made available under the terms and conditions of the BSD License | |
7 | which accompanies this distribution. The full text of the license may be found at | |
8 | http://opensource.org/licenses/bsd-license.php | |
9 | ||
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
12 | ||
13 | **/ | |
14 | ||
15 | #ifndef _IO_FIFO_H_INCLUDED_ | |
16 | #define _IO_FIFO_H_INCLUDED_ | |
17 | ||
18 | /** | |
19 | Reads an 8-bit I/O port fifo into a block of memory. | |
20 | ||
21 | Reads the 8-bit I/O fifo port specified by Port. | |
22 | ||
23 | The port is read Count times, and the read data is | |
24 | stored in the provided Buffer. | |
25 | ||
26 | This function must guarantee that all I/O read and write operations are | |
27 | serialized. | |
28 | ||
29 | If 8-bit I/O port operations are not supported, then ASSERT(). | |
30 | ||
31 | @param Port The I/O port to read. | |
32 | @param Count The number of times to read I/O port. | |
33 | @param Buffer The buffer to store the read data into. | |
34 | ||
35 | **/ | |
36 | VOID | |
37 | EFIAPI | |
38 | IoReadFifo8 ( | |
39 | IN UINTN Port, | |
40 | IN UINTN Count, | |
41 | OUT VOID *Buffer | |
42 | ); | |
43 | ||
44 | /** | |
45 | Reads a 16-bit I/O port fifo into a block of memory. | |
46 | ||
47 | Reads the 16-bit I/O fifo port specified by Port. | |
48 | ||
49 | The port is read Count times, and the read data is | |
50 | stored in the provided Buffer. | |
51 | ||
52 | This function must guarantee that all I/O read and write operations are | |
53 | serialized. | |
54 | ||
55 | If 16-bit I/O port operations are not supported, then ASSERT(). | |
56 | ||
57 | @param Port The I/O port to read. | |
58 | @param Count The number of times to read I/O port. | |
59 | @param Buffer The buffer to store the read data into. | |
60 | ||
61 | **/ | |
62 | VOID | |
63 | EFIAPI | |
64 | IoReadFifo16 ( | |
65 | IN UINTN Port, | |
66 | IN UINTN Count, | |
67 | OUT VOID *Buffer | |
68 | ); | |
69 | ||
70 | /** | |
71 | Reads a 32-bit I/O port fifo into a block of memory. | |
72 | ||
73 | Reads the 32-bit I/O fifo port specified by Port. | |
74 | ||
75 | The port is read Count times, and the read data is | |
76 | stored in the provided Buffer. | |
77 | ||
78 | This function must guarantee that all I/O read and write operations are | |
79 | serialized. | |
80 | ||
81 | If 32-bit I/O port operations are not supported, then ASSERT(). | |
82 | ||
83 | @param Port The I/O port to read. | |
84 | @param Count The number of times to read I/O port. | |
85 | @param Buffer The buffer to store the read data into. | |
86 | ||
87 | **/ | |
88 | VOID | |
89 | EFIAPI | |
90 | IoReadFifo32 ( | |
91 | IN UINTN Port, | |
92 | IN UINTN Count, | |
93 | OUT VOID *Buffer | |
94 | ); | |
95 | ||
96 | /** | |
97 | Writes a block of memory into an 8-bit I/O port fifo. | |
98 | ||
99 | Writes the 8-bit I/O fifo port specified by Port. | |
100 | ||
101 | The port is written Count times, and the write data is | |
102 | retrieved from the provided Buffer. | |
103 | ||
104 | This function must guarantee that all I/O write and write operations are | |
105 | serialized. | |
106 | ||
107 | If 8-bit I/O port operations are not supported, then ASSERT(). | |
108 | ||
109 | @param Port The I/O port to write. | |
110 | @param Count The number of times to write I/O port. | |
111 | @param Buffer The buffer to store the write data into. | |
112 | ||
113 | **/ | |
114 | VOID | |
115 | EFIAPI | |
116 | IoWriteFifo8 ( | |
117 | IN UINTN Port, | |
118 | IN UINTN Count, | |
119 | OUT VOID *Buffer | |
120 | ); | |
121 | ||
122 | /** | |
123 | Writes a block of memory into a 16-bit I/O port fifo. | |
124 | ||
125 | Writes the 16-bit I/O fifo port specified by Port. | |
126 | ||
127 | The port is written Count times, and the write data is | |
128 | retrieved from the provided Buffer. | |
129 | ||
130 | This function must guarantee that all I/O write and write operations are | |
131 | serialized. | |
132 | ||
133 | If 16-bit I/O port operations are not supported, then ASSERT(). | |
134 | ||
135 | @param Port The I/O port to write. | |
136 | @param Count The number of times to write I/O port. | |
137 | @param Buffer The buffer to store the write data into. | |
138 | ||
139 | **/ | |
140 | VOID | |
141 | EFIAPI | |
142 | IoWriteFifo16 ( | |
143 | IN UINTN Port, | |
144 | IN UINTN Count, | |
145 | OUT VOID *Buffer | |
146 | ); | |
147 | ||
148 | /** | |
149 | Writes a block of memory into a 32-bit I/O port fifo. | |
150 | ||
151 | Writes the 32-bit I/O fifo port specified by Port. | |
152 | ||
153 | The port is written Count times, and the write data is | |
154 | retrieved from the provided Buffer. | |
155 | ||
156 | This function must guarantee that all I/O write and write operations are | |
157 | serialized. | |
158 | ||
159 | If 32-bit I/O port operations are not supported, then ASSERT(). | |
160 | ||
161 | @param Port The I/O port to write. | |
162 | @param Count The number of times to write I/O port. | |
163 | @param Buffer The buffer to store the write data into. | |
164 | ||
165 | **/ | |
166 | VOID | |
167 | EFIAPI | |
168 | IoWriteFifo32 ( | |
169 | IN UINTN Port, | |
170 | IN UINTN Count, | |
171 | OUT VOID *Buffer | |
172 | ); | |
173 | ||
174 | #endif | |
175 |