]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/TianoTools/Include/Protocol/CpuIo.h
1. Removed the unnecessary #include statements and include files
[mirror_edk2.git] / Tools / Source / TianoTools / Include / Protocol / CpuIo.h
CommitLineData
21b50a27 1/** @file\r
2 This code abstracts the CPU IO Protocol\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: CpuIO.h\r
14\r
15 @par Revision Reference:\r
16 CPU IO Protocol is defined in Framework of EFI CPU IO Protocol Spec\r
17 Version 0.9\r
18\r
19**/\r
20\r
21#ifndef _CPUIO_H_\r
22#define _CPUIO_H_\r
23\r
24#define EFI_CPU_IO_PROTOCOL_GUID \\r
25 { \\r
26 0xB0732526, 0x38C8, 0x4b40, {0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 } \\r
27 }\r
28\r
29typedef struct _EFI_CPU_IO_PROTOCOL EFI_CPU_IO_PROTOCOL;\r
30\r
31//\r
32// *******************************************************\r
33// EFI_CPU_IO_PROTOCOL_WIDTH\r
34// *******************************************************\r
35//\r
36typedef enum {\r
37 EfiCpuIoWidthUint8,\r
38 EfiCpuIoWidthUint16,\r
39 EfiCpuIoWidthUint32,\r
40 EfiCpuIoWidthUint64,\r
41 EfiCpuIoWidthFifoUint8,\r
42 EfiCpuIoWidthFifoUint16,\r
43 EfiCpuIoWidthFifoUint32,\r
44 EfiCpuIoWidthFifoUint64,\r
45 EfiCpuIoWidthFillUint8,\r
46 EfiCpuIoWidthFillUint16,\r
47 EfiCpuIoWidthFillUint32,\r
48 EfiCpuIoWidthFillUint64,\r
49 EfiCpuIoWidthMaximum\r
50} EFI_CPU_IO_PROTOCOL_WIDTH;\r
51\r
52//\r
53// *******************************************************\r
54// EFI_CPU_IO_PROTOCOL_IO_MEM\r
55// *******************************************************\r
56//\r
57/**\r
58 Enables a driver to access memory-mapped registers in the EFI system memory space.\r
59 Or, Enables a driver to access registers in the EFI CPU I/O space.\r
60\r
61 @param This A pointer to the EFI_CPU_IO_PROTOCOL instance.\r
62 \r
63 @param Width Signifies the width of the I/O or Memory operation. \r
64 \r
65 @param Address The base address of the I/O or Memoryoperation. \r
66 \r
67 @param Count The number of I/O or Memory operations to perform.\r
68 The number of bytes moved is Width size * Count, starting at Address.\r
69 \r
70 @param Buffer For read operations, the destination buffer to store the results.\r
71 For write operations, the source buffer from which to write data.\r
72\r
73 @retval EFI_SUCCESS The data was read from or written to the EFI system.\r
74 \r
75 @retval EFI_INVALID_PARAMETER Width is invalid for this EFI system.Or Buffer is NULL.\r
76 \r
77 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. \r
78 Or,The address range specified by Address, Width, and Count is not valid for this EFI system.\r
79\r
80**/\r
81typedef\r
82EFI_STATUS\r
83(EFIAPI *EFI_CPU_IO_PROTOCOL_IO_MEM) (\r
84 IN EFI_CPU_IO_PROTOCOL *This,\r
85 IN EFI_CPU_IO_PROTOCOL_WIDTH Width,\r
86 IN UINT64 Address,\r
87 IN UINTN Count,\r
88 IN OUT VOID *Buffer\r
89 );\r
90\r
91//\r
92// *******************************************************\r
93// EFI_CPU_IO_PROTOCOL_ACCESS\r
94// *******************************************************\r
95//\r
96typedef struct {\r
97 EFI_CPU_IO_PROTOCOL_IO_MEM Read;\r
98 EFI_CPU_IO_PROTOCOL_IO_MEM Write;\r
99} EFI_CPU_IO_PROTOCOL_ACCESS;\r
100\r
101//\r
102// *******************************************************\r
103// EFI_CPU_IO_PROTOCOL\r
104// *******************************************************\r
105//\r
106/**\r
107 @par Protocol Description:\r
108 Provides the basic memory and I/O interfaces that are used to abstract \r
109 accesses to devices in a system.\r
110\r
111 @param Mem.Read\r
112 Allows reads from memory-mapped I/O space.\r
113\r
114 @param Mem.Write\r
115 Allows writes to memory-mapped I/O space.\r
116\r
117 @param Io.Read\r
118 Allows reads from I/O space.\r
119\r
120 @param Io.Write\r
121 Allows writes to I/O space.\r
122\r
123**/\r
124struct _EFI_CPU_IO_PROTOCOL {\r
125 EFI_CPU_IO_PROTOCOL_ACCESS Mem;\r
126 EFI_CPU_IO_PROTOCOL_ACCESS Io;\r
127};\r
128\r
129extern EFI_GUID gEfiCpuIoProtocolGuid;\r
130\r
131#endif\r