]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClass.h
aed4a846717fd91691860200a204ea7325f05894
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / Console / VgaClassDxe / VgaClass.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation. All rights reserved.
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
10 Intel Corporation.
11
12
13 Module Name:
14
15 VgaClass.h
16
17 Abstract:
18
19
20 Revision History
21 --*/
22
23 #ifndef _VGA_CLASS_H
24 #define _VGA_CLASS_H
25
26 #include <PiDxe.h>
27 #include <FrameworkDxe.h>
28 //
29 // The protocols, PPI and GUID defintions for this module
30 //
31 #include <Protocol/SimpleTextIn.h>
32 #include <Protocol/SimpleTextOut.h>
33 #include <Protocol/PciIo.h>
34 #include <Protocol/VgaMiniPort.h>
35 #include <Protocol/DevicePath.h>
36 //
37 // The Library classes this module consumes
38 //
39 #include <Library/DebugLib.h>
40 #include <Library/UefiDriverEntryPoint.h>
41 #include <Library/BaseLib.h>
42 #include <Library/UefiLib.h>
43 #include <Library/DevicePathLib.h>
44 #include <Library/BaseMemoryLib.h>
45 #include <Library/MemoryAllocationLib.h>
46 #include <Library/UefiBootServicesTableLib.h>
47 #include <Library/ReportStatusCodeLib.h>
48
49
50 #include <IndustryStandard/Pci22.h>
51 #include "ComponentName.h"
52 #include <Protocol/VgaMiniPort.h>
53
54 //
55 // VGA specific registers
56 //
57 #define CRTC_CURSOR_START 0xA
58 #define CRTC_CURSOR_END 0xB
59
60 #define CRTC_CURSOR_LOCATION_HIGH 0xE
61 #define CRTC_CURSOR_LOCATION_LOW 0xF
62
63 #define EFI_MAX_ATTRIBUTE 0x7f
64
65 //
66 // VGA Class Device Structure
67 //
68 #define VGA_CLASS_DEV_SIGNATURE EFI_SIGNATURE_32 ('V', 'G', 'A', 'C')
69
70 typedef struct {
71 UINTN Signature;
72 EFI_HANDLE Handle;
73 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOut;
74 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
75 EFI_VGA_MINI_PORT_PROTOCOL *VgaMiniPort;
76 EFI_PCI_IO_PROTOCOL *PciIo;
77 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
78 } VGA_CLASS_DEV;
79
80 #define VGA_CLASS_DEV_FROM_THIS(a) CR (a, VGA_CLASS_DEV, SimpleTextOut, VGA_CLASS_DEV_SIGNATURE)
81
82 //
83 // Global Variables
84 //
85 extern EFI_DRIVER_BINDING_PROTOCOL gVgaClassDriverBinding;
86
87 //
88 // Driver Binding Protocol functions
89 //
90 EFI_STATUS
91 EFIAPI
92 VgaClassDriverBindingSupported (
93 IN EFI_DRIVER_BINDING_PROTOCOL *This,
94 IN EFI_HANDLE Controller,
95 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
96 )
97 /*++
98
99 Routine Description:
100
101 GC_TODO: Add function description
102
103 Arguments:
104
105 This - GC_TODO: add argument description
106 Controller - GC_TODO: add argument description
107 RemainingDevicePath - GC_TODO: add argument description
108
109 Returns:
110
111 GC_TODO: add return values
112
113 --*/
114 ;
115
116 EFI_STATUS
117 EFIAPI
118 VgaClassDriverBindingStart (
119 IN EFI_DRIVER_BINDING_PROTOCOL *This,
120 IN EFI_HANDLE Controller,
121 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
122 )
123 /*++
124
125 Routine Description:
126
127 GC_TODO: Add function description
128
129 Arguments:
130
131 This - GC_TODO: add argument description
132 Controller - GC_TODO: add argument description
133 RemainingDevicePath - GC_TODO: add argument description
134
135 Returns:
136
137 GC_TODO: add return values
138
139 --*/
140 ;
141
142 EFI_STATUS
143 EFIAPI
144 VgaClassDriverBindingStop (
145 IN EFI_DRIVER_BINDING_PROTOCOL *This,
146 IN EFI_HANDLE Controller,
147 IN UINTN NumberOfChildren,
148 IN EFI_HANDLE *ChildHandleBuffer
149 )
150 /*++
151
152 Routine Description:
153
154 GC_TODO: Add function description
155
156 Arguments:
157
158 This - GC_TODO: add argument description
159 Controller - GC_TODO: add argument description
160 NumberOfChildren - GC_TODO: add argument description
161 ChildHandleBuffer - GC_TODO: add argument description
162
163 Returns:
164
165 GC_TODO: add return values
166
167 --*/
168 ;
169
170 //
171 // Simple Text Output Protocol functions
172 //
173 EFI_STATUS
174 EFIAPI
175 VgaClassReset (
176 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
177 IN BOOLEAN ExtendedVerification
178 )
179 /*++
180
181 Routine Description:
182
183 GC_TODO: Add function description
184
185 Arguments:
186
187 This - GC_TODO: add argument description
188 ExtendedVerification - GC_TODO: add argument description
189
190 Returns:
191
192 GC_TODO: add return values
193
194 --*/
195 ;
196
197 EFI_STATUS
198 EFIAPI
199 VgaClassOutputString (
200 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
201 IN CHAR16 *WString
202 )
203 /*++
204
205 Routine Description:
206
207 GC_TODO: Add function description
208
209 Arguments:
210
211 This - GC_TODO: add argument description
212 WString - GC_TODO: add argument description
213
214 Returns:
215
216 GC_TODO: add return values
217
218 --*/
219 ;
220
221 EFI_STATUS
222 EFIAPI
223 VgaClassTestString (
224 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
225 IN CHAR16 *WString
226 )
227 /*++
228
229 Routine Description:
230
231 GC_TODO: Add function description
232
233 Arguments:
234
235 This - GC_TODO: add argument description
236 WString - GC_TODO: add argument description
237
238 Returns:
239
240 GC_TODO: add return values
241
242 --*/
243 ;
244
245 EFI_STATUS
246 EFIAPI
247 VgaClassClearScreen (
248 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
249 )
250 /*++
251
252 Routine Description:
253
254 GC_TODO: Add function description
255
256 Arguments:
257
258 This - GC_TODO: add argument description
259
260 Returns:
261
262 GC_TODO: add return values
263
264 --*/
265 ;
266
267 EFI_STATUS
268 EFIAPI
269 VgaClassSetAttribute (
270 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
271 IN UINTN Attribute
272 )
273 /*++
274
275 Routine Description:
276
277 GC_TODO: Add function description
278
279 Arguments:
280
281 This - GC_TODO: add argument description
282 Attribute - GC_TODO: add argument description
283
284 Returns:
285
286 GC_TODO: add return values
287
288 --*/
289 ;
290
291 EFI_STATUS
292 EFIAPI
293 VgaClassSetCursorPosition (
294 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
295 IN UINTN Column,
296 IN UINTN Row
297 )
298 /*++
299
300 Routine Description:
301
302 GC_TODO: Add function description
303
304 Arguments:
305
306 This - GC_TODO: add argument description
307 Column - GC_TODO: add argument description
308 Row - GC_TODO: add argument description
309
310 Returns:
311
312 GC_TODO: add return values
313
314 --*/
315 ;
316
317 EFI_STATUS
318 EFIAPI
319 VgaClassEnableCursor (
320 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
321 IN BOOLEAN Visible
322 )
323 /*++
324
325 Routine Description:
326
327 GC_TODO: Add function description
328
329 Arguments:
330
331 This - GC_TODO: add argument description
332 Visible - GC_TODO: add argument description
333
334 Returns:
335
336 GC_TODO: add return values
337
338 --*/
339 ;
340
341 EFI_STATUS
342 EFIAPI
343 VgaClassQueryMode (
344 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
345 IN UINTN ModeNumber,
346 OUT UINTN *Columns,
347 OUT UINTN *Rows
348 )
349 /*++
350
351 Routine Description:
352
353 GC_TODO: Add function description
354
355 Arguments:
356
357 This - GC_TODO: add argument description
358 ModeNumber - GC_TODO: add argument description
359 Columns - GC_TODO: add argument description
360 Rows - GC_TODO: add argument description
361
362 Returns:
363
364 GC_TODO: add return values
365
366 --*/
367 ;
368
369 EFI_STATUS
370 EFIAPI
371 VgaClassSetMode (
372 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
373 IN UINTN ModeNumber
374 )
375 /*++
376
377 Routine Description:
378
379 GC_TODO: Add function description
380
381 Arguments:
382
383 This - GC_TODO: add argument description
384 ModeNumber - GC_TODO: add argument description
385
386 Returns:
387
388 GC_TODO: add return values
389
390 --*/
391 ;
392
393 #endif