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/AbsolutePointer.h>
25 #include <Protocol/SimpleTextOut.h>
26 #include <Guid/ConsoleInDevice.h>
27 #include <Protocol/SimpleTextIn.h>
28 #include <Protocol/SimpleTextInEx.h>
29 #include <Protocol/ConsoleControl.h>
30 #include <Guid/StandardErrorDevice.h>
31 #include <Guid/ConsoleOutDevice.h>
32 #include <Protocol/UgaDraw.h>
33 #include <Library/PcdLib.h>
34 #include <Library/DebugLib.h>
35 #include <Library/UefiDriverEntryPoint.h>
36 #include <Library/UefiLib.h>
37 #include <Library/BaseLib.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/MemoryAllocationLib.h>
40 #include <Library/UefiBootServicesTableLib.h>
43 // Driver Binding Externs
45 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
46 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
47 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
48 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
49 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
50 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
56 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
57 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
58 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
60 extern EFI_GUID gSimpleTextInExNotifyGuid
;
62 // These definitions were in the old Hii protocol, but are not in the new UEFI
63 // version. So they are defined locally.
64 #define UNICODE_NARROW_CHAR 0xFFF0
65 #define UNICODE_WIDE_CHAR 0xFFF1
69 // Private Data Structures
71 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
72 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
73 #define MAX_STD_IN_PASSWORD 80
78 } TEXT_OUT_SPLITTER_QUERY_DATA
;
81 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
83 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
85 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'n')
87 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
89 EFI_HANDLE
*NotifyHandleList
;
90 EFI_HANDLE NotifyHandle
;
92 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
93 LIST_ENTRY NotifyEntry
;
94 } TEXT_IN_EX_SPLITTER_NOTIFY
;
98 EFI_HANDLE VirtualHandle
;
100 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
101 UINTN CurrentNumberOfConsoles
;
102 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
103 UINTN TextInListCount
;
105 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
106 UINTN CurrentNumberOfExConsoles
;
107 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
108 UINTN TextInExListCount
;
109 LIST_ENTRY NotifyList
;
112 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
113 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
114 UINTN CurrentNumberOfPointers
;
115 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
116 UINTN PointerListCount
;
118 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
119 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
120 UINTN CurrentNumberOfAbsolutePointers
;
121 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
122 UINTN AbsolutePointerListCount
;
123 BOOLEAN AbsoluteInputEventSignalState
;
125 BOOLEAN PasswordEnabled
;
126 CHAR16 Password
[MAX_STD_IN_PASSWORD
];
128 CHAR16 PwdAttempt
[MAX_STD_IN_PASSWORD
];
131 BOOLEAN KeyEventSignalState
;
132 BOOLEAN InputEventSignalState
;
133 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
135 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
137 TEXT_IN_SPLITTER_PRIVATE_DATA, \
139 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
142 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
144 TEXT_IN_SPLITTER_PRIVATE_DATA, \
146 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
148 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
150 TEXT_IN_SPLITTER_PRIVATE_DATA, \
152 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
155 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
157 TEXT_IN_SPLITTER_PRIVATE_DATA, \
159 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
163 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
165 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
168 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
169 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
170 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
171 BOOLEAN TextOutEnabled
;
172 } TEXT_OUT_AND_GOP_DATA
;
175 UINT32 HorizontalResolution
;
176 UINT32 VerticalResolution
;
181 EFI_HANDLE VirtualHandle
;
182 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
183 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
185 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
186 UINT32 UgaHorizontalResolution
;
187 UINT32 UgaVerticalResolution
;
188 UINT32 UgaColorDepth
;
189 UINT32 UgaRefreshRate
;
190 EFI_UGA_PIXEL
*UgaBlt
;
192 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
193 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*GraphicsOutputBlt
;
194 TEXT_OUT_GOP_MODE
*GraphicsOutputModeBuffer
;
195 UINTN CurrentNumberOfGraphicsOutput
;
196 BOOLEAN HardwareNeedsStarting
;
198 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl
;
200 UINTN CurrentNumberOfConsoles
;
201 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
202 UINTN TextOutListCount
;
203 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
204 UINTN TextOutQueryDataCount
;
205 INT32
*TextOutModeMap
;
207 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode
;
209 UINTN DevNullColumns
;
211 CHAR16
*DevNullScreen
;
212 INT32
*DevNullAttributes
;
214 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
216 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
218 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
220 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
223 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
225 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
227 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
230 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
232 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
234 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
237 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
239 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
241 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
245 // Function Prototypes
249 ConSplitterDriverEntry (
250 IN EFI_HANDLE ImageHandle
,
251 IN EFI_SYSTEM_TABLE
*SystemTable
256 ConSplitterTextInConstructor (
257 TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
262 ConSplitterTextOutConstructor (
263 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
268 // Driver Binding Functions
272 ConSplitterConInDriverBindingSupported (
273 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
274 IN EFI_HANDLE ControllerHandle
,
275 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
281 ConSplitterSimplePointerDriverBindingSupported (
282 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
283 IN EFI_HANDLE ControllerHandle
,
284 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
290 ConSplitterConOutDriverBindingSupported (
291 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
292 IN EFI_HANDLE ControllerHandle
,
293 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
299 ConSplitterStdErrDriverBindingSupported (
300 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
301 IN EFI_HANDLE ControllerHandle
,
302 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
308 ConSplitterConInDriverBindingStart (
309 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
310 IN EFI_HANDLE ControllerHandle
,
311 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
317 ConSplitterSimplePointerDriverBindingStart (
318 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
319 IN EFI_HANDLE ControllerHandle
,
320 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
326 ConSplitterConOutDriverBindingStart (
327 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
328 IN EFI_HANDLE ControllerHandle
,
329 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
335 ConSplitterStdErrDriverBindingStart (
336 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
337 IN EFI_HANDLE ControllerHandle
,
338 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
344 ConSplitterConInDriverBindingStop (
345 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
346 IN EFI_HANDLE ControllerHandle
,
347 IN UINTN NumberOfChildren
,
348 IN EFI_HANDLE
*ChildHandleBuffer
354 ConSplitterSimplePointerDriverBindingStop (
355 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
356 IN EFI_HANDLE ControllerHandle
,
357 IN UINTN NumberOfChildren
,
358 IN EFI_HANDLE
*ChildHandleBuffer
364 ConSplitterConOutDriverBindingStop (
365 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
366 IN EFI_HANDLE ControllerHandle
,
367 IN UINTN NumberOfChildren
,
368 IN EFI_HANDLE
*ChildHandleBuffer
374 ConSplitterStdErrDriverBindingStop (
375 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
376 IN EFI_HANDLE ControllerHandle
,
377 IN UINTN NumberOfChildren
,
378 IN EFI_HANDLE
*ChildHandleBuffer
383 // Driver binding functions
388 ConSplitterAbsolutePointerDriverBindingSupported (
389 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
390 IN EFI_HANDLE ControllerHandle
,
391 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
397 ConSplitterAbsolutePointerDriverBindingStart (
398 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
399 IN EFI_HANDLE ControllerHandle
,
400 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
406 ConSplitterAbsolutePointerDriverBindingStop (
407 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
408 IN EFI_HANDLE ControllerHandle
,
409 IN UINTN NumberOfChildren
,
410 IN EFI_HANDLE
*ChildHandleBuffer
415 ConSplitterAbsolutePointerAddDevice (
416 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
417 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
422 ConSplitterAbsolutePointerDeleteDevice (
423 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
424 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
429 // Absolute Pointer protocol interfaces
434 ConSplitterAbsolutePointerReset (
435 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
436 IN BOOLEAN ExtendedVerification
441 Resets the pointer device hardware.
444 This - Protocol instance pointer.
445 ExtendedVerification - Driver may perform diagnostics on reset.
448 EFI_SUCCESS - The device was reset.
449 EFI_DEVICE_ERROR - The device is not functioning correctly and could
457 ConSplitterAbsolutePointerGetState (
458 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
459 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
464 Retrieves the current state of a pointer device.
467 This - Protocol instance pointer.
468 State - A pointer to the state information on the pointer device.
471 EFI_SUCCESS - The state of the pointer device was returned in State..
472 EFI_NOT_READY - The state of the pointer device has not changed since the last call to
474 EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
475 device's current state.
481 ConSplitterAbsolutePointerWaitForInput (
488 Retrieves a Unicode string that is the user readable name of the driver.
490 This function retrieves the user readable name of a driver in the form of a
491 Unicode string. If the driver specified by This has a user readable name in
492 the language specified by Language, then a pointer to the driver name is
493 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
494 by This does not support the language specified by Language,
495 then EFI_UNSUPPORTED is returned.
497 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
498 EFI_COMPONENT_NAME_PROTOCOL instance.
500 @param Language[in] A pointer to a Null-terminated ASCII string
501 array indicating the language. This is the
502 language of the driver name that the caller is
503 requesting, and it must match one of the
504 languages specified in SupportedLanguages. The
505 number of languages supported by a driver is up
506 to the driver writer. Language is specified
507 in RFC 3066 or ISO 639-2 language code format.
509 @param DriverName[out] A pointer to the Unicode string to return.
510 This Unicode string is the name of the
511 driver specified by This in the language
512 specified by Language.
514 @retval EFI_SUCCESS The Unicode string for the Driver specified by
515 This and the language specified by Language was
516 returned in DriverName.
518 @retval EFI_INVALID_PARAMETER Language is NULL.
520 @retval EFI_INVALID_PARAMETER DriverName is NULL.
522 @retval EFI_UNSUPPORTED The driver specified by This does not support
523 the language specified by Language.
528 ConSplitterComponentNameGetDriverName (
529 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
531 OUT CHAR16
**DriverName
536 Retrieves a Unicode string that is the user readable name of the controller
537 that is being managed by a driver.
539 This function retrieves the user readable name of the controller specified by
540 ControllerHandle and ChildHandle in the form of a Unicode string. If the
541 driver specified by This has a user readable name in the language specified by
542 Language, then a pointer to the controller name is returned in ControllerName,
543 and EFI_SUCCESS is returned. If the driver specified by This is not currently
544 managing the controller specified by ControllerHandle and ChildHandle,
545 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
546 support the language specified by Language, then EFI_UNSUPPORTED is returned.
548 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
549 EFI_COMPONENT_NAME_PROTOCOL instance.
551 @param ControllerHandle[in] The handle of a controller that the driver
552 specified by This is managing. This handle
553 specifies the controller whose name is to be
556 @param ChildHandle[in] The handle of the child controller to retrieve
557 the name of. This is an optional parameter that
558 may be NULL. It will be NULL for device
559 drivers. It will also be NULL for a bus drivers
560 that wish to retrieve the name of the bus
561 controller. It will not be NULL for a bus
562 driver that wishes to retrieve the name of a
565 @param Language[in] A pointer to a Null-terminated ASCII string
566 array indicating the language. This is the
567 language of the driver name that the caller is
568 requesting, and it must match one of the
569 languages specified in SupportedLanguages. The
570 number of languages supported by a driver is up
571 to the driver writer. Language is specified in
572 RFC 3066 or ISO 639-2 language code format.
574 @param ControllerName[out] A pointer to the Unicode string to return.
575 This Unicode string is the name of the
576 controller specified by ControllerHandle and
577 ChildHandle in the language specified by
578 Language from the point of view of the driver
581 @retval EFI_SUCCESS The Unicode string for the user readable name in
582 the language specified by Language for the
583 driver specified by This was returned in
586 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
588 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
591 @retval EFI_INVALID_PARAMETER Language is NULL.
593 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
595 @retval EFI_UNSUPPORTED The driver specified by This is not currently
596 managing the controller specified by
597 ControllerHandle and ChildHandle.
599 @retval EFI_UNSUPPORTED The driver specified by This does not support
600 the language specified by Language.
605 ConSplitterConInComponentNameGetControllerName (
606 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
607 IN EFI_HANDLE ControllerHandle
,
608 IN EFI_HANDLE ChildHandle OPTIONAL
,
610 OUT CHAR16
**ControllerName
615 Retrieves a Unicode string that is the user readable name of the controller
616 that is being managed by a driver.
618 This function retrieves the user readable name of the controller specified by
619 ControllerHandle and ChildHandle in the form of a Unicode string. If the
620 driver specified by This has a user readable name in the language specified by
621 Language, then a pointer to the controller name is returned in ControllerName,
622 and EFI_SUCCESS is returned. If the driver specified by This is not currently
623 managing the controller specified by ControllerHandle and ChildHandle,
624 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
625 support the language specified by Language, then EFI_UNSUPPORTED is returned.
627 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
628 EFI_COMPONENT_NAME_PROTOCOL instance.
630 @param ControllerHandle[in] The handle of a controller that the driver
631 specified by This is managing. This handle
632 specifies the controller whose name is to be
635 @param ChildHandle[in] The handle of the child controller to retrieve
636 the name of. This is an optional parameter that
637 may be NULL. It will be NULL for device
638 drivers. It will also be NULL for a bus drivers
639 that wish to retrieve the name of the bus
640 controller. It will not be NULL for a bus
641 driver that wishes to retrieve the name of a
644 @param Language[in] A pointer to a Null-terminated ASCII string
645 array indicating the language. This is the
646 language of the driver name that the caller is
647 requesting, and it must match one of the
648 languages specified in SupportedLanguages. The
649 number of languages supported by a driver is up
650 to the driver writer. Language is specified in
651 RFC 3066 or ISO 639-2 language code format.
653 @param ControllerName[out] A pointer to the Unicode string to return.
654 This Unicode string is the name of the
655 controller specified by ControllerHandle and
656 ChildHandle in the language specified by
657 Language from the point of view of the driver
660 @retval EFI_SUCCESS The Unicode string for the user readable name in
661 the language specified by Language for the
662 driver specified by This was returned in
665 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
667 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
670 @retval EFI_INVALID_PARAMETER Language is NULL.
672 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
674 @retval EFI_UNSUPPORTED The driver specified by This is not currently
675 managing the controller specified by
676 ControllerHandle and ChildHandle.
678 @retval EFI_UNSUPPORTED The driver specified by This does not support
679 the language specified by Language.
684 ConSplitterSimplePointerComponentNameGetControllerName (
685 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
686 IN EFI_HANDLE ControllerHandle
,
687 IN EFI_HANDLE ChildHandle OPTIONAL
,
689 OUT CHAR16
**ControllerName
694 ConSplitterAbsolutePointerComponentNameGetControllerName (
695 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
696 IN EFI_HANDLE ControllerHandle
,
697 IN EFI_HANDLE ChildHandle OPTIONAL
,
699 OUT CHAR16
**ControllerName
704 Retrieves a Unicode string that is the user readable name of the controller
705 that is being managed by a driver.
707 This function retrieves the user readable name of the controller specified by
708 ControllerHandle and ChildHandle in the form of a Unicode string. If the
709 driver specified by This has a user readable name in the language specified by
710 Language, then a pointer to the controller name is returned in ControllerName,
711 and EFI_SUCCESS is returned. If the driver specified by This is not currently
712 managing the controller specified by ControllerHandle and ChildHandle,
713 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
714 support the language specified by Language, then EFI_UNSUPPORTED is returned.
716 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
717 EFI_COMPONENT_NAME_PROTOCOL instance.
719 @param ControllerHandle[in] The handle of a controller that the driver
720 specified by This is managing. This handle
721 specifies the controller whose name is to be
724 @param ChildHandle[in] The handle of the child controller to retrieve
725 the name of. This is an optional parameter that
726 may be NULL. It will be NULL for device
727 drivers. It will also be NULL for a bus drivers
728 that wish to retrieve the name of the bus
729 controller. It will not be NULL for a bus
730 driver that wishes to retrieve the name of a
733 @param Language[in] A pointer to a Null-terminated ASCII string
734 array indicating the language. This is the
735 language of the driver name that the caller is
736 requesting, and it must match one of the
737 languages specified in SupportedLanguages. The
738 number of languages supported by a driver is up
739 to the driver writer. Language is specified in
740 RFC 3066 or ISO 639-2 language code format.
742 @param ControllerName[out] A pointer to the Unicode string to return.
743 This Unicode string is the name of the
744 controller specified by ControllerHandle and
745 ChildHandle in the language specified by
746 Language from the point of view of the driver
749 @retval EFI_SUCCESS The Unicode string for the user readable name in
750 the language specified by Language for the
751 driver specified by This was returned in
754 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
756 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
759 @retval EFI_INVALID_PARAMETER Language is NULL.
761 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
763 @retval EFI_UNSUPPORTED The driver specified by This is not currently
764 managing the controller specified by
765 ControllerHandle and ChildHandle.
767 @retval EFI_UNSUPPORTED The driver specified by This does not support
768 the language specified by Language.
773 ConSplitterConOutComponentNameGetControllerName (
774 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
775 IN EFI_HANDLE ControllerHandle
,
776 IN EFI_HANDLE ChildHandle OPTIONAL
,
778 OUT CHAR16
**ControllerName
783 Retrieves a Unicode string that is the user readable name of the controller
784 that is being managed by a driver.
786 This function retrieves the user readable name of the controller specified by
787 ControllerHandle and ChildHandle in the form of a Unicode string. If the
788 driver specified by This has a user readable name in the language specified by
789 Language, then a pointer to the controller name is returned in ControllerName,
790 and EFI_SUCCESS is returned. If the driver specified by This is not currently
791 managing the controller specified by ControllerHandle and ChildHandle,
792 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
793 support the language specified by Language, then EFI_UNSUPPORTED is returned.
795 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
796 EFI_COMPONENT_NAME_PROTOCOL instance.
798 @param ControllerHandle[in] The handle of a controller that the driver
799 specified by This is managing. This handle
800 specifies the controller whose name is to be
803 @param ChildHandle[in] The handle of the child controller to retrieve
804 the name of. This is an optional parameter that
805 may be NULL. It will be NULL for device
806 drivers. It will also be NULL for a bus drivers
807 that wish to retrieve the name of the bus
808 controller. It will not be NULL for a bus
809 driver that wishes to retrieve the name of a
812 @param Language[in] A pointer to a Null-terminated ASCII string
813 array indicating the language. This is the
814 language of the driver name that the caller is
815 requesting, and it must match one of the
816 languages specified in SupportedLanguages. The
817 number of languages supported by a driver is up
818 to the driver writer. Language is specified in
819 RFC 3066 or ISO 639-2 language code format.
821 @param ControllerName[out] A pointer to the Unicode string to return.
822 This Unicode string is the name of the
823 controller specified by ControllerHandle and
824 ChildHandle in the language specified by
825 Language from the point of view of the driver
828 @retval EFI_SUCCESS The Unicode string for the user readable name in
829 the language specified by Language for the
830 driver specified by This was returned in
833 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
835 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
838 @retval EFI_INVALID_PARAMETER Language is NULL.
840 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
842 @retval EFI_UNSUPPORTED The driver specified by This is not currently
843 managing the controller specified by
844 ControllerHandle and ChildHandle.
846 @retval EFI_UNSUPPORTED The driver specified by This does not support
847 the language specified by Language.
852 ConSplitterStdErrComponentNameGetControllerName (
853 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
854 IN EFI_HANDLE ControllerHandle
,
855 IN EFI_HANDLE ChildHandle OPTIONAL
,
857 OUT CHAR16
**ControllerName
862 // TextIn Constructor/Destructor functions
865 ConSplitterTextInAddDevice (
866 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
867 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
872 ConSplitterTextInDeleteDevice (
873 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
874 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
879 // SimplePointer Constuctor/Destructor functions
882 ConSplitterSimplePointerAddDevice (
883 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
884 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
889 ConSplitterSimplePointerDeleteDevice (
890 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
891 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
896 // TextOut Constuctor/Destructor functions
899 ConSplitterTextOutAddDevice (
900 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
901 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
902 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
903 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
908 ConSplitterTextOutDeleteDevice (
909 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
910 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
915 // TextIn I/O Functions
919 ConSplitterTextInReset (
920 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
921 IN BOOLEAN ExtendedVerification
927 ConSplitterTextInReadKeyStroke (
928 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
929 OUT EFI_INPUT_KEY
*Key
933 ConSplitterTextInExAddDevice (
934 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
935 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
940 ConSplitterTextInExDeleteDevice (
941 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
942 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
947 // Simple Text Input Ex protocol function prototypes
952 ConSplitterTextInResetEx (
953 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
954 IN BOOLEAN ExtendedVerification
959 Reset the input device and optionaly run diagnostics
962 This - Protocol instance pointer.
963 ExtendedVerification - Driver may perform diagnostics on reset.
966 EFI_SUCCESS - The device was reset.
967 EFI_DEVICE_ERROR - The device is not functioning properly and could
975 ConSplitterTextInReadKeyStrokeEx (
976 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
977 OUT EFI_KEY_DATA
*KeyData
982 Reads the next keystroke from the input device. The WaitForKey Event can
983 be used to test for existance of a keystroke via WaitForEvent () call.
986 This - Protocol instance pointer.
987 KeyData - A pointer to a buffer that is filled in with the keystroke
988 state data for the key that was pressed.
991 EFI_SUCCESS - The keystroke information was returned.
992 EFI_NOT_READY - There was no keystroke data availiable.
993 EFI_DEVICE_ERROR - The keystroke information was not returned due to
995 EFI_INVALID_PARAMETER - KeyData is NULL.
1002 ConSplitterTextInSetState (
1003 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1004 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1008 Routine Description:
1009 Set certain state for the input device.
1012 This - Protocol instance pointer.
1013 KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
1014 state for the input device.
1017 EFI_SUCCESS - The device state was set successfully.
1018 EFI_DEVICE_ERROR - The device is not functioning correctly and could
1019 not have the setting adjusted.
1020 EFI_UNSUPPORTED - The device does not have the ability to set its state.
1021 EFI_INVALID_PARAMETER - KeyToggleState is NULL.
1028 ConSplitterTextInRegisterKeyNotify (
1029 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1030 IN EFI_KEY_DATA
*KeyData
,
1031 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1032 OUT EFI_HANDLE
*NotifyHandle
1036 Routine Description:
1037 Register a notification function for a particular keystroke for the input device.
1040 This - Protocol instance pointer.
1041 KeyData - A pointer to a buffer that is filled in with the keystroke
1042 information data for the key that was pressed.
1043 KeyNotificationFunction - Points to the function to be called when the key
1044 sequence is typed specified by KeyData.
1045 NotifyHandle - Points to the unique handle assigned to the registered notification.
1048 EFI_SUCCESS - The notification function was registered successfully.
1049 EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
1050 EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
1057 ConSplitterTextInUnregisterKeyNotify (
1058 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1059 IN EFI_HANDLE NotificationHandle
1063 Routine Description:
1064 Remove a registered notification function from a particular keystroke.
1067 This - Protocol instance pointer.
1068 NotificationHandle - The handle of the notification function being unregistered.
1071 EFI_SUCCESS - The notification function was unregistered successfully.
1072 EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
1073 EFI_NOT_FOUND - Can not find the matching entry in database.
1079 ConSplitterTextInWaitForKey (
1086 ConSpliterConssoleControlStdInLocked (
1093 ConSpliterConsoleControlLockStdInEvent (
1101 ConSpliterConsoleControlLockStdIn (
1102 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1109 ConSplitterTextInPrivateReadKeyStroke (
1110 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1111 OUT EFI_INPUT_KEY
*Key
1117 ConSplitterSimplePointerReset (
1118 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1119 IN BOOLEAN ExtendedVerification
1125 ConSplitterSimplePointerGetState (
1126 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1127 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1133 ConSplitterSimplePointerWaitForInput (
1140 // TextOut I/O Functions
1143 ConSplitterSynchronizeModeData (
1144 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1150 ConSplitterTextOutReset (
1151 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1152 IN BOOLEAN ExtendedVerification
1158 ConSplitterTextOutOutputString (
1159 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1166 ConSplitterTextOutTestString (
1167 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1174 ConSplitterTextOutQueryMode (
1175 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1176 IN UINTN ModeNumber
,
1184 ConSplitterTextOutSetMode (
1185 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1192 ConSplitterTextOutSetAttribute (
1193 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1200 ConSplitterTextOutClearScreen (
1201 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1207 ConSplitterTextOutSetCursorPosition (
1208 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1216 ConSplitterTextOutEnableCursor (
1217 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1223 ConSplitterGrowBuffer (
1224 IN UINTN SizeOfCount
,
1226 IN OUT VOID
**Buffer
1232 ConSpliterConsoleControlGetMode (
1233 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1234 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE
*Mode
,
1235 OUT BOOLEAN
*GopExists
,
1236 OUT BOOLEAN
*StdInLocked
1242 ConSpliterConsoleControlSetMode (
1243 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1244 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
1250 ConSpliterGraphicsOutputQueryMode (
1251 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1252 IN UINT32 ModeNumber
,
1253 OUT UINTN
*SizeOfInfo
,
1254 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1260 ConSpliterGraphicsOutputSetMode (
1261 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1262 IN UINT32 ModeNumber
1268 ConSpliterGraphicsOutputBlt (
1269 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1270 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1271 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1274 IN UINTN DestinationX
,
1275 IN UINTN DestinationY
,
1278 IN UINTN Delta OPTIONAL
1284 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1285 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1286 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1292 ConSpliterUgaDrawGetMode (
1293 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1294 OUT UINT32
*HorizontalResolution
,
1295 OUT UINT32
*VerticalResolution
,
1296 OUT UINT32
*ColorDepth
,
1297 OUT UINT32
*RefreshRate
1303 ConSpliterUgaDrawSetMode (
1304 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1305 IN UINT32 HorizontalResolution
,
1306 IN UINT32 VerticalResolution
,
1307 IN UINT32 ColorDepth
,
1308 IN UINT32 RefreshRate
1314 ConSpliterUgaDrawBlt (
1315 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1316 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1317 IN EFI_UGA_BLT_OPERATION BltOperation
,
1320 IN UINTN DestinationX
,
1321 IN UINTN DestinationY
,
1324 IN UINTN Delta OPTIONAL
1330 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1331 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1332 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1337 DevNullTextOutOutputString (
1338 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1344 DevNullTextOutSetMode (
1345 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1351 DevNullTextOutClearScreen (
1352 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1357 DevNullTextOutSetCursorPosition (
1358 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1365 DevNullTextOutEnableCursor (
1366 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1372 DevNullSyncGopStdOut (
1373 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private