]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | IsaIo.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | EFI ISA I/O Protocol\r | |
19 | \r | |
20 | Revision History\r | |
21 | \r | |
22 | --*/\r | |
23 | \r | |
24 | #ifndef _EFI_ISA_IO_H\r | |
25 | #define _EFI_ISA_IO_H\r | |
26 | \r | |
27 | //\r | |
28 | // Global ID for the ISA I/O Protocol\r | |
29 | //\r | |
30 | \r | |
31 | #define EFI_ISA_IO_PROTOCOL_GUID \\r | |
32 | { 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }\r | |
33 | \r | |
34 | typedef struct _EFI_ISA_IO_PROTOCOL EFI_ISA_IO_PROTOCOL;\r | |
35 | \r | |
36 | //\r | |
37 | // Prototypes for the ISA I/O Protocol\r | |
38 | //\r | |
39 | \r | |
40 | typedef enum {\r | |
41 | EfiIsaIoWidthUint8,\r | |
42 | EfiIsaIoWidthUint16,\r | |
43 | EfiIsaIoWidthUint32,\r | |
44 | EfiIsaIoWidthReserved,\r | |
45 | EfiIsaIoWidthFifoUint8,\r | |
46 | EfiIsaIoWidthFifoUint16,\r | |
47 | EfiIsaIoWidthFifoUint32,\r | |
48 | EfiIsaIoWidthFifoReserved,\r | |
49 | EfiIsaIoWidthFillUint8,\r | |
50 | EfiIsaIoWidthFillUint16,\r | |
51 | EfiIsaIoWidthFillUint32,\r | |
52 | EfiIsaIoWidthFillReserved,\r | |
53 | EfiIsaIoWidthMaximum\r | |
54 | } EFI_ISA_IO_PROTOCOL_WIDTH;\r | |
55 | \r | |
56 | //\r | |
57 | // Attributes for common buffer allocations\r | |
58 | //\r | |
59 | #define EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x080 // Map a memory range so write are combined\r | |
60 | #define EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED 0x800 // Map a memory range so all r/w accesses are cached\r | |
61 | #define EFI_ISA_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 // Disable a memory range \r | |
62 | \r | |
63 | //\r | |
64 | // Channel attribute for DMA operations\r | |
65 | //\r | |
66 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE 0x001\r | |
67 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A 0x002\r | |
68 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B 0x004\r | |
69 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C 0x008\r | |
70 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 0x010\r | |
71 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16 0x020\r | |
72 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE 0x040\r | |
73 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE 0x080\r | |
74 | #define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE 0x100\r | |
75 | \r | |
76 | typedef enum {\r | |
77 | EfiIsaIoOperationBusMasterRead,\r | |
78 | EfiIsaIoOperationBusMasterWrite,\r | |
79 | EfiIsaIoOperationBusMasterCommonBuffer,\r | |
80 | EfiIsaIoOperationSlaveRead,\r | |
81 | EfiIsaIoOperationSlaveWrite,\r | |
82 | EfiIsaIoOperationMaximum\r | |
83 | } EFI_ISA_IO_PROTOCOL_OPERATION;\r | |
84 | \r | |
85 | typedef\r | |
86 | EFI_STATUS\r | |
87 | (EFIAPI *EFI_ISA_IO_PROTOCOL_IO_MEM) (\r | |
88 | IN EFI_ISA_IO_PROTOCOL *This,\r | |
89 | IN EFI_ISA_IO_PROTOCOL_WIDTH Width,\r | |
90 | IN UINT32 Offset,\r | |
91 | IN UINTN Count,\r | |
92 | IN OUT VOID *Buffer\r | |
93 | );\r | |
94 | \r | |
95 | typedef struct {\r | |
96 | EFI_ISA_IO_PROTOCOL_IO_MEM Read;\r | |
97 | EFI_ISA_IO_PROTOCOL_IO_MEM Write;\r | |
98 | } EFI_ISA_IO_PROTOCOL_ACCESS;\r | |
99 | \r | |
100 | typedef\r | |
101 | EFI_STATUS\r | |
102 | (EFIAPI *EFI_ISA_IO_PROTOCOL_COPY_MEM) (\r | |
103 | IN EFI_ISA_IO_PROTOCOL *This,\r | |
104 | IN EFI_ISA_IO_PROTOCOL_WIDTH Width,\r | |
105 | IN UINT32 DestOffset,\r | |
106 | IN UINT32 SrcOffset,\r | |
107 | IN UINTN Count\r | |
108 | );\r | |
109 | \r | |
110 | typedef\r | |
111 | EFI_STATUS\r | |
112 | (EFIAPI *EFI_ISA_IO_PROTOCOL_MAP) (\r | |
113 | IN EFI_ISA_IO_PROTOCOL *This,\r | |
114 | IN EFI_ISA_IO_PROTOCOL_OPERATION Operation,\r | |
115 | IN UINT8 ChannelNumber OPTIONAL,\r | |
116 | IN UINT32 ChannelAttributes,\r | |
117 | IN VOID *HostAddress,\r | |
118 | IN OUT UINTN *NumberOfBytes,\r | |
119 | OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,\r | |
120 | OUT VOID **Mapping\r | |
121 | );\r | |
122 | \r | |
123 | typedef\r | |
124 | EFI_STATUS\r | |
125 | (EFIAPI *EFI_ISA_IO_PROTOCOL_UNMAP) (\r | |
126 | IN EFI_ISA_IO_PROTOCOL *This,\r | |
127 | IN VOID *Mapping\r | |
128 | );\r | |
129 | \r | |
130 | typedef\r | |
131 | EFI_STATUS\r | |
132 | (EFIAPI *EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER) (\r | |
133 | IN EFI_ISA_IO_PROTOCOL *This,\r | |
134 | IN EFI_ALLOCATE_TYPE Type,\r | |
135 | IN EFI_MEMORY_TYPE MemoryType,\r | |
136 | IN UINTN Pages,\r | |
137 | OUT VOID **HostAddress,\r | |
138 | IN UINT64 Attributes\r | |
139 | );\r | |
140 | \r | |
141 | typedef\r | |
142 | EFI_STATUS\r | |
143 | (EFIAPI *EFI_ISA_IO_PROTOCOL_FREE_BUFFER) (\r | |
144 | IN EFI_ISA_IO_PROTOCOL *This,\r | |
145 | IN UINTN Pages,\r | |
146 | IN VOID *HostAddress\r | |
147 | );\r | |
148 | \r | |
149 | typedef\r | |
150 | EFI_STATUS\r | |
151 | (EFIAPI *EFI_ISA_IO_PROTOCOL_FLUSH) (\r | |
152 | IN EFI_ISA_IO_PROTOCOL *This\r | |
153 | );\r | |
154 | \r | |
155 | //\r | |
156 | // Interface structure for the ISA I/O Protocol\r | |
157 | //\r | |
158 | struct _EFI_ISA_IO_PROTOCOL {\r | |
159 | EFI_ISA_IO_PROTOCOL_ACCESS Mem;\r | |
160 | EFI_ISA_IO_PROTOCOL_ACCESS Io;\r | |
161 | EFI_ISA_IO_PROTOCOL_COPY_MEM CopyMem;\r | |
162 | EFI_ISA_IO_PROTOCOL_MAP Map;\r | |
163 | EFI_ISA_IO_PROTOCOL_UNMAP Unmap;\r | |
164 | EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer;\r | |
165 | EFI_ISA_IO_PROTOCOL_FREE_BUFFER FreeBuffer;\r | |
166 | EFI_ISA_IO_PROTOCOL_FLUSH Flush;\r | |
167 | EFI_ISA_ACPI_RESOURCE_LIST *ResourceList;\r | |
168 | UINT32 RomSize;\r | |
169 | VOID *RomImage;\r | |
170 | };\r | |
171 | \r | |
172 | extern EFI_GUID gEfiIsaIoProtocolGuid;\r | |
173 | \r | |
174 | #endif\r |