]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/CpuIo2OnCpuIoThunk/CpuIo2OnCpuIoThunk.h
EdkCompatibilityPkg: Fix some typos of "according"
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / CpuIo2OnCpuIoThunk / CpuIo2OnCpuIoThunk.h
CommitLineData
54bd8079 1/** @file\r
2 Internal include file for the CPU I/O 2 Protocol thunk driver.\r
3\r
584d5652
HT
4Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
54bd8079 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __CPU_IO2_ON_CPU_IO_H__\r
16#define __CPU_IO2_ON_CPU_IO_H__\r
17\r
18#include <Protocol/CpuIo2.h>\r
19#include <Protocol/CpuIo.h>\r
20\r
21#include <Library/DebugLib.h>\r
22#include <Library/UefiBootServicesTableLib.h>\r
23\r
24/**\r
25 Enables a driver to read memory-mapped registers in the PI System memory space.\r
26\r
27 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.\r
28 @param[in] Width Signifies the width of the memory operation.\r
29 @param[in] Address The base address of the memory operation.\r
30 @param[in] Count The number of memory operations to perform. The number of bytes moved\r
31 is Width size * Count, starting at Address.\r
26a76fbc 32 @param[in, out] Buffer The destination buffer to store the results.\r
54bd8079 33\r
34 @retval EFI_SUCCESS The data was read from or written to the EFI system.\r
35 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
36 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.\r
37 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
38\r
39**/\r
40EFI_STATUS\r
41EFIAPI\r
42CpuMemoryServiceRead (\r
43 IN EFI_CPU_IO2_PROTOCOL *This,\r
44 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
45 IN UINT64 Address,\r
46 IN UINTN Count,\r
47 IN OUT VOID *Buffer\r
48 );\r
49\r
50/**\r
51 Enables a driver to write memory-mapped registers in the PI System memory space.\r
52\r
53 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.\r
54 @param[in] Width Signifies the width of the memory operation.\r
55 @param[in] Address The base address of the memory operation.\r
56 @param[in] Count The number of memory operations to perform. The number of bytes moved\r
57 is Width size * Count, starting at Address.\r
26a76fbc 58 @param[in, out] Buffer The source buffer from which to write data.\r
54bd8079 59\r
60 @retval EFI_SUCCESS The data was read from or written to the EFI system.\r
61 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
62 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.\r
63 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
64\r
65**/\r
66EFI_STATUS\r
67EFIAPI\r
68CpuMemoryServiceWrite (\r
69 IN EFI_CPU_IO2_PROTOCOL *This,\r
70 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
71 IN UINT64 Address,\r
72 IN UINTN Count,\r
73 IN OUT VOID *Buffer\r
74 );\r
75\r
76/**\r
77 Enables a driver to read registers in the PI CPU I/O space.\r
78\r
79 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.\r
80 @param[in] Width Signifies the width of the I/O operation.\r
81 @param[in] Address The base address of the I/O operation. The caller is responsible\r
82 for aligning the Address if required. \r
83 @param[in] Count The number of I/O operations to perform. The number of bytes moved\r
84 is Width size * Count, starting at Address.\r
26a76fbc 85 @param[in, out] Buffer The destination buffer to store the results.\r
54bd8079 86\r
87 @retval EFI_SUCCESS The data was read from or written to the EFI system.\r
88 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
89 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.\r
90 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
91\r
92**/\r
93EFI_STATUS\r
94EFIAPI\r
95CpuIoServiceRead (\r
96 IN EFI_CPU_IO2_PROTOCOL *This,\r
97 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
98 IN UINT64 Address,\r
99 IN UINTN Count,\r
100 IN OUT VOID *Buffer\r
101 );\r
102\r
103/**\r
104 Enables a driver to write registers in the PI CPU I/O space.\r
105\r
106 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.\r
107 @param[in] Width Signifies the width of the I/O operation.\r
108 @param[in] Address The base address of the I/O operation. The caller is responsible\r
109 for aligning the Address if required. \r
110 @param[in] Count The number of I/O operations to perform. The number of bytes moved\r
111 is Width size * Count, starting at Address.\r
26a76fbc 112 @param[in, out] Buffer The source buffer from which to write data.\r
54bd8079 113\r
114 @retval EFI_SUCCESS The data was read from or written to the EFI system.\r
115 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.\r
116 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.\r
117 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
118\r
119**/\r
120EFI_STATUS\r
121EFIAPI\r
122CpuIoServiceWrite (\r
123 IN EFI_CPU_IO2_PROTOCOL *This,\r
124 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
125 IN UINT64 Address,\r
126 IN UINTN Count,\r
127 IN OUT VOID *Buffer\r
128 );\r
129\r
130#endif\r