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