Fix typo in comment.
[mirror_edk2.git] / IntelFrameworkPkg / Library / DxeIoLibCpuIo / DxeCpuIoLibInternal.h
1 /** @file
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.
6
7 Copyright (c) 2006, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
16 Module Name: DxeCpuIoLibInternal.h
17
18 **/
19
20 #ifndef _DXE_CPUIO_LIB_INTERNAL_H_
21 #define _DXE_CPUIO_LIB_INTERNAL_H_
22
23
24 #include <FrameworkDxe.h>
25
26
27 #include <Protocol/CpuIo.h>
28 #include <Protocol/PciRootBridgeIo.h>
29
30
31 #include <Library/IoLib.h>
32 #include <Library/UefiBootServicesTableLib.h>
33 #include <Library/DebugLib.h>
34 #include <Library/BaseLib.h>
35
36
37 /**
38 Reads registers in the EFI CPU I/O space.
39
40 Reads the I/O port specified by Port with registers width specified by Width.
41 The read value is returned. If such operations are not supported, then ASSERT().
42 This function must guarantee that all I/O read and write operations are serialized.
43
44 @param Port The base address of the I/O operation.
45 The caller is responsible for aligning the Address if required.
46 @param Width The width of the I/O operation.
47
48 @return Data read from registers in the EFI CPU I/O space.
49
50 **/
51 UINT64
52 EFIAPI
53 IoReadWorker (
54 IN UINTN Port,
55 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
56 );
57
58 /**
59 Writes registers in the EFI CPU I/O space.
60
61 Writes the I/O port specified by Port with registers width and value specified by Width
62 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
63 This function must guarantee that all I/O read and write operations are serialized.
64
65 @param Port The base address of the I/O operation.
66 The caller is responsible for aligning the Address if required.
67 @param Width The width of the I/O operation.
68 @param Data The value to write to the I/O port.
69
70 @return The paramter of Data.
71
72 **/
73 UINT64
74 EFIAPI
75 IoWriteWorker (
76 IN UINTN Port,
77 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
78 IN UINT64 Data
79 );
80
81 /**
82 Reads memory-mapped registers in the EFI system memory space.
83
84 Reads the MMIO registers specified by Address with registers width specified by Width.
85 The read value is returned. If such operations are not supported, then ASSERT().
86 This function must guarantee that all MMIO read and write operations are serialized.
87
88 @param Address The MMIO register to read.
89 The caller is responsible for aligning the Address if required.
90 @param Width The width of the I/O operation.
91
92 @return Data read from registers in the EFI system memory space.
93
94 **/
95 UINT64
96 EFIAPI
97 MmioReadWorker (
98 IN UINTN Address,
99 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
100 );
101
102 /**
103 Writes memory-mapped registers in the EFI system memory space.
104
105 Writes the MMIO registers specified by Address with registers width and value specified by Width
106 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().
107 This function must guarantee that all MMIO read and write operations are serialized.
108
109 @param Address The MMIO register to read.
110 The caller is responsible for aligning the Address if required.
111 @param Width The width of the I/O operation.
112 @param Data The value to write to the I/O port.
113
114 @return Data read from registers in the EFI system memory space.
115
116 **/
117 UINT64
118 EFIAPI
119 MmioWriteWorker (
120 IN UINTN Address,
121 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
122 IN UINT64 Data
123 );
124
125 #endif