2 Internal include file of DXE CPU IO Library.
3 It includes all necessary protocol/library class's header file
4 for implementation of IoLib library instance. It is included
5 all source code of this library instance.
7 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
10 This program and the accompanying materials
11 are licensed and made available under the terms and conditions of the BSD License
12 which accompanies this distribution. The full text of the license may be found at
13 http://opensource.org/licenses/bsd-license.php
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Module Name: DxeCpuIoLibInternal.h
22 #ifndef _DXE_CPUIO_LIB_INTERNAL_H_
23 #define _DXE_CPUIO_LIB_INTERNAL_H_
26 #include <FrameworkDxe.h>
28 #include <Protocol/CpuIo.h>
30 #include <Library/IoLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/DebugLib.h>
33 #include <Library/BaseLib.h>
37 Reads registers in the EFI CPU I/O space.
39 Reads the I/O port specified by Port with registers width specified by Width.
40 The read value is returned.
42 This function must guarantee that all I/O read and write operations are serialized.
43 If such operations are not supported, then ASSERT().
45 @param Port The base address of the I/O operation.
46 The caller is responsible for aligning the Address if required.
47 @param Width The width of the I/O operation.
49 @return Data read from registers in the EFI CPU I/O space.
56 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
60 Writes registers in the EFI CPU I/O space.
62 Writes the I/O port specified by Port with registers width and value specified by Width
63 and Data respectively. Data is returned.
65 This function must guarantee that all I/O read and write operations are serialized.
66 If such operations are not supported, then ASSERT().
68 @param Port The base address of the I/O operation.
69 The caller is responsible for aligning the Address if required.
70 @param Width The width of the I/O operation.
71 @param Data The value to write to the I/O port.
73 @return The parameter of Data.
80 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
85 Reads registers in the EFI CPU I/O space.
87 Reads the I/O port specified by Port with registers width specified by Width.
88 The port is read Count times, and the read data is stored in the provided Buffer.
90 This function must guarantee that all I/O read and write operations are serialized.
91 If such operations are not supported, then ASSERT().
93 @param Port The base address of the I/O operation.
94 The caller is responsible for aligning the Address if required.
95 @param Width The width of the I/O operation.
96 @param Count The number of times to read I/O port.
97 @param Buffer The buffer to store the read data into.
104 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
110 Writes registers in the EFI CPU I/O space.
112 Writes the I/O port specified by Port with registers width specified by Width.
113 The port is written Count times, and the write data is retrieved from the provided Buffer.
115 This function must guarantee that all I/O read and write operations are serialized.
116 If such operations are not supported, then ASSERT().
118 @param Port The base address of the I/O operation.
119 The caller is responsible for aligning the Address if required.
120 @param Width The width of the I/O operation.
121 @param Count The number of times to write I/O port.
122 @param Buffer The buffer to store the read data into.
129 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
135 Reads memory-mapped registers in the EFI system memory space.
137 Reads the MMIO registers specified by Address with registers width specified by Width.
138 The read value is returned. If such operations are not supported, then ASSERT().
139 This function must guarantee that all MMIO read and write operations are serialized.
141 @param Address The MMIO register to read.
142 The caller is responsible for aligning the Address if required.
143 @param Width The width of the I/O operation.
145 @return Data read from registers in the EFI system memory space.
152 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
156 Writes memory-mapped registers in the EFI system memory space.
158 Writes the MMIO registers specified by Address with registers width and value specified by Width
159 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
160 This function must guarantee that all MMIO read and write operations are serialized.
162 @param Address The MMIO register to read.
163 The caller is responsible for aligning the Address if required.
164 @param Width The width of the I/O operation.
165 @param Data The value to write to the I/O port.
167 @return Data read from registers in the EFI system memory space.
174 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,