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