]> git.proxmox.com Git - mirror_edk2.git/blob - PcAtChipsetPkg/8259InterruptControllerDxe/8259.h
f77494c946faf90ce3ea58eb60971e999b804789
[mirror_edk2.git] / PcAtChipsetPkg / 8259InterruptControllerDxe / 8259.h
1 /**
2
3 Copyright (c) 2005, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13 8259.h
14
15 Abstract:
16
17 Driver implementing the Tiano Legacy 8259 Protocol
18
19 **/
20
21 #ifndef _8259_H__
22 #define _8259_H__
23
24 #include <FrameworkDxe.h>
25
26 #include <Protocol/Legacy8259.h>
27
28 #include <Library/UefiBootServicesTableLib.h>
29 #include <Library/DebugLib.h>
30 #include <Library/IoLib.h>
31
32 //
33 // 8259 Hardware definitions
34 //
35 #define LEGACY_MODE_BASE_VECTOR_MASTER 0x08
36 #define LEGACY_MODE_BASE_VECTOR_SLAVE 0x70
37
38 #define PROTECTED_MODE_BASE_VECTOR_MASTER 0x68
39 #define PROTECTED_MODE_BASE_VECTOR_SLAVE 0x70
40
41 #define LEGACY_8259_CONTROL_REGISTER_MASTER 0x20
42 #define LEGACY_8259_MASK_REGISTER_MASTER 0x21
43 #define LEGACY_8259_CONTROL_REGISTER_SLAVE 0xA0
44 #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1
45 #define LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_MASTER 0x4D0
46 #define LEGACY_8259_EDGE_LEVEL_TRIGGERED_REGISTER_SLAVE 0x4D1
47
48 #define LEGACY_8259_EOI 0x20
49
50 //
51 // Protocol Function Prototypes
52 //
53 EFI_STATUS
54 EFIAPI
55 Interrupt8259SetVectorBase (
56 IN EFI_LEGACY_8259_PROTOCOL *This,
57 IN UINT8 MasterBase,
58 IN UINT8 SlaveBase
59 )
60 /**
61
62 Routine Description:
63
64 TODO: Add function description
65
66 Arguments:
67
68 This - TODO: add argument description
69 MasterBase - TODO: add argument description
70 SlaveBase - TODO: add argument description
71
72 Returns:
73
74 TODO: add return values
75
76 **/
77 ;
78
79 EFI_STATUS
80 EFIAPI
81 Interrupt8259GetMask (
82 IN EFI_LEGACY_8259_PROTOCOL * This,
83 OUT UINT16 *LegacyMask, OPTIONAL
84 OUT UINT16 *LegacyEdgeLevel, OPTIONAL
85 OUT UINT16 *ProtectedMask, OPTIONAL
86 OUT UINT16 *ProtectedEdgeLevel OPTIONAL
87 )
88 /**
89
90 Routine Description:
91
92 TODO: Add function description
93
94 Arguments:
95
96 This - TODO: add argument description
97 LegacyMask - TODO: add argument description
98 LegacyEdgeLevel - TODO: add argument description
99 ProtectedMask - TODO: add argument description
100 ProtectedEdgeLevel - TODO: add argument description
101
102 Returns:
103
104 TODO: add return values
105
106 **/
107 ;
108
109 EFI_STATUS
110 EFIAPI
111 Interrupt8259SetMask (
112 IN EFI_LEGACY_8259_PROTOCOL * This,
113 IN UINT16 *LegacyMask, OPTIONAL
114 IN UINT16 *LegacyEdgeLevel, OPTIONAL
115 IN UINT16 *ProtectedMask, OPTIONAL
116 IN UINT16 *ProtectedEdgeLevel OPTIONAL
117 )
118 /**
119
120 Routine Description:
121
122 TODO: Add function description
123
124 Arguments:
125
126 This - TODO: add argument description
127 LegacyMask - TODO: add argument description
128 LegacyEdgeLevel - TODO: add argument description
129 ProtectedMask - TODO: add argument description
130 ProtectedEdgeLevel - TODO: add argument description
131
132 Returns:
133
134 TODO: add return values
135
136 **/
137 ;
138
139 EFI_STATUS
140 EFIAPI
141 Interrupt8259SetMode (
142 IN EFI_LEGACY_8259_PROTOCOL * This,
143 IN EFI_8259_MODE Mode,
144 IN UINT16 *Mask, OPTIONAL
145 IN UINT16 *EdgeLevel OPTIONAL
146 )
147 /**
148
149 Routine Description:
150
151 TODO: Add function description
152
153 Arguments:
154
155 This - TODO: add argument description
156 Mode - TODO: add argument description
157 Mask - TODO: add argument description
158 EdgeLevel - TODO: add argument description
159
160 Returns:
161
162 TODO: add return values
163
164 **/
165 ;
166
167 EFI_STATUS
168 EFIAPI
169 Interrupt8259GetVector (
170 IN EFI_LEGACY_8259_PROTOCOL *This,
171 IN EFI_8259_IRQ Irq,
172 OUT UINT8 *Vector
173 )
174 /**
175
176 Routine Description:
177
178 TODO: Add function description
179
180 Arguments:
181
182 This - TODO: add argument description
183 Irq - TODO: add argument description
184 Vector - TODO: add argument description
185
186 Returns:
187
188 TODO: add return values
189
190 **/
191 ;
192
193 EFI_STATUS
194 EFIAPI
195 Interrupt8259EnableIrq (
196 IN EFI_LEGACY_8259_PROTOCOL *This,
197 IN EFI_8259_IRQ Irq,
198 IN BOOLEAN LevelTriggered
199 )
200 /**
201
202 Routine Description:
203
204 TODO: Add function description
205
206 Arguments:
207
208 This - TODO: add argument description
209 Irq - TODO: add argument description
210 LevelTriggered - TODO: add argument description
211
212 Returns:
213
214 TODO: add return values
215
216 **/
217 ;
218
219 EFI_STATUS
220 EFIAPI
221 Interrupt8259DisableIrq (
222 IN EFI_LEGACY_8259_PROTOCOL *This,
223 IN EFI_8259_IRQ Irq
224 )
225 /**
226
227 Routine Description:
228
229 TODO: Add function description
230
231 Arguments:
232
233 This - TODO: add argument description
234 Irq - TODO: add argument description
235
236 Returns:
237
238 TODO: add return values
239
240 **/
241 ;
242
243 EFI_STATUS
244 EFIAPI
245 Interrupt8259GetInterruptLine (
246 IN EFI_LEGACY_8259_PROTOCOL *This,
247 IN EFI_HANDLE PciHandle,
248 OUT UINT8 *Vector
249 )
250 /**
251
252 Routine Description:
253
254 TODO: Add function description
255
256 Arguments:
257
258 This - TODO: add argument description
259 PciHandle - TODO: add argument description
260 Vector - TODO: add argument description
261
262 Returns:
263
264 TODO: add return values
265
266 **/
267 ;
268
269 EFI_STATUS
270 EFIAPI
271 Interrupt8259EndOfInterrupt (
272 IN EFI_LEGACY_8259_PROTOCOL *This,
273 IN EFI_8259_IRQ Irq
274 )
275 /**
276
277 Routine Description:
278
279 TODO: Add function description
280
281 Arguments:
282
283 This - TODO: add argument description
284 Irq - TODO: add argument description
285
286 Returns:
287
288 TODO: add return values
289
290 **/
291 ;
292
293 #endif