1 /** @file
2   I/O Library for EBC.
3 
4   EBC does not support port I/O.  All APIs in this file ASSERT().
5 
6   Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
7   This program and the accompanying materials
8   are licensed and made available under the terms and conditions of the BSD License
9   which accompanies this distribution.  The full text of the license may be found at
10   http://opensource.org/licenses/bsd-license.php.
11 
12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15 **/
16 
17 #include "BaseIoLibIntrinsicInternal.h"
18 
19 /**
20   Reads an 8-bit I/O port.
21 
22   Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
23   This function must guarantee that all I/O read and write operations are
24   serialized.
25 
26   If 8-bit I/O port operations are not supported, then ASSERT().
27 
28   @param  Port  The I/O port to read.
29 
30   @return The value read.
31 
32 **/
33 UINT8
34 EFIAPI
IoRead8(IN UINTN Port)35 IoRead8 (
36   IN      UINTN                     Port
37   )
38 {
39   ASSERT (FALSE);
40   return 0;
41 }
42 
43 /**
44   Writes an 8-bit I/O port.
45 
46   Writes the 8-bit I/O port specified by Port with the value specified by Value
47   and returns Value. This function must guarantee that all I/O read and write
48   operations are serialized.
49 
50   If 8-bit I/O port operations are not supported, then ASSERT().
51 
52   @param  Port  The I/O port to write.
53   @param  Value The value to write to the I/O port.
54 
55   @return The value written to the I/O port.
56 
57 **/
58 UINT8
59 EFIAPI
IoWrite8(IN UINTN Port,IN UINT8 Value)60 IoWrite8 (
61   IN      UINTN                     Port,
62   IN      UINT8                     Value
63   )
64 {
65   ASSERT (FALSE);
66   return 0;
67 }
68 
69 /**
70   Reads a 16-bit I/O port.
71 
72   Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
73   This function must guarantee that all I/O read and write operations are
74   serialized.
75 
76   If 16-bit I/O port operations are not supported, then ASSERT().
77   If Port is not aligned on a 16-bit boundary, then ASSERT().
78 
79   @param  Port  The I/O port to read.
80 
81   @return The value read.
82 
83 **/
84 UINT16
85 EFIAPI
IoRead16(IN UINTN Port)86 IoRead16 (
87   IN      UINTN                     Port
88   )
89 {
90   ASSERT (FALSE);
91   return 0;
92 }
93 
94 /**
95   Writes a 16-bit I/O port.
96 
97   Writes the 16-bit I/O port specified by Port with the value specified by Value
98   and returns Value. This function must guarantee that all I/O read and write
99   operations are serialized.
100 
101   If 16-bit I/O port operations are not supported, then ASSERT().
102   If Port is not aligned on a 16-bit boundary, then ASSERT().
103 
104   @param  Port  The I/O port to write.
105   @param  Value The value to write to the I/O port.
106 
107   @return The value written to the I/O port.
108 
109 **/
110 UINT16
111 EFIAPI
IoWrite16(IN UINTN Port,IN UINT16 Value)112 IoWrite16 (
113   IN      UINTN                     Port,
114   IN      UINT16                    Value
115   )
116 {
117   ASSERT (FALSE);
118   return 0;
119 }
120 
121 /**
122   Reads a 32-bit I/O port.
123 
124   Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
125   This function must guarantee that all I/O read and write operations are
126   serialized.
127 
128   If 32-bit I/O port operations are not supported, then ASSERT().
129   If Port is not aligned on a 32-bit boundary, then ASSERT().
130 
131   @param  Port  The I/O port to read.
132 
133   @return The value read.
134 
135 **/
136 UINT32
137 EFIAPI
IoRead32(IN UINTN Port)138 IoRead32 (
139   IN      UINTN                     Port
140   )
141 {
142   ASSERT (FALSE);
143   return 0;
144 }
145 
146 /**
147   Writes a 32-bit I/O port.
148 
149   Writes the 32-bit I/O port specified by Port with the value specified by Value
150   and returns Value. This function must guarantee that all I/O read and write
151   operations are serialized.
152 
153   If 32-bit I/O port operations are not supported, then ASSERT().
154   If Port is not aligned on a 32-bit boundary, then ASSERT().
155 
156   @param  Port  The I/O port to write.
157   @param  Value The value to write to the I/O port.
158 
159   @return The value written to the I/O port.
160 
161 **/
162 UINT32
163 EFIAPI
IoWrite32(IN UINTN Port,IN UINT32 Value)164 IoWrite32 (
165   IN      UINTN                     Port,
166   IN      UINT32                    Value
167   )
168 {
169   ASSERT (FALSE);
170   return 0;
171 }
172