1. fixed one bug in Common/FrameworkFirmwareFileSystem.h
[mirror_edk2.git] / IntelFrameworkPkg / Library / DxeIoLibCpuIo / DxeCpuIoLibInternal.h
CommitLineData
79964ac8 1/** @file\r
2 Internal include file of DXE CPU IO Library.\r
3\r
4 Copyright (c) 2006, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are 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 Module Name: DxeCpuIoLibInternal.h\r
14\r
15**/\r
16\r
17#ifndef _DXE_CPUIO_LIB_INTERNAL_H_\r
18#define _DXE_CPUIO_LIB_INTERNAL_H_\r
19\r
53f93f7e 20//\r
21// The package level header files this module uses\r
22//\r
79964ac8 23#include <FrameworkDxe.h>\r
53f93f7e 24\r
25//\r
26// The protocols, PPI and GUID defintions for this module\r
27//\r
28#include <Protocol/CpuIo.h>\r
29#include <Protocol/PciRootBridgeIo.h>\r
30\r
31//\r
32// The Library classes this module consumes\r
33//\r
79964ac8 34#include <Library/IoLib.h>\r
35#include <Library/UefiBootServicesTableLib.h>\r
36#include <Library/DebugLib.h>\r
37#include <Library/BaseLib.h>\r
38\r
79964ac8 39\r
40/**\r
41 Reads registers in the EFI CPU I/O space.\r
42\r
43 Reads the I/O port specified by Port with registers width specified by Width.\r
44 The read value is returned. If such operations are not supported, then ASSERT().\r
45 This function must guarantee that all I/O read and write operations are serialized.\r
46\r
47 @param Port The base address of the I/O operation.\r
48 The caller is responsible for aligning the Address if required.\r
49 @param Width The width of the I/O operation.\r
50\r
51 @return Data read from registers in the EFI CPU I/O space.\r
52\r
53**/\r
54UINT64\r
55EFIAPI\r
56IoReadWorker (\r
57 IN UINTN Port,\r
58 IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r
59 );\r
60\r
61/**\r
62 Writes registers in the EFI CPU I/O space.\r
63\r
64 Writes the I/O port specified by Port with registers width and value specified by Width\r
65 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r
66 This function must guarantee that all I/O read and write operations are serialized.\r
67\r
68 @param Port The base address of the I/O operation.\r
69 The caller is responsible for aligning the Address if required.\r
70 @param Width The width of the I/O operation.\r
71 @param Data The value to write to the I/O port.\r
72\r
73 @return The paramter of Data.\r
74\r
75**/\r
76UINT64\r
77EFIAPI\r
78IoWriteWorker (\r
79 IN UINTN Port,\r
80 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
81 IN UINT64 Data\r
82 );\r
83\r
84/**\r
85 Reads memory-mapped registers in the EFI system memory space.\r
86\r
87 Reads the MMIO registers specified by Address with registers width specified by Width.\r
88 The read value is returned. If such operations are not supported, then ASSERT().\r
89 This function must guarantee that all MMIO read and write operations are serialized.\r
90\r
91 @param Address The MMIO register to read.\r
92 The caller is responsible for aligning the Address if required.\r
93 @param Width The width of the I/O operation.\r
94\r
95 @return Data read from registers in the EFI system memory space.\r
96\r
97**/\r
98UINT64\r
99EFIAPI\r
100MmioReadWorker (\r
101 IN UINTN Address,\r
102 IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r
103 );\r
104\r
105/**\r
106 Writes memory-mapped registers in the EFI system memory space.\r
107\r
108 Writes the MMIO registers specified by Address with registers width and value specified by Width\r
109 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r
110 This function must guarantee that all MMIO read and write operations are serialized.\r
111\r
112 @param Address The MMIO register to read.\r
113 The caller is responsible for aligning the Address if required.\r
114 @param Width The width of the I/O operation.\r
115\r
116 @return Data read from registers in the EFI system memory space.\r
117\r
118**/\r
119UINT64\r
120EFIAPI\r
121MmioWriteWorker (\r
122 IN UINTN Address,\r
123 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
124 IN UINT64 Data\r
125 );\r
126\r
127#endif\r