]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h
MdePkg: Fix some typing errors in the header files
[mirror_edk2.git] / MdePkg / Library / DxeIoLibCpuIo2 / DxeCpuIo2LibInternal.h
CommitLineData
ba9f8351 1/** @file\r
2 Internal include file of DXE CPU IO2 Library.\r
3 \r
4 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials are licensed and made available\r
6 under the terms and conditions of the BSD License which accompanies this\r
7 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 _DXE_CPUIO2_LIB_INTERNAL_H_\r
16#define _DXE_CPUIO2_LIB_INTERNAL_H_\r
17\r
18#include <PiDxe.h>\r
19\r
20#include <Protocol/CpuIo2.h>\r
21\r
22#include <Library/IoLib.h>\r
23#include <Library/UefiBootServicesTableLib.h>\r
24#include <Library/DebugLib.h>\r
25#include <Library/BaseLib.h>\r
26\r
27\r
28/**\r
29 Reads registers in the EFI CPU I/O space.\r
30\r
31 Reads the I/O port specified by Port with registers width specified by Width.\r
32 The read value is returned. If such operations are not supported, then ASSERT().\r
33 This function must guarantee that all I/O read and write operations are serialized.\r
34\r
35 @param Port The base address of the I/O operation.\r
36 The caller is responsible for aligning the Address if required.\r
37 @param Width The width of the I/O operation.\r
38\r
39 @return Data read from registers in the EFI CPU I/O space.\r
40\r
41**/\r
42UINT64\r
43EFIAPI\r
44IoReadWorker (\r
45 IN UINTN Port,\r
46 IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r
47 );\r
48\r
49/**\r
50 Writes registers in the EFI CPU I/O space.\r
51\r
52 Writes the I/O port specified by Port with registers width and value specified by Width\r
53 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r
54 This function must guarantee that all I/O read and write operations are serialized.\r
55\r
56 @param Port The base address of the I/O operation.\r
57 The caller is responsible for aligning the Address if required.\r
58 @param Width The width of the I/O operation.\r
59 @param Data The value to write to the I/O port.\r
60\r
00b7cc0f 61 @return The parameter of Data.\r
ba9f8351 62\r
63**/\r
64UINT64\r
65EFIAPI\r
66IoWriteWorker (\r
67 IN UINTN Port,\r
68 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
69 IN UINT64 Data\r
70 );\r
71\r
72/**\r
73 Reads memory-mapped registers in the EFI system memory space.\r
74\r
75 Reads the MMIO registers specified by Address with registers width specified by Width.\r
76 The read value is returned. If such operations are not supported, then ASSERT().\r
77 This function must guarantee that all MMIO read and write operations are serialized.\r
78\r
79 @param Address The MMIO register to read.\r
80 The caller is responsible for aligning the Address if required.\r
81 @param Width The width of the I/O operation.\r
82\r
83 @return Data read from registers in the EFI system memory space.\r
84\r
85**/\r
86UINT64\r
87EFIAPI\r
88MmioReadWorker (\r
89 IN UINTN Address,\r
90 IN EFI_CPU_IO_PROTOCOL_WIDTH Width\r
91 );\r
92\r
93/**\r
94 Writes memory-mapped registers in the EFI system memory space.\r
95\r
96 Writes the MMIO registers specified by Address with registers width and value specified by Width\r
97 and Data respectively. Data is returned. If such operations are not supported, then ASSERT().\r
98 This function must guarantee that all MMIO read and write operations are serialized.\r
99\r
100 @param Address The MMIO register to read.\r
101 The caller is responsible for aligning the Address if required.\r
102 @param Width The width of the I/O operation.\r
103 @param Data The value to write to the I/O port.\r
104 \r
105 @return Data read from registers in the EFI system memory space.\r
106\r
107**/\r
108UINT64\r
109EFIAPI\r
110MmioWriteWorker (\r
111 IN UINTN Address,\r
112 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
113 IN UINT64 Data\r
114 );\r
115\r
116#endif\r