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