2 Internal include file for the CPU I/O 2 Protocol thunk driver.
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __CPU_IO2_ON_CPU_IO_H__
16 #define __CPU_IO2_ON_CPU_IO_H__
18 #include <Protocol/CpuIo2.h>
19 #include <Protocol/CpuIo.h>
21 #include <Library/DebugLib.h>
22 #include <Library/UefiBootServicesTableLib.h>
25 Enables a driver to read memory-mapped registers in the PI System memory space.
27 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.
28 @param[in] Width Signifies the width of the memory operation.
29 @param[in] Address The base address of the memory operation.
30 @param[in] Count The number of memory operations to perform. The number of bytes moved
31 is Width size * Count, starting at Address.
32 @param[in, out] Buffer The destination buffer to store the results.
34 @retval EFI_SUCCESS The data was read from or written to the EFI system.
35 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.
36 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
37 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.
42 CpuMemoryServiceRead (
43 IN EFI_CPU_IO2_PROTOCOL
*This
,
44 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
51 Enables a driver to write memory-mapped registers in the PI System memory space.
53 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.
54 @param[in] Width Signifies the width of the memory operation.
55 @param[in] Address The base address of the memory operation.
56 @param[in] Count The number of memory operations to perform. The number of bytes moved
57 is Width size * Count, starting at Address.
58 @param[in, out] Buffer The source buffer from which to write data.
60 @retval EFI_SUCCESS The data was read from or written to the EFI system.
61 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.
62 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
63 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.
68 CpuMemoryServiceWrite (
69 IN EFI_CPU_IO2_PROTOCOL
*This
,
70 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
77 Enables a driver to read registers in the PI CPU I/O space.
79 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.
80 @param[in] Width Signifies the width of the I/O operation.
81 @param[in] Address The base address of the I/O operation. The caller is responsible
82 for aligning the Address if required.
83 @param[in] Count The number of I/O operations to perform. The number of bytes moved
84 is Width size * Count, starting at Address.
85 @param[in, out] Buffer The destination buffer to store the results.
87 @retval EFI_SUCCESS The data was read from or written to the EFI system.
88 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.
89 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
90 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.
96 IN EFI_CPU_IO2_PROTOCOL
*This
,
97 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,
104 Enables a driver to write registers in the PI CPU I/O space.
106 @param[in] This A pointer to the EFI_CPU_IO2_PROTOCOL instance.
107 @param[in] Width Signifies the width of the I/O operation.
108 @param[in] Address The base address of the I/O operation. The caller is responsible
109 for aligning the Address if required.
110 @param[in] Count The number of I/O operations to perform. The number of bytes moved
111 is Width size * Count, starting at Address.
112 @param[in, out] Buffer The source buffer from which to write data.
114 @retval EFI_SUCCESS The data was read from or written to the EFI system.
115 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system. Or Buffer is NULL.
116 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width.
117 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.
123 IN EFI_CPU_IO2_PROTOCOL
*This
,
124 IN EFI_CPU_IO_PROTOCOL_WIDTH Width
,