1. Add PcdConOutGopSupport and PcdConOutUgaSupport in MdeModulePkg.dec
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConSplitterDxe / ConSplitter.h
1 /**@file
2 Private data structures for the Console Splitter driver
3
4 Copyright (c) 2006 - 2007 Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _CON_SPLITTER_H_
16 #define _CON_SPLITTER_H_
17
18 #include <PiDxe.h>
19 #include <Guid/PrimaryStandardErrorDevice.h>
20 #include <Guid/PrimaryConsoleOutDevice.h>
21 #include <Protocol/GraphicsOutput.h>
22 #include <Guid/PrimaryConsoleInDevice.h>
23 #include <Protocol/SimplePointer.h>
24 #include <Protocol/SimpleTextOut.h>
25 #include <Guid/ConsoleInDevice.h>
26 #include <Protocol/SimpleTextIn.h>
27 #include <Protocol/ConsoleControl.h>
28 #include <Guid/StandardErrorDevice.h>
29 #include <Guid/ConsoleOutDevice.h>
30 #include <Protocol/UgaDraw.h>
31 #include <Library/PcdLib.h>
32 #include <Library/DebugLib.h>
33 #include <Library/UefiDriverEntryPoint.h>
34 #include <Library/UefiLib.h>
35 #include <Library/BaseLib.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/MemoryAllocationLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39
40 //
41 // Driver Binding Externs
42 //
43 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
44 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
45 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2;
46 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
47 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
48 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2;
49 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
50 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
51 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2;
52 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
53 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
54 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;
55
56 // These definitions were in the old Hii protocol, but are not in the new UEFI
57 // version. So they are defined locally.
58 #define UNICODE_NARROW_CHAR 0xFFF0
59 #define UNICODE_WIDE_CHAR 0xFFF1
60
61
62 //
63 // Private Data Structures
64 //
65 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
66 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
67 #define MAX_STD_IN_PASSWORD 80
68
69 typedef struct {
70 UINTN Columns;
71 UINTN Rows;
72 } TEXT_OUT_SPLITTER_QUERY_DATA;
73
74 //
75 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
76 //
77 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
78
79 typedef struct {
80 UINT64 Signature;
81 EFI_HANDLE VirtualHandle;
82
83 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn;
84 UINTN CurrentNumberOfConsoles;
85 EFI_SIMPLE_TEXT_INPUT_PROTOCOL **TextInList;
86 UINTN TextInListCount;
87
88 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;
89 EFI_SIMPLE_POINTER_MODE SimplePointerMode;
90 UINTN CurrentNumberOfPointers;
91 EFI_SIMPLE_POINTER_PROTOCOL **PointerList;
92 UINTN PointerListCount;
93
94 BOOLEAN PasswordEnabled;
95 CHAR16 Password[MAX_STD_IN_PASSWORD];
96 UINTN PwdIndex;
97 CHAR16 PwdAttempt[MAX_STD_IN_PASSWORD];
98 EFI_EVENT LockEvent;
99
100 BOOLEAN KeyEventSignalState;
101 BOOLEAN InputEventSignalState;
102 } TEXT_IN_SPLITTER_PRIVATE_DATA;
103
104 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
105 CR ((a), \
106 TEXT_IN_SPLITTER_PRIVATE_DATA, \
107 TextIn, \
108 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
109 )
110
111 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
112 CR ((a), \
113 TEXT_IN_SPLITTER_PRIVATE_DATA, \
114 SimplePointer, \
115 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
116 )
117
118 //
119 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
120 //
121 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
122
123 typedef struct {
124 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
125 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
126 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
127 BOOLEAN TextOutEnabled;
128 } TEXT_OUT_AND_GOP_DATA;
129
130 typedef struct {
131 UINT32 HorizontalResolution;
132 UINT32 VerticalResolution;
133 } TEXT_OUT_GOP_MODE;
134
135 typedef struct {
136 UINT64 Signature;
137 EFI_HANDLE VirtualHandle;
138 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;
139 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
140
141 EFI_UGA_DRAW_PROTOCOL UgaDraw;
142 UINT32 UgaHorizontalResolution;
143 UINT32 UgaVerticalResolution;
144 UINT32 UgaColorDepth;
145 UINT32 UgaRefreshRate;
146 EFI_UGA_PIXEL *UgaBlt;
147
148 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
149 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
150 TEXT_OUT_GOP_MODE *GraphicsOutputModeBuffer;
151 UINTN CurrentNumberOfGraphicsOutput;
152 BOOLEAN HardwareNeedsStarting;
153
154 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
155
156 UINTN CurrentNumberOfConsoles;
157 TEXT_OUT_AND_GOP_DATA *TextOutList;
158 UINTN TextOutListCount;
159 TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;
160 UINTN TextOutQueryDataCount;
161 INT32 *TextOutModeMap;
162
163 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode;
164
165 UINTN DevNullColumns;
166 UINTN DevNullRows;
167 CHAR16 *DevNullScreen;
168 INT32 *DevNullAttributes;
169
170 } TEXT_OUT_SPLITTER_PRIVATE_DATA;
171
172 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
173 CR ((a), \
174 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
175 TextOut, \
176 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
177 )
178
179 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
180 CR ((a), \
181 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
182 GraphicsOutput, \
183 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
184 )
185
186 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
187 CR ((a), \
188 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
189 UgaDraw, \
190 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
191 )
192
193 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
194 CR ((a), \
195 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
196 ConsoleControl, \
197 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
198 )
199
200 //
201 // Function Prototypes
202 //
203 EFI_STATUS
204 EFIAPI
205 ConSplitterDriverEntry (
206 IN EFI_HANDLE ImageHandle,
207 IN EFI_SYSTEM_TABLE *SystemTable
208 )
209 ;
210
211 EFI_STATUS
212 ConSplitterTextInConstructor (
213 TEXT_IN_SPLITTER_PRIVATE_DATA *Private
214 )
215 ;
216
217 EFI_STATUS
218 ConSplitterTextOutConstructor (
219 TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
220 )
221 ;
222
223 //
224 // Driver Binding Functions
225 //
226 EFI_STATUS
227 EFIAPI
228 ConSplitterConInDriverBindingSupported (
229 IN EFI_DRIVER_BINDING_PROTOCOL *This,
230 IN EFI_HANDLE ControllerHandle,
231 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
232 )
233 ;
234
235 EFI_STATUS
236 EFIAPI
237 ConSplitterSimplePointerDriverBindingSupported (
238 IN EFI_DRIVER_BINDING_PROTOCOL *This,
239 IN EFI_HANDLE ControllerHandle,
240 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
241 )
242 ;
243
244 EFI_STATUS
245 EFIAPI
246 ConSplitterConOutDriverBindingSupported (
247 IN EFI_DRIVER_BINDING_PROTOCOL *This,
248 IN EFI_HANDLE ControllerHandle,
249 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
250 )
251 ;
252
253 EFI_STATUS
254 EFIAPI
255 ConSplitterStdErrDriverBindingSupported (
256 IN EFI_DRIVER_BINDING_PROTOCOL *This,
257 IN EFI_HANDLE ControllerHandle,
258 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
259 )
260 ;
261
262 EFI_STATUS
263 EFIAPI
264 ConSplitterConInDriverBindingStart (
265 IN EFI_DRIVER_BINDING_PROTOCOL *This,
266 IN EFI_HANDLE ControllerHandle,
267 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
268 )
269 ;
270
271 EFI_STATUS
272 EFIAPI
273 ConSplitterSimplePointerDriverBindingStart (
274 IN EFI_DRIVER_BINDING_PROTOCOL *This,
275 IN EFI_HANDLE ControllerHandle,
276 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
277 )
278 ;
279
280 EFI_STATUS
281 EFIAPI
282 ConSplitterConOutDriverBindingStart (
283 IN EFI_DRIVER_BINDING_PROTOCOL *This,
284 IN EFI_HANDLE ControllerHandle,
285 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
286 )
287 ;
288
289 EFI_STATUS
290 EFIAPI
291 ConSplitterStdErrDriverBindingStart (
292 IN EFI_DRIVER_BINDING_PROTOCOL *This,
293 IN EFI_HANDLE ControllerHandle,
294 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
295 )
296 ;
297
298 EFI_STATUS
299 EFIAPI
300 ConSplitterConInDriverBindingStop (
301 IN EFI_DRIVER_BINDING_PROTOCOL *This,
302 IN EFI_HANDLE ControllerHandle,
303 IN UINTN NumberOfChildren,
304 IN EFI_HANDLE *ChildHandleBuffer
305 )
306 ;
307
308 EFI_STATUS
309 EFIAPI
310 ConSplitterSimplePointerDriverBindingStop (
311 IN EFI_DRIVER_BINDING_PROTOCOL *This,
312 IN EFI_HANDLE ControllerHandle,
313 IN UINTN NumberOfChildren,
314 IN EFI_HANDLE *ChildHandleBuffer
315 )
316 ;
317
318 EFI_STATUS
319 EFIAPI
320 ConSplitterConOutDriverBindingStop (
321 IN EFI_DRIVER_BINDING_PROTOCOL *This,
322 IN EFI_HANDLE ControllerHandle,
323 IN UINTN NumberOfChildren,
324 IN EFI_HANDLE *ChildHandleBuffer
325 )
326 ;
327
328 EFI_STATUS
329 EFIAPI
330 ConSplitterStdErrDriverBindingStop (
331 IN EFI_DRIVER_BINDING_PROTOCOL *This,
332 IN EFI_HANDLE ControllerHandle,
333 IN UINTN NumberOfChildren,
334 IN EFI_HANDLE *ChildHandleBuffer
335 )
336 ;
337
338 /**
339 Retrieves a Unicode string that is the user readable name of the driver.
340
341 This function retrieves the user readable name of a driver in the form of a
342 Unicode string. If the driver specified by This has a user readable name in
343 the language specified by Language, then a pointer to the driver name is
344 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
345 by This does not support the language specified by Language,
346 then EFI_UNSUPPORTED is returned.
347
348 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
349 EFI_COMPONENT_NAME_PROTOCOL instance.
350
351 @param Language[in] A pointer to a Null-terminated ASCII string
352 array indicating the language. This is the
353 language of the driver name that the caller is
354 requesting, and it must match one of the
355 languages specified in SupportedLanguages. The
356 number of languages supported by a driver is up
357 to the driver writer. Language is specified
358 in RFC 3066 or ISO 639-2 language code format.
359
360 @param DriverName[out] A pointer to the Unicode string to return.
361 This Unicode string is the name of the
362 driver specified by This in the language
363 specified by Language.
364
365 @retval EFI_SUCCESS The Unicode string for the Driver specified by
366 This and the language specified by Language was
367 returned in DriverName.
368
369 @retval EFI_INVALID_PARAMETER Language is NULL.
370
371 @retval EFI_INVALID_PARAMETER DriverName is NULL.
372
373 @retval EFI_UNSUPPORTED The driver specified by This does not support
374 the language specified by Language.
375
376 **/
377 EFI_STATUS
378 EFIAPI
379 ConSplitterComponentNameGetDriverName (
380 IN EFI_COMPONENT_NAME_PROTOCOL *This,
381 IN CHAR8 *Language,
382 OUT CHAR16 **DriverName
383 );
384
385
386 /**
387 Retrieves a Unicode string that is the user readable name of the controller
388 that is being managed by a driver.
389
390 This function retrieves the user readable name of the controller specified by
391 ControllerHandle and ChildHandle in the form of a Unicode string. If the
392 driver specified by This has a user readable name in the language specified by
393 Language, then a pointer to the controller name is returned in ControllerName,
394 and EFI_SUCCESS is returned. If the driver specified by This is not currently
395 managing the controller specified by ControllerHandle and ChildHandle,
396 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
397 support the language specified by Language, then EFI_UNSUPPORTED is returned.
398
399 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
400 EFI_COMPONENT_NAME_PROTOCOL instance.
401
402 @param ControllerHandle[in] The handle of a controller that the driver
403 specified by This is managing. This handle
404 specifies the controller whose name is to be
405 returned.
406
407 @param ChildHandle[in] The handle of the child controller to retrieve
408 the name of. This is an optional parameter that
409 may be NULL. It will be NULL for device
410 drivers. It will also be NULL for a bus drivers
411 that wish to retrieve the name of the bus
412 controller. It will not be NULL for a bus
413 driver that wishes to retrieve the name of a
414 child controller.
415
416 @param Language[in] A pointer to a Null-terminated ASCII string
417 array indicating the language. This is the
418 language of the driver name that the caller is
419 requesting, and it must match one of the
420 languages specified in SupportedLanguages. The
421 number of languages supported by a driver is up
422 to the driver writer. Language is specified in
423 RFC 3066 or ISO 639-2 language code format.
424
425 @param ControllerName[out] A pointer to the Unicode string to return.
426 This Unicode string is the name of the
427 controller specified by ControllerHandle and
428 ChildHandle in the language specified by
429 Language from the point of view of the driver
430 specified by This.
431
432 @retval EFI_SUCCESS The Unicode string for the user readable name in
433 the language specified by Language for the
434 driver specified by This was returned in
435 DriverName.
436
437 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
438
439 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
440 EFI_HANDLE.
441
442 @retval EFI_INVALID_PARAMETER Language is NULL.
443
444 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
445
446 @retval EFI_UNSUPPORTED The driver specified by This is not currently
447 managing the controller specified by
448 ControllerHandle and ChildHandle.
449
450 @retval EFI_UNSUPPORTED The driver specified by This does not support
451 the language specified by Language.
452
453 **/
454 EFI_STATUS
455 EFIAPI
456 ConSplitterConInComponentNameGetControllerName (
457 IN EFI_COMPONENT_NAME_PROTOCOL *This,
458 IN EFI_HANDLE ControllerHandle,
459 IN EFI_HANDLE ChildHandle OPTIONAL,
460 IN CHAR8 *Language,
461 OUT CHAR16 **ControllerName
462 );
463
464
465 /**
466 Retrieves a Unicode string that is the user readable name of the controller
467 that is being managed by a driver.
468
469 This function retrieves the user readable name of the controller specified by
470 ControllerHandle and ChildHandle in the form of a Unicode string. If the
471 driver specified by This has a user readable name in the language specified by
472 Language, then a pointer to the controller name is returned in ControllerName,
473 and EFI_SUCCESS is returned. If the driver specified by This is not currently
474 managing the controller specified by ControllerHandle and ChildHandle,
475 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
476 support the language specified by Language, then EFI_UNSUPPORTED is returned.
477
478 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
479 EFI_COMPONENT_NAME_PROTOCOL instance.
480
481 @param ControllerHandle[in] The handle of a controller that the driver
482 specified by This is managing. This handle
483 specifies the controller whose name is to be
484 returned.
485
486 @param ChildHandle[in] The handle of the child controller to retrieve
487 the name of. This is an optional parameter that
488 may be NULL. It will be NULL for device
489 drivers. It will also be NULL for a bus drivers
490 that wish to retrieve the name of the bus
491 controller. It will not be NULL for a bus
492 driver that wishes to retrieve the name of a
493 child controller.
494
495 @param Language[in] A pointer to a Null-terminated ASCII string
496 array indicating the language. This is the
497 language of the driver name that the caller is
498 requesting, and it must match one of the
499 languages specified in SupportedLanguages. The
500 number of languages supported by a driver is up
501 to the driver writer. Language is specified in
502 RFC 3066 or ISO 639-2 language code format.
503
504 @param ControllerName[out] A pointer to the Unicode string to return.
505 This Unicode string is the name of the
506 controller specified by ControllerHandle and
507 ChildHandle in the language specified by
508 Language from the point of view of the driver
509 specified by This.
510
511 @retval EFI_SUCCESS The Unicode string for the user readable name in
512 the language specified by Language for the
513 driver specified by This was returned in
514 DriverName.
515
516 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
517
518 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
519 EFI_HANDLE.
520
521 @retval EFI_INVALID_PARAMETER Language is NULL.
522
523 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
524
525 @retval EFI_UNSUPPORTED The driver specified by This is not currently
526 managing the controller specified by
527 ControllerHandle and ChildHandle.
528
529 @retval EFI_UNSUPPORTED The driver specified by This does not support
530 the language specified by Language.
531
532 **/
533 EFI_STATUS
534 EFIAPI
535 ConSplitterSimplePointerComponentNameGetControllerName (
536 IN EFI_COMPONENT_NAME_PROTOCOL *This,
537 IN EFI_HANDLE ControllerHandle,
538 IN EFI_HANDLE ChildHandle OPTIONAL,
539 IN CHAR8 *Language,
540 OUT CHAR16 **ControllerName
541 );
542
543
544 /**
545 Retrieves a Unicode string that is the user readable name of the controller
546 that is being managed by a driver.
547
548 This function retrieves the user readable name of the controller specified by
549 ControllerHandle and ChildHandle in the form of a Unicode string. If the
550 driver specified by This has a user readable name in the language specified by
551 Language, then a pointer to the controller name is returned in ControllerName,
552 and EFI_SUCCESS is returned. If the driver specified by This is not currently
553 managing the controller specified by ControllerHandle and ChildHandle,
554 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
555 support the language specified by Language, then EFI_UNSUPPORTED is returned.
556
557 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
558 EFI_COMPONENT_NAME_PROTOCOL instance.
559
560 @param ControllerHandle[in] The handle of a controller that the driver
561 specified by This is managing. This handle
562 specifies the controller whose name is to be
563 returned.
564
565 @param ChildHandle[in] The handle of the child controller to retrieve
566 the name of. This is an optional parameter that
567 may be NULL. It will be NULL for device
568 drivers. It will also be NULL for a bus drivers
569 that wish to retrieve the name of the bus
570 controller. It will not be NULL for a bus
571 driver that wishes to retrieve the name of a
572 child controller.
573
574 @param Language[in] A pointer to a Null-terminated ASCII string
575 array indicating the language. This is the
576 language of the driver name that the caller is
577 requesting, and it must match one of the
578 languages specified in SupportedLanguages. The
579 number of languages supported by a driver is up
580 to the driver writer. Language is specified in
581 RFC 3066 or ISO 639-2 language code format.
582
583 @param ControllerName[out] A pointer to the Unicode string to return.
584 This Unicode string is the name of the
585 controller specified by ControllerHandle and
586 ChildHandle in the language specified by
587 Language from the point of view of the driver
588 specified by This.
589
590 @retval EFI_SUCCESS The Unicode string for the user readable name in
591 the language specified by Language for the
592 driver specified by This was returned in
593 DriverName.
594
595 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
596
597 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
598 EFI_HANDLE.
599
600 @retval EFI_INVALID_PARAMETER Language is NULL.
601
602 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
603
604 @retval EFI_UNSUPPORTED The driver specified by This is not currently
605 managing the controller specified by
606 ControllerHandle and ChildHandle.
607
608 @retval EFI_UNSUPPORTED The driver specified by This does not support
609 the language specified by Language.
610
611 **/
612 EFI_STATUS
613 EFIAPI
614 ConSplitterConOutComponentNameGetControllerName (
615 IN EFI_COMPONENT_NAME_PROTOCOL *This,
616 IN EFI_HANDLE ControllerHandle,
617 IN EFI_HANDLE ChildHandle OPTIONAL,
618 IN CHAR8 *Language,
619 OUT CHAR16 **ControllerName
620 );
621
622
623 /**
624 Retrieves a Unicode string that is the user readable name of the controller
625 that is being managed by a driver.
626
627 This function retrieves the user readable name of the controller specified by
628 ControllerHandle and ChildHandle in the form of a Unicode string. If the
629 driver specified by This has a user readable name in the language specified by
630 Language, then a pointer to the controller name is returned in ControllerName,
631 and EFI_SUCCESS is returned. If the driver specified by This is not currently
632 managing the controller specified by ControllerHandle and ChildHandle,
633 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
634 support the language specified by Language, then EFI_UNSUPPORTED is returned.
635
636 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
637 EFI_COMPONENT_NAME_PROTOCOL instance.
638
639 @param ControllerHandle[in] The handle of a controller that the driver
640 specified by This is managing. This handle
641 specifies the controller whose name is to be
642 returned.
643
644 @param ChildHandle[in] The handle of the child controller to retrieve
645 the name of. This is an optional parameter that
646 may be NULL. It will be NULL for device
647 drivers. It will also be NULL for a bus drivers
648 that wish to retrieve the name of the bus
649 controller. It will not be NULL for a bus
650 driver that wishes to retrieve the name of a
651 child controller.
652
653 @param Language[in] A pointer to a Null-terminated ASCII string
654 array indicating the language. This is the
655 language of the driver name that the caller is
656 requesting, and it must match one of the
657 languages specified in SupportedLanguages. The
658 number of languages supported by a driver is up
659 to the driver writer. Language is specified in
660 RFC 3066 or ISO 639-2 language code format.
661
662 @param ControllerName[out] A pointer to the Unicode string to return.
663 This Unicode string is the name of the
664 controller specified by ControllerHandle and
665 ChildHandle in the language specified by
666 Language from the point of view of the driver
667 specified by This.
668
669 @retval EFI_SUCCESS The Unicode string for the user readable name in
670 the language specified by Language for the
671 driver specified by This was returned in
672 DriverName.
673
674 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
675
676 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
677 EFI_HANDLE.
678
679 @retval EFI_INVALID_PARAMETER Language is NULL.
680
681 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
682
683 @retval EFI_UNSUPPORTED The driver specified by This is not currently
684 managing the controller specified by
685 ControllerHandle and ChildHandle.
686
687 @retval EFI_UNSUPPORTED The driver specified by This does not support
688 the language specified by Language.
689
690 **/
691 EFI_STATUS
692 EFIAPI
693 ConSplitterStdErrComponentNameGetControllerName (
694 IN EFI_COMPONENT_NAME_PROTOCOL *This,
695 IN EFI_HANDLE ControllerHandle,
696 IN EFI_HANDLE ChildHandle OPTIONAL,
697 IN CHAR8 *Language,
698 OUT CHAR16 **ControllerName
699 );
700
701
702 //
703 // TextIn Constructor/Destructor functions
704 //
705 EFI_STATUS
706 ConSplitterTextInAddDevice (
707 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
708 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
709 )
710 ;
711
712 EFI_STATUS
713 ConSplitterTextInDeleteDevice (
714 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
715 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
716 )
717 ;
718
719 //
720 // SimplePointer Constuctor/Destructor functions
721 //
722 EFI_STATUS
723 ConSplitterSimplePointerAddDevice (
724 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
725 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
726 )
727 ;
728
729 EFI_STATUS
730 ConSplitterSimplePointerDeleteDevice (
731 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
732 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
733 )
734 ;
735
736 //
737 // TextOut Constuctor/Destructor functions
738 //
739 EFI_STATUS
740 ConSplitterTextOutAddDevice (
741 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
742 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut,
743 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
744 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
745 )
746 ;
747
748 EFI_STATUS
749 ConSplitterTextOutDeleteDevice (
750 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
751 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
752 )
753 ;
754
755 //
756 // TextIn I/O Functions
757 //
758 EFI_STATUS
759 EFIAPI
760 ConSplitterTextInReset (
761 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
762 IN BOOLEAN ExtendedVerification
763 )
764 ;
765
766 EFI_STATUS
767 EFIAPI
768 ConSplitterTextInReadKeyStroke (
769 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
770 OUT EFI_INPUT_KEY *Key
771 )
772 ;
773
774 VOID
775 EFIAPI
776 ConSplitterTextInWaitForKey (
777 IN EFI_EVENT Event,
778 IN VOID *Context
779 )
780 ;
781
782 BOOLEAN
783 ConSpliterConssoleControlStdInLocked (
784 VOID
785 )
786 ;
787
788 VOID
789 EFIAPI
790 ConSpliterConsoleControlLockStdInEvent (
791 IN EFI_EVENT Event,
792 IN VOID *Context
793 )
794 ;
795
796 EFI_STATUS
797 EFIAPI
798 ConSpliterConsoleControlLockStdIn (
799 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
800 IN CHAR16 *Password
801 )
802 ;
803
804 EFI_STATUS
805 EFIAPI
806 ConSplitterTextInPrivateReadKeyStroke (
807 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
808 OUT EFI_INPUT_KEY *Key
809 )
810 ;
811
812 EFI_STATUS
813 EFIAPI
814 ConSplitterSimplePointerReset (
815 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
816 IN BOOLEAN ExtendedVerification
817 )
818 ;
819
820 EFI_STATUS
821 EFIAPI
822 ConSplitterSimplePointerGetState (
823 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
824 IN OUT EFI_SIMPLE_POINTER_STATE *State
825 )
826 ;
827
828 VOID
829 EFIAPI
830 ConSplitterSimplePointerWaitForInput (
831 IN EFI_EVENT Event,
832 IN VOID *Context
833 )
834 ;
835
836 //
837 // TextOut I/O Functions
838 //
839 VOID
840 ConSplitterSynchronizeModeData (
841 TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
842 )
843 ;
844
845 EFI_STATUS
846 EFIAPI
847 ConSplitterTextOutReset (
848 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
849 IN BOOLEAN ExtendedVerification
850 )
851 ;
852
853 EFI_STATUS
854 EFIAPI
855 ConSplitterTextOutOutputString (
856 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
857 IN CHAR16 *WString
858 )
859 ;
860
861 EFI_STATUS
862 EFIAPI
863 ConSplitterTextOutTestString (
864 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
865 IN CHAR16 *WString
866 )
867 ;
868
869 EFI_STATUS
870 EFIAPI
871 ConSplitterTextOutQueryMode (
872 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
873 IN UINTN ModeNumber,
874 OUT UINTN *Columns,
875 OUT UINTN *Rows
876 )
877 ;
878
879 EFI_STATUS
880 EFIAPI
881 ConSplitterTextOutSetMode (
882 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
883 IN UINTN ModeNumber
884 )
885 ;
886
887 EFI_STATUS
888 EFIAPI
889 ConSplitterTextOutSetAttribute (
890 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
891 IN UINTN Attribute
892 )
893 ;
894
895 EFI_STATUS
896 EFIAPI
897 ConSplitterTextOutClearScreen (
898 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
899 )
900 ;
901
902 EFI_STATUS
903 EFIAPI
904 ConSplitterTextOutSetCursorPosition (
905 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
906 IN UINTN Column,
907 IN UINTN Row
908 )
909 ;
910
911 EFI_STATUS
912 EFIAPI
913 ConSplitterTextOutEnableCursor (
914 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
915 IN BOOLEAN Visible
916 )
917 ;
918
919 EFI_STATUS
920 ConSplitterGrowBuffer (
921 IN UINTN SizeOfCount,
922 IN UINTN *Count,
923 IN OUT VOID **Buffer
924 )
925 ;
926
927 EFI_STATUS
928 EFIAPI
929 ConSpliterConsoleControlGetMode (
930 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
931 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
932 OUT BOOLEAN *GopExists,
933 OUT BOOLEAN *StdInLocked
934 )
935 ;
936
937 EFI_STATUS
938 EFIAPI
939 ConSpliterConsoleControlSetMode (
940 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
941 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
942 )
943 ;
944
945 EFI_STATUS
946 EFIAPI
947 ConSpliterGraphicsOutputQueryMode (
948 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
949 IN UINT32 ModeNumber,
950 OUT UINTN *SizeOfInfo,
951 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
952 )
953 ;
954
955 EFI_STATUS
956 EFIAPI
957 ConSpliterGraphicsOutputSetMode (
958 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
959 IN UINT32 ModeNumber
960 )
961 ;
962
963 EFI_STATUS
964 EFIAPI
965 ConSpliterGraphicsOutputBlt (
966 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
967 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
968 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
969 IN UINTN SourceX,
970 IN UINTN SourceY,
971 IN UINTN DestinationX,
972 IN UINTN DestinationY,
973 IN UINTN Width,
974 IN UINTN Height,
975 IN UINTN Delta OPTIONAL
976 )
977 ;
978
979 EFI_STATUS
980 DevNullGopSync (
981 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
982 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
983 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
984 )
985 ;
986
987 EFI_STATUS
988 EFIAPI
989 ConSpliterUgaDrawGetMode (
990 IN EFI_UGA_DRAW_PROTOCOL *This,
991 OUT UINT32 *HorizontalResolution,
992 OUT UINT32 *VerticalResolution,
993 OUT UINT32 *ColorDepth,
994 OUT UINT32 *RefreshRate
995 )
996 ;
997
998 EFI_STATUS
999 EFIAPI
1000 ConSpliterUgaDrawSetMode (
1001 IN EFI_UGA_DRAW_PROTOCOL *This,
1002 IN UINT32 HorizontalResolution,
1003 IN UINT32 VerticalResolution,
1004 IN UINT32 ColorDepth,
1005 IN UINT32 RefreshRate
1006 )
1007 ;
1008
1009 EFI_STATUS
1010 EFIAPI
1011 ConSpliterUgaDrawBlt (
1012 IN EFI_UGA_DRAW_PROTOCOL *This,
1013 IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
1014 IN EFI_UGA_BLT_OPERATION BltOperation,
1015 IN UINTN SourceX,
1016 IN UINTN SourceY,
1017 IN UINTN DestinationX,
1018 IN UINTN DestinationY,
1019 IN UINTN Width,
1020 IN UINTN Height,
1021 IN UINTN Delta OPTIONAL
1022 )
1023 ;
1024
1025 EFI_STATUS
1026 DevNullUgaSync (
1027 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1028 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
1029 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
1030 )
1031 ;
1032
1033 EFI_STATUS
1034 DevNullTextOutOutputString (
1035 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1036 IN CHAR16 *WString
1037 )
1038 ;
1039
1040 EFI_STATUS
1041 DevNullTextOutSetMode (
1042 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1043 IN UINTN ModeNumber
1044 )
1045 ;
1046
1047 EFI_STATUS
1048 DevNullTextOutClearScreen (
1049 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
1050 )
1051 ;
1052
1053 EFI_STATUS
1054 DevNullTextOutSetCursorPosition (
1055 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1056 IN UINTN Column,
1057 IN UINTN Row
1058 )
1059 ;
1060
1061 EFI_STATUS
1062 DevNullTextOutEnableCursor (
1063 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1064 IN BOOLEAN Visible
1065 )
1066 ;
1067
1068 EFI_STATUS
1069 DevNullSyncGopStdOut (
1070 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
1071 )
1072 ;
1073
1074 #endif