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