2 Private data structures for the Console Splitter driver
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
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.
15 #ifndef _CON_SPLITTER_H_
16 #define _CON_SPLITTER_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/SimpleTextInEx.h>
28 #include <Protocol/ConsoleControl.h>
29 #include <Guid/StandardErrorDevice.h>
30 #include <Guid/ConsoleOutDevice.h>
31 #include <Protocol/UgaDraw.h>
32 #include <Library/PcdLib.h>
33 #include <Library/DebugLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/UefiLib.h>
36 #include <Library/BaseLib.h>
37 #include <Library/BaseMemoryLib.h>
38 #include <Library/MemoryAllocationLib.h>
39 #include <Library/UefiBootServicesTableLib.h>
42 // Driver Binding Externs
44 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
45 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
46 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
47 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
48 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
49 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
50 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
57 extern EFI_GUID gSimpleTextInExNotifyGuid
;
59 // These definitions were in the old Hii protocol, but are not in the new UEFI
60 // version. So they are defined locally.
61 #define UNICODE_NARROW_CHAR 0xFFF0
62 #define UNICODE_WIDE_CHAR 0xFFF1
66 // Private Data Structures
68 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
69 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
70 #define MAX_STD_IN_PASSWORD 80
75 } TEXT_OUT_SPLITTER_QUERY_DATA
;
78 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
80 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
82 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'n')
84 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
86 EFI_HANDLE
*NotifyHandleList
;
87 EFI_HANDLE NotifyHandle
;
89 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
90 LIST_ENTRY NotifyEntry
;
91 } TEXT_IN_EX_SPLITTER_NOTIFY
;
94 EFI_HANDLE VirtualHandle
;
96 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
97 UINTN CurrentNumberOfConsoles
;
98 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
99 UINTN TextInListCount
;
101 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
102 UINTN CurrentNumberOfExConsoles
;
103 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
104 UINTN TextInExListCount
;
105 LIST_ENTRY NotifyList
;
108 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
109 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
110 UINTN CurrentNumberOfPointers
;
111 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
112 UINTN PointerListCount
;
114 BOOLEAN PasswordEnabled
;
115 CHAR16 Password
[MAX_STD_IN_PASSWORD
];
117 CHAR16 PwdAttempt
[MAX_STD_IN_PASSWORD
];
120 BOOLEAN KeyEventSignalState
;
121 BOOLEAN InputEventSignalState
;
122 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
124 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
126 TEXT_IN_SPLITTER_PRIVATE_DATA, \
128 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
131 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
133 TEXT_IN_SPLITTER_PRIVATE_DATA, \
135 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
137 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
139 TEXT_IN_SPLITTER_PRIVATE_DATA, \
141 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
144 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
146 TEXT_IN_SPLITTER_PRIVATE_DATA, \
148 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
152 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
154 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
157 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
158 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
159 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
160 BOOLEAN TextOutEnabled
;
161 } TEXT_OUT_AND_GOP_DATA
;
164 UINT32 HorizontalResolution
;
165 UINT32 VerticalResolution
;
170 EFI_HANDLE VirtualHandle
;
171 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
172 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
174 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
175 UINT32 UgaHorizontalResolution
;
176 UINT32 UgaVerticalResolution
;
177 UINT32 UgaColorDepth
;
178 UINT32 UgaRefreshRate
;
179 EFI_UGA_PIXEL
*UgaBlt
;
181 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
182 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*GraphicsOutputBlt
;
183 TEXT_OUT_GOP_MODE
*GraphicsOutputModeBuffer
;
184 UINTN CurrentNumberOfGraphicsOutput
;
185 BOOLEAN HardwareNeedsStarting
;
187 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl
;
189 UINTN CurrentNumberOfConsoles
;
190 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
191 UINTN TextOutListCount
;
192 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
193 UINTN TextOutQueryDataCount
;
194 INT32
*TextOutModeMap
;
196 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode
;
198 UINTN DevNullColumns
;
200 CHAR16
*DevNullScreen
;
201 INT32
*DevNullAttributes
;
203 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
205 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
207 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
209 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
212 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
214 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
216 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
219 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
221 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
223 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
226 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
228 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
230 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
234 // Function Prototypes
238 ConSplitterDriverEntry (
239 IN EFI_HANDLE ImageHandle
,
240 IN EFI_SYSTEM_TABLE
*SystemTable
245 ConSplitterTextInConstructor (
246 TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
251 ConSplitterTextOutConstructor (
252 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
257 // Driver Binding Functions
261 ConSplitterConInDriverBindingSupported (
262 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
263 IN EFI_HANDLE ControllerHandle
,
264 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
270 ConSplitterSimplePointerDriverBindingSupported (
271 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
272 IN EFI_HANDLE ControllerHandle
,
273 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
279 ConSplitterConOutDriverBindingSupported (
280 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
281 IN EFI_HANDLE ControllerHandle
,
282 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
288 ConSplitterStdErrDriverBindingSupported (
289 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
290 IN EFI_HANDLE ControllerHandle
,
291 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
297 ConSplitterConInDriverBindingStart (
298 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
299 IN EFI_HANDLE ControllerHandle
,
300 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
306 ConSplitterSimplePointerDriverBindingStart (
307 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
308 IN EFI_HANDLE ControllerHandle
,
309 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
315 ConSplitterConOutDriverBindingStart (
316 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
317 IN EFI_HANDLE ControllerHandle
,
318 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
324 ConSplitterStdErrDriverBindingStart (
325 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
326 IN EFI_HANDLE ControllerHandle
,
327 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
333 ConSplitterConInDriverBindingStop (
334 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
335 IN EFI_HANDLE ControllerHandle
,
336 IN UINTN NumberOfChildren
,
337 IN EFI_HANDLE
*ChildHandleBuffer
343 ConSplitterSimplePointerDriverBindingStop (
344 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
345 IN EFI_HANDLE ControllerHandle
,
346 IN UINTN NumberOfChildren
,
347 IN EFI_HANDLE
*ChildHandleBuffer
353 ConSplitterConOutDriverBindingStop (
354 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
355 IN EFI_HANDLE ControllerHandle
,
356 IN UINTN NumberOfChildren
,
357 IN EFI_HANDLE
*ChildHandleBuffer
363 ConSplitterStdErrDriverBindingStop (
364 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
365 IN EFI_HANDLE ControllerHandle
,
366 IN UINTN NumberOfChildren
,
367 IN EFI_HANDLE
*ChildHandleBuffer
372 Retrieves a Unicode string that is the user readable name of the driver.
374 This function retrieves the user readable name of a driver in the form of a
375 Unicode string. If the driver specified by This has a user readable name in
376 the language specified by Language, then a pointer to the driver name is
377 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
378 by This does not support the language specified by Language,
379 then EFI_UNSUPPORTED is returned.
381 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
382 EFI_COMPONENT_NAME_PROTOCOL instance.
384 @param Language[in] A pointer to a Null-terminated ASCII string
385 array indicating the language. This is the
386 language of the driver name that the caller is
387 requesting, and it must match one of the
388 languages specified in SupportedLanguages. The
389 number of languages supported by a driver is up
390 to the driver writer. Language is specified
391 in RFC 3066 or ISO 639-2 language code format.
393 @param DriverName[out] A pointer to the Unicode string to return.
394 This Unicode string is the name of the
395 driver specified by This in the language
396 specified by Language.
398 @retval EFI_SUCCESS The Unicode string for the Driver specified by
399 This and the language specified by Language was
400 returned in DriverName.
402 @retval EFI_INVALID_PARAMETER Language is NULL.
404 @retval EFI_INVALID_PARAMETER DriverName is NULL.
406 @retval EFI_UNSUPPORTED The driver specified by This does not support
407 the language specified by Language.
412 ConSplitterComponentNameGetDriverName (
413 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
415 OUT CHAR16
**DriverName
420 Retrieves a Unicode string that is the user readable name of the controller
421 that is being managed by a driver.
423 This function retrieves the user readable name of the controller specified by
424 ControllerHandle and ChildHandle in the form of a Unicode string. If the
425 driver specified by This has a user readable name in the language specified by
426 Language, then a pointer to the controller name is returned in ControllerName,
427 and EFI_SUCCESS is returned. If the driver specified by This is not currently
428 managing the controller specified by ControllerHandle and ChildHandle,
429 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
430 support the language specified by Language, then EFI_UNSUPPORTED is returned.
432 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
433 EFI_COMPONENT_NAME_PROTOCOL instance.
435 @param ControllerHandle[in] The handle of a controller that the driver
436 specified by This is managing. This handle
437 specifies the controller whose name is to be
440 @param ChildHandle[in] The handle of the child controller to retrieve
441 the name of. This is an optional parameter that
442 may be NULL. It will be NULL for device
443 drivers. It will also be NULL for a bus drivers
444 that wish to retrieve the name of the bus
445 controller. It will not be NULL for a bus
446 driver that wishes to retrieve the name of a
449 @param Language[in] A pointer to a Null-terminated ASCII string
450 array indicating the language. This is the
451 language of the driver name that the caller is
452 requesting, and it must match one of the
453 languages specified in SupportedLanguages. The
454 number of languages supported by a driver is up
455 to the driver writer. Language is specified in
456 RFC 3066 or ISO 639-2 language code format.
458 @param ControllerName[out] A pointer to the Unicode string to return.
459 This Unicode string is the name of the
460 controller specified by ControllerHandle and
461 ChildHandle in the language specified by
462 Language from the point of view of the driver
465 @retval EFI_SUCCESS The Unicode string for the user readable name in
466 the language specified by Language for the
467 driver specified by This was returned in
470 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
472 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
475 @retval EFI_INVALID_PARAMETER Language is NULL.
477 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
479 @retval EFI_UNSUPPORTED The driver specified by This is not currently
480 managing the controller specified by
481 ControllerHandle and ChildHandle.
483 @retval EFI_UNSUPPORTED The driver specified by This does not support
484 the language specified by Language.
489 ConSplitterConInComponentNameGetControllerName (
490 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
491 IN EFI_HANDLE ControllerHandle
,
492 IN EFI_HANDLE ChildHandle OPTIONAL
,
494 OUT CHAR16
**ControllerName
499 Retrieves a Unicode string that is the user readable name of the controller
500 that is being managed by a driver.
502 This function retrieves the user readable name of the controller specified by
503 ControllerHandle and ChildHandle in the form of a Unicode string. If the
504 driver specified by This has a user readable name in the language specified by
505 Language, then a pointer to the controller name is returned in ControllerName,
506 and EFI_SUCCESS is returned. If the driver specified by This is not currently
507 managing the controller specified by ControllerHandle and ChildHandle,
508 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
509 support the language specified by Language, then EFI_UNSUPPORTED is returned.
511 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
512 EFI_COMPONENT_NAME_PROTOCOL instance.
514 @param ControllerHandle[in] The handle of a controller that the driver
515 specified by This is managing. This handle
516 specifies the controller whose name is to be
519 @param ChildHandle[in] The handle of the child controller to retrieve
520 the name of. This is an optional parameter that
521 may be NULL. It will be NULL for device
522 drivers. It will also be NULL for a bus drivers
523 that wish to retrieve the name of the bus
524 controller. It will not be NULL for a bus
525 driver that wishes to retrieve the name of a
528 @param Language[in] A pointer to a Null-terminated ASCII string
529 array indicating the language. This is the
530 language of the driver name that the caller is
531 requesting, and it must match one of the
532 languages specified in SupportedLanguages. The
533 number of languages supported by a driver is up
534 to the driver writer. Language is specified in
535 RFC 3066 or ISO 639-2 language code format.
537 @param ControllerName[out] A pointer to the Unicode string to return.
538 This Unicode string is the name of the
539 controller specified by ControllerHandle and
540 ChildHandle in the language specified by
541 Language from the point of view of the driver
544 @retval EFI_SUCCESS The Unicode string for the user readable name in
545 the language specified by Language for the
546 driver specified by This was returned in
549 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
551 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
554 @retval EFI_INVALID_PARAMETER Language is NULL.
556 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
558 @retval EFI_UNSUPPORTED The driver specified by This is not currently
559 managing the controller specified by
560 ControllerHandle and ChildHandle.
562 @retval EFI_UNSUPPORTED The driver specified by This does not support
563 the language specified by Language.
568 ConSplitterSimplePointerComponentNameGetControllerName (
569 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
570 IN EFI_HANDLE ControllerHandle
,
571 IN EFI_HANDLE ChildHandle OPTIONAL
,
573 OUT CHAR16
**ControllerName
578 Retrieves a Unicode string that is the user readable name of the controller
579 that is being managed by a driver.
581 This function retrieves the user readable name of the controller specified by
582 ControllerHandle and ChildHandle in the form of a Unicode string. If the
583 driver specified by This has a user readable name in the language specified by
584 Language, then a pointer to the controller name is returned in ControllerName,
585 and EFI_SUCCESS is returned. If the driver specified by This is not currently
586 managing the controller specified by ControllerHandle and ChildHandle,
587 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
588 support the language specified by Language, then EFI_UNSUPPORTED is returned.
590 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
591 EFI_COMPONENT_NAME_PROTOCOL instance.
593 @param ControllerHandle[in] The handle of a controller that the driver
594 specified by This is managing. This handle
595 specifies the controller whose name is to be
598 @param ChildHandle[in] The handle of the child controller to retrieve
599 the name of. This is an optional parameter that
600 may be NULL. It will be NULL for device
601 drivers. It will also be NULL for a bus drivers
602 that wish to retrieve the name of the bus
603 controller. It will not be NULL for a bus
604 driver that wishes to retrieve the name of a
607 @param Language[in] A pointer to a Null-terminated ASCII string
608 array indicating the language. This is the
609 language of the driver name that the caller is
610 requesting, and it must match one of the
611 languages specified in SupportedLanguages. The
612 number of languages supported by a driver is up
613 to the driver writer. Language is specified in
614 RFC 3066 or ISO 639-2 language code format.
616 @param ControllerName[out] A pointer to the Unicode string to return.
617 This Unicode string is the name of the
618 controller specified by ControllerHandle and
619 ChildHandle in the language specified by
620 Language from the point of view of the driver
623 @retval EFI_SUCCESS The Unicode string for the user readable name in
624 the language specified by Language for the
625 driver specified by This was returned in
628 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
630 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
633 @retval EFI_INVALID_PARAMETER Language is NULL.
635 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
637 @retval EFI_UNSUPPORTED The driver specified by This is not currently
638 managing the controller specified by
639 ControllerHandle and ChildHandle.
641 @retval EFI_UNSUPPORTED The driver specified by This does not support
642 the language specified by Language.
647 ConSplitterConOutComponentNameGetControllerName (
648 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
649 IN EFI_HANDLE ControllerHandle
,
650 IN EFI_HANDLE ChildHandle OPTIONAL
,
652 OUT CHAR16
**ControllerName
657 Retrieves a Unicode string that is the user readable name of the controller
658 that is being managed by a driver.
660 This function retrieves the user readable name of the controller specified by
661 ControllerHandle and ChildHandle in the form of a Unicode string. If the
662 driver specified by This has a user readable name in the language specified by
663 Language, then a pointer to the controller name is returned in ControllerName,
664 and EFI_SUCCESS is returned. If the driver specified by This is not currently
665 managing the controller specified by ControllerHandle and ChildHandle,
666 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
667 support the language specified by Language, then EFI_UNSUPPORTED is returned.
669 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
670 EFI_COMPONENT_NAME_PROTOCOL instance.
672 @param ControllerHandle[in] The handle of a controller that the driver
673 specified by This is managing. This handle
674 specifies the controller whose name is to be
677 @param ChildHandle[in] The handle of the child controller to retrieve
678 the name of. This is an optional parameter that
679 may be NULL. It will be NULL for device
680 drivers. It will also be NULL for a bus drivers
681 that wish to retrieve the name of the bus
682 controller. It will not be NULL for a bus
683 driver that wishes to retrieve the name of a
686 @param Language[in] A pointer to a Null-terminated ASCII string
687 array indicating the language. This is the
688 language of the driver name that the caller is
689 requesting, and it must match one of the
690 languages specified in SupportedLanguages. The
691 number of languages supported by a driver is up
692 to the driver writer. Language is specified in
693 RFC 3066 or ISO 639-2 language code format.
695 @param ControllerName[out] A pointer to the Unicode string to return.
696 This Unicode string is the name of the
697 controller specified by ControllerHandle and
698 ChildHandle in the language specified by
699 Language from the point of view of the driver
702 @retval EFI_SUCCESS The Unicode string for the user readable name in
703 the language specified by Language for the
704 driver specified by This was returned in
707 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
709 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
712 @retval EFI_INVALID_PARAMETER Language is NULL.
714 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
716 @retval EFI_UNSUPPORTED The driver specified by This is not currently
717 managing the controller specified by
718 ControllerHandle and ChildHandle.
720 @retval EFI_UNSUPPORTED The driver specified by This does not support
721 the language specified by Language.
726 ConSplitterStdErrComponentNameGetControllerName (
727 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
728 IN EFI_HANDLE ControllerHandle
,
729 IN EFI_HANDLE ChildHandle OPTIONAL
,
731 OUT CHAR16
**ControllerName
736 // TextIn Constructor/Destructor functions
739 ConSplitterTextInAddDevice (
740 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
741 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
746 ConSplitterTextInDeleteDevice (
747 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
748 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
753 // SimplePointer Constuctor/Destructor functions
756 ConSplitterSimplePointerAddDevice (
757 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
758 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
763 ConSplitterSimplePointerDeleteDevice (
764 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
765 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
770 // TextOut Constuctor/Destructor functions
773 ConSplitterTextOutAddDevice (
774 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
775 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
776 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
777 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
782 ConSplitterTextOutDeleteDevice (
783 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
784 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
789 // TextIn I/O Functions
793 ConSplitterTextInReset (
794 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
795 IN BOOLEAN ExtendedVerification
801 ConSplitterTextInReadKeyStroke (
802 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
803 OUT EFI_INPUT_KEY
*Key
807 ConSplitterTextInExAddDevice (
808 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
809 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
814 ConSplitterTextInExDeleteDevice (
815 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
816 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
821 // Simple Text Input Ex protocol function prototypes
826 ConSplitterTextInResetEx (
827 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
828 IN BOOLEAN ExtendedVerification
833 Reset the input device and optionaly run diagnostics
836 This - Protocol instance pointer.
837 ExtendedVerification - Driver may perform diagnostics on reset.
840 EFI_SUCCESS - The device was reset.
841 EFI_DEVICE_ERROR - The device is not functioning properly and could
849 ConSplitterTextInReadKeyStrokeEx (
850 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
851 OUT EFI_KEY_DATA
*KeyData
856 Reads the next keystroke from the input device. The WaitForKey Event can
857 be used to test for existance of a keystroke via WaitForEvent () call.
860 This - Protocol instance pointer.
861 KeyData - A pointer to a buffer that is filled in with the keystroke
862 state data for the key that was pressed.
865 EFI_SUCCESS - The keystroke information was returned.
866 EFI_NOT_READY - There was no keystroke data availiable.
867 EFI_DEVICE_ERROR - The keystroke information was not returned due to
869 EFI_INVALID_PARAMETER - KeyData is NULL.
876 ConSplitterTextInSetState (
877 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
878 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
883 Set certain state for the input device.
886 This - Protocol instance pointer.
887 KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
888 state for the input device.
891 EFI_SUCCESS - The device state was set successfully.
892 EFI_DEVICE_ERROR - The device is not functioning correctly and could
893 not have the setting adjusted.
894 EFI_UNSUPPORTED - The device does not have the ability to set its state.
895 EFI_INVALID_PARAMETER - KeyToggleState is NULL.
902 ConSplitterTextInRegisterKeyNotify (
903 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
904 IN EFI_KEY_DATA
*KeyData
,
905 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
906 OUT EFI_HANDLE
*NotifyHandle
911 Register a notification function for a particular keystroke for the input device.
914 This - Protocol instance pointer.
915 KeyData - A pointer to a buffer that is filled in with the keystroke
916 information data for the key that was pressed.
917 KeyNotificationFunction - Points to the function to be called when the key
918 sequence is typed specified by KeyData.
919 NotifyHandle - Points to the unique handle assigned to the registered notification.
922 EFI_SUCCESS - The notification function was registered successfully.
923 EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
924 EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
931 ConSplitterTextInUnregisterKeyNotify (
932 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
933 IN EFI_HANDLE NotificationHandle
938 Remove a registered notification function from a particular keystroke.
941 This - Protocol instance pointer.
942 NotificationHandle - The handle of the notification function being unregistered.
945 EFI_SUCCESS - The notification function was unregistered successfully.
946 EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
947 EFI_NOT_FOUND - Can not find the matching entry in database.
953 ConSplitterTextInWaitForKey (
960 ConSpliterConssoleControlStdInLocked (
967 ConSpliterConsoleControlLockStdInEvent (
975 ConSpliterConsoleControlLockStdIn (
976 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
983 ConSplitterTextInPrivateReadKeyStroke (
984 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
985 OUT EFI_INPUT_KEY
*Key
991 ConSplitterSimplePointerReset (
992 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
993 IN BOOLEAN ExtendedVerification
999 ConSplitterSimplePointerGetState (
1000 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1001 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1007 ConSplitterSimplePointerWaitForInput (
1014 // TextOut I/O Functions
1017 ConSplitterSynchronizeModeData (
1018 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1024 ConSplitterTextOutReset (
1025 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1026 IN BOOLEAN ExtendedVerification
1032 ConSplitterTextOutOutputString (
1033 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1040 ConSplitterTextOutTestString (
1041 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1048 ConSplitterTextOutQueryMode (
1049 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1050 IN UINTN ModeNumber
,
1058 ConSplitterTextOutSetMode (
1059 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1066 ConSplitterTextOutSetAttribute (
1067 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1074 ConSplitterTextOutClearScreen (
1075 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1081 ConSplitterTextOutSetCursorPosition (
1082 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1090 ConSplitterTextOutEnableCursor (
1091 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1097 ConSplitterGrowBuffer (
1098 IN UINTN SizeOfCount
,
1100 IN OUT VOID
**Buffer
1106 ConSpliterConsoleControlGetMode (
1107 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1108 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE
*Mode
,
1109 OUT BOOLEAN
*GopExists
,
1110 OUT BOOLEAN
*StdInLocked
1116 ConSpliterConsoleControlSetMode (
1117 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1118 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
1124 ConSpliterGraphicsOutputQueryMode (
1125 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1126 IN UINT32 ModeNumber
,
1127 OUT UINTN
*SizeOfInfo
,
1128 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1134 ConSpliterGraphicsOutputSetMode (
1135 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1136 IN UINT32 ModeNumber
1142 ConSpliterGraphicsOutputBlt (
1143 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1144 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1145 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1148 IN UINTN DestinationX
,
1149 IN UINTN DestinationY
,
1152 IN UINTN Delta OPTIONAL
1158 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1159 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1160 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1166 ConSpliterUgaDrawGetMode (
1167 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1168 OUT UINT32
*HorizontalResolution
,
1169 OUT UINT32
*VerticalResolution
,
1170 OUT UINT32
*ColorDepth
,
1171 OUT UINT32
*RefreshRate
1177 ConSpliterUgaDrawSetMode (
1178 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1179 IN UINT32 HorizontalResolution
,
1180 IN UINT32 VerticalResolution
,
1181 IN UINT32 ColorDepth
,
1182 IN UINT32 RefreshRate
1188 ConSpliterUgaDrawBlt (
1189 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1190 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1191 IN EFI_UGA_BLT_OPERATION BltOperation
,
1194 IN UINTN DestinationX
,
1195 IN UINTN DestinationY
,
1198 IN UINTN Delta OPTIONAL
1204 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1205 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1206 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1211 DevNullTextOutOutputString (
1212 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1218 DevNullTextOutSetMode (
1219 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1225 DevNullTextOutClearScreen (
1226 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1231 DevNullTextOutSetCursorPosition (
1232 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1239 DevNullTextOutEnableCursor (
1240 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1246 DevNullSyncGopStdOut (
1247 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private