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 <Guid/GenericPlatformVariable.h>
24 #include <Protocol/SimplePointer.h>
25 #include <Protocol/AbsolutePointer.h>
26 #include <Protocol/SimpleTextOut.h>
27 #include <Guid/ConsoleInDevice.h>
28 #include <Protocol/SimpleTextIn.h>
29 #include <Protocol/SimpleTextInEx.h>
30 #include <Protocol/ConsoleControl.h>
31 #include <Guid/StandardErrorDevice.h>
32 #include <Guid/ConsoleOutDevice.h>
33 #include <Protocol/UgaDraw.h>
34 #include <Library/PcdLib.h>
35 #include <Library/DebugLib.h>
36 #include <Library/UefiDriverEntryPoint.h>
37 #include <Library/UefiLib.h>
38 #include <Library/BaseLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/MemoryAllocationLib.h>
41 #include <Library/UefiBootServicesTableLib.h>
42 #include <Library/UefiRuntimeServicesTableLib.h>
46 // Driver Binding Externs
48 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
49 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
50 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
51 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
52 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
53 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
54 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
55 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
56 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
57 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
58 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
59 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
60 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
61 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
62 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
64 extern EFI_GUID gSimpleTextInExNotifyGuid
;
66 // These definitions were in the old Hii protocol, but are not in the new UEFI
67 // version. So they are defined locally.
68 #define UNICODE_NARROW_CHAR 0xFFF0
69 #define UNICODE_WIDE_CHAR 0xFFF1
73 // Private Data Structures
75 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
76 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
77 #define MAX_STD_IN_PASSWORD 80
79 #define VarConOutMode L"ConOutMode"
89 } TEXT_OUT_SPLITTER_QUERY_DATA
;
92 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
94 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
96 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'n')
98 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
100 EFI_HANDLE
*NotifyHandleList
;
101 EFI_HANDLE NotifyHandle
;
102 EFI_KEY_DATA KeyData
;
103 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
104 LIST_ENTRY NotifyEntry
;
105 } TEXT_IN_EX_SPLITTER_NOTIFY
;
109 EFI_HANDLE VirtualHandle
;
111 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
112 UINTN CurrentNumberOfConsoles
;
113 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
114 UINTN TextInListCount
;
116 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
117 UINTN CurrentNumberOfExConsoles
;
118 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
119 UINTN TextInExListCount
;
120 LIST_ENTRY NotifyList
;
123 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
124 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
125 UINTN CurrentNumberOfPointers
;
126 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
127 UINTN PointerListCount
;
129 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
130 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
131 UINTN CurrentNumberOfAbsolutePointers
;
132 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
133 UINTN AbsolutePointerListCount
;
134 BOOLEAN AbsoluteInputEventSignalState
;
136 BOOLEAN PasswordEnabled
;
137 CHAR16 Password
[MAX_STD_IN_PASSWORD
];
139 CHAR16 PwdAttempt
[MAX_STD_IN_PASSWORD
];
142 BOOLEAN KeyEventSignalState
;
143 BOOLEAN InputEventSignalState
;
144 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
146 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
148 TEXT_IN_SPLITTER_PRIVATE_DATA, \
150 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
153 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
155 TEXT_IN_SPLITTER_PRIVATE_DATA, \
157 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
159 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
161 TEXT_IN_SPLITTER_PRIVATE_DATA, \
163 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
166 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
168 TEXT_IN_SPLITTER_PRIVATE_DATA, \
170 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
174 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
176 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
179 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
180 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
181 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
182 BOOLEAN TextOutEnabled
;
183 } TEXT_OUT_AND_GOP_DATA
;
187 EFI_HANDLE VirtualHandle
;
188 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
189 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
191 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
192 UINT32 UgaHorizontalResolution
;
193 UINT32 UgaVerticalResolution
;
194 UINT32 UgaColorDepth
;
195 UINT32 UgaRefreshRate
;
196 EFI_UGA_PIXEL
*UgaBlt
;
198 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
199 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*GraphicsOutputBlt
;
200 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
201 UINTN CurrentNumberOfGraphicsOutput
;
202 UINTN CurrentNumberOfUgaDraw
;
203 BOOLEAN HardwareNeedsStarting
;
205 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl
;
207 UINTN CurrentNumberOfConsoles
;
208 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
209 UINTN TextOutListCount
;
210 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
211 UINTN TextOutQueryDataCount
;
212 INT32
*TextOutModeMap
;
214 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode
;
216 UINTN DevNullColumns
;
218 CHAR16
*DevNullScreen
;
219 INT32
*DevNullAttributes
;
221 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
223 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
225 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
227 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
230 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
232 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
234 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
237 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
239 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
241 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
244 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
246 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
248 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
252 // Function Prototypes
256 ConSplitterDriverEntry (
257 IN EFI_HANDLE ImageHandle
,
258 IN EFI_SYSTEM_TABLE
*SystemTable
263 ConSplitterTextInConstructor (
264 TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
269 ConSplitterTextOutConstructor (
270 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
275 // Driver Binding Functions
279 ConSplitterConInDriverBindingSupported (
280 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
281 IN EFI_HANDLE ControllerHandle
,
282 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
288 ConSplitterSimplePointerDriverBindingSupported (
289 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
290 IN EFI_HANDLE ControllerHandle
,
291 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
297 ConSplitterConOutDriverBindingSupported (
298 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
299 IN EFI_HANDLE ControllerHandle
,
300 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
306 ConSplitterStdErrDriverBindingSupported (
307 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
308 IN EFI_HANDLE ControllerHandle
,
309 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
315 ConSplitterConInDriverBindingStart (
316 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
317 IN EFI_HANDLE ControllerHandle
,
318 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
324 ConSplitterSimplePointerDriverBindingStart (
325 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
326 IN EFI_HANDLE ControllerHandle
,
327 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
333 ConSplitterConOutDriverBindingStart (
334 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
335 IN EFI_HANDLE ControllerHandle
,
336 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
342 ConSplitterStdErrDriverBindingStart (
343 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
344 IN EFI_HANDLE ControllerHandle
,
345 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
351 ConSplitterConInDriverBindingStop (
352 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
353 IN EFI_HANDLE ControllerHandle
,
354 IN UINTN NumberOfChildren
,
355 IN EFI_HANDLE
*ChildHandleBuffer
361 ConSplitterSimplePointerDriverBindingStop (
362 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
363 IN EFI_HANDLE ControllerHandle
,
364 IN UINTN NumberOfChildren
,
365 IN EFI_HANDLE
*ChildHandleBuffer
371 ConSplitterConOutDriverBindingStop (
372 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
373 IN EFI_HANDLE ControllerHandle
,
374 IN UINTN NumberOfChildren
,
375 IN EFI_HANDLE
*ChildHandleBuffer
381 ConSplitterStdErrDriverBindingStop (
382 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
383 IN EFI_HANDLE ControllerHandle
,
384 IN UINTN NumberOfChildren
,
385 IN EFI_HANDLE
*ChildHandleBuffer
390 // Driver binding functions
395 ConSplitterAbsolutePointerDriverBindingSupported (
396 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
397 IN EFI_HANDLE ControllerHandle
,
398 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
404 ConSplitterAbsolutePointerDriverBindingStart (
405 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
406 IN EFI_HANDLE ControllerHandle
,
407 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
413 ConSplitterAbsolutePointerDriverBindingStop (
414 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
415 IN EFI_HANDLE ControllerHandle
,
416 IN UINTN NumberOfChildren
,
417 IN EFI_HANDLE
*ChildHandleBuffer
422 ConSplitterAbsolutePointerAddDevice (
423 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
424 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
429 ConSplitterAbsolutePointerDeleteDevice (
430 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
431 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
436 // Absolute Pointer protocol interfaces
441 ConSplitterAbsolutePointerReset (
442 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
443 IN BOOLEAN ExtendedVerification
448 Resets the pointer device hardware.
451 This - Protocol instance pointer.
452 ExtendedVerification - Driver may perform diagnostics on reset.
455 EFI_SUCCESS - The device was reset.
456 EFI_DEVICE_ERROR - The device is not functioning correctly and could
464 ConSplitterAbsolutePointerGetState (
465 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
466 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
471 Retrieves the current state of a pointer device.
474 This - Protocol instance pointer.
475 State - A pointer to the state information on the pointer device.
478 EFI_SUCCESS - The state of the pointer device was returned in State..
479 EFI_NOT_READY - The state of the pointer device has not changed since the last call to
481 EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
482 device's current state.
488 ConSplitterAbsolutePointerWaitForInput (
495 Retrieves a Unicode string that is the user readable name of the driver.
497 This function retrieves the user readable name of a driver in the form of a
498 Unicode string. If the driver specified by This has a user readable name in
499 the language specified by Language, then a pointer to the driver name is
500 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
501 by This does not support the language specified by Language,
502 then EFI_UNSUPPORTED is returned.
504 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
505 EFI_COMPONENT_NAME_PROTOCOL instance.
507 @param Language[in] A pointer to a Null-terminated ASCII string
508 array indicating the language. This is the
509 language of the driver name that the caller is
510 requesting, and it must match one of the
511 languages specified in SupportedLanguages. The
512 number of languages supported by a driver is up
513 to the driver writer. Language is specified
514 in RFC 3066 or ISO 639-2 language code format.
516 @param DriverName[out] A pointer to the Unicode string to return.
517 This Unicode string is the name of the
518 driver specified by This in the language
519 specified by Language.
521 @retval EFI_SUCCESS The Unicode string for the Driver specified by
522 This and the language specified by Language was
523 returned in DriverName.
525 @retval EFI_INVALID_PARAMETER Language is NULL.
527 @retval EFI_INVALID_PARAMETER DriverName is NULL.
529 @retval EFI_UNSUPPORTED The driver specified by This does not support
530 the language specified by Language.
535 ConSplitterComponentNameGetDriverName (
536 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
538 OUT CHAR16
**DriverName
543 Retrieves a Unicode string that is the user readable name of the controller
544 that is being managed by a driver.
546 This function retrieves the user readable name of the controller specified by
547 ControllerHandle and ChildHandle in the form of a Unicode string. If the
548 driver specified by This has a user readable name in the language specified by
549 Language, then a pointer to the controller name is returned in ControllerName,
550 and EFI_SUCCESS is returned. If the driver specified by This is not currently
551 managing the controller specified by ControllerHandle and ChildHandle,
552 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
553 support the language specified by Language, then EFI_UNSUPPORTED is returned.
555 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
556 EFI_COMPONENT_NAME_PROTOCOL instance.
558 @param ControllerHandle[in] The handle of a controller that the driver
559 specified by This is managing. This handle
560 specifies the controller whose name is to be
563 @param ChildHandle[in] The handle of the child controller to retrieve
564 the name of. This is an optional parameter that
565 may be NULL. It will be NULL for device
566 drivers. It will also be NULL for a bus drivers
567 that wish to retrieve the name of the bus
568 controller. It will not be NULL for a bus
569 driver that wishes to retrieve the name of a
572 @param Language[in] A pointer to a Null-terminated ASCII string
573 array indicating the language. This is the
574 language of the driver name that the caller is
575 requesting, and it must match one of the
576 languages specified in SupportedLanguages. The
577 number of languages supported by a driver is up
578 to the driver writer. Language is specified in
579 RFC 3066 or ISO 639-2 language code format.
581 @param ControllerName[out] A pointer to the Unicode string to return.
582 This Unicode string is the name of the
583 controller specified by ControllerHandle and
584 ChildHandle in the language specified by
585 Language from the point of view of the driver
588 @retval EFI_SUCCESS The Unicode string for the user readable name in
589 the language specified by Language for the
590 driver specified by This was returned in
593 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
595 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
598 @retval EFI_INVALID_PARAMETER Language is NULL.
600 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
602 @retval EFI_UNSUPPORTED The driver specified by This is not currently
603 managing the controller specified by
604 ControllerHandle and ChildHandle.
606 @retval EFI_UNSUPPORTED The driver specified by This does not support
607 the language specified by Language.
612 ConSplitterConInComponentNameGetControllerName (
613 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
614 IN EFI_HANDLE ControllerHandle
,
615 IN EFI_HANDLE ChildHandle OPTIONAL
,
617 OUT CHAR16
**ControllerName
622 Retrieves a Unicode string that is the user readable name of the controller
623 that is being managed by a driver.
625 This function retrieves the user readable name of the controller specified by
626 ControllerHandle and ChildHandle in the form of a Unicode string. If the
627 driver specified by This has a user readable name in the language specified by
628 Language, then a pointer to the controller name is returned in ControllerName,
629 and EFI_SUCCESS is returned. If the driver specified by This is not currently
630 managing the controller specified by ControllerHandle and ChildHandle,
631 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
632 support the language specified by Language, then EFI_UNSUPPORTED is returned.
634 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
635 EFI_COMPONENT_NAME_PROTOCOL instance.
637 @param ControllerHandle[in] The handle of a controller that the driver
638 specified by This is managing. This handle
639 specifies the controller whose name is to be
642 @param ChildHandle[in] The handle of the child controller to retrieve
643 the name of. This is an optional parameter that
644 may be NULL. It will be NULL for device
645 drivers. It will also be NULL for a bus drivers
646 that wish to retrieve the name of the bus
647 controller. It will not be NULL for a bus
648 driver that wishes to retrieve the name of a
651 @param Language[in] A pointer to a Null-terminated ASCII string
652 array indicating the language. This is the
653 language of the driver name that the caller is
654 requesting, and it must match one of the
655 languages specified in SupportedLanguages. The
656 number of languages supported by a driver is up
657 to the driver writer. Language is specified in
658 RFC 3066 or ISO 639-2 language code format.
660 @param ControllerName[out] A pointer to the Unicode string to return.
661 This Unicode string is the name of the
662 controller specified by ControllerHandle and
663 ChildHandle in the language specified by
664 Language from the point of view of the driver
667 @retval EFI_SUCCESS The Unicode string for the user readable name in
668 the language specified by Language for the
669 driver specified by This was returned in
672 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
674 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
677 @retval EFI_INVALID_PARAMETER Language is NULL.
679 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
681 @retval EFI_UNSUPPORTED The driver specified by This is not currently
682 managing the controller specified by
683 ControllerHandle and ChildHandle.
685 @retval EFI_UNSUPPORTED The driver specified by This does not support
686 the language specified by Language.
691 ConSplitterSimplePointerComponentNameGetControllerName (
692 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
693 IN EFI_HANDLE ControllerHandle
,
694 IN EFI_HANDLE ChildHandle OPTIONAL
,
696 OUT CHAR16
**ControllerName
701 ConSplitterAbsolutePointerComponentNameGetControllerName (
702 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
703 IN EFI_HANDLE ControllerHandle
,
704 IN EFI_HANDLE ChildHandle OPTIONAL
,
706 OUT CHAR16
**ControllerName
711 Retrieves a Unicode string that is the user readable name of the controller
712 that is being managed by a driver.
714 This function retrieves the user readable name of the controller specified by
715 ControllerHandle and ChildHandle in the form of a Unicode string. If the
716 driver specified by This has a user readable name in the language specified by
717 Language, then a pointer to the controller name is returned in ControllerName,
718 and EFI_SUCCESS is returned. If the driver specified by This is not currently
719 managing the controller specified by ControllerHandle and ChildHandle,
720 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
721 support the language specified by Language, then EFI_UNSUPPORTED is returned.
723 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
724 EFI_COMPONENT_NAME_PROTOCOL instance.
726 @param ControllerHandle[in] The handle of a controller that the driver
727 specified by This is managing. This handle
728 specifies the controller whose name is to be
731 @param ChildHandle[in] The handle of the child controller to retrieve
732 the name of. This is an optional parameter that
733 may be NULL. It will be NULL for device
734 drivers. It will also be NULL for a bus drivers
735 that wish to retrieve the name of the bus
736 controller. It will not be NULL for a bus
737 driver that wishes to retrieve the name of a
740 @param Language[in] A pointer to a Null-terminated ASCII string
741 array indicating the language. This is the
742 language of the driver name that the caller is
743 requesting, and it must match one of the
744 languages specified in SupportedLanguages. The
745 number of languages supported by a driver is up
746 to the driver writer. Language is specified in
747 RFC 3066 or ISO 639-2 language code format.
749 @param ControllerName[out] A pointer to the Unicode string to return.
750 This Unicode string is the name of the
751 controller specified by ControllerHandle and
752 ChildHandle in the language specified by
753 Language from the point of view of the driver
756 @retval EFI_SUCCESS The Unicode string for the user readable name in
757 the language specified by Language for the
758 driver specified by This was returned in
761 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
763 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
766 @retval EFI_INVALID_PARAMETER Language is NULL.
768 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
770 @retval EFI_UNSUPPORTED The driver specified by This is not currently
771 managing the controller specified by
772 ControllerHandle and ChildHandle.
774 @retval EFI_UNSUPPORTED The driver specified by This does not support
775 the language specified by Language.
780 ConSplitterConOutComponentNameGetControllerName (
781 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
782 IN EFI_HANDLE ControllerHandle
,
783 IN EFI_HANDLE ChildHandle OPTIONAL
,
785 OUT CHAR16
**ControllerName
790 Retrieves a Unicode string that is the user readable name of the controller
791 that is being managed by a driver.
793 This function retrieves the user readable name of the controller specified by
794 ControllerHandle and ChildHandle in the form of a Unicode string. If the
795 driver specified by This has a user readable name in the language specified by
796 Language, then a pointer to the controller name is returned in ControllerName,
797 and EFI_SUCCESS is returned. If the driver specified by This is not currently
798 managing the controller specified by ControllerHandle and ChildHandle,
799 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
800 support the language specified by Language, then EFI_UNSUPPORTED is returned.
802 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
803 EFI_COMPONENT_NAME_PROTOCOL instance.
805 @param ControllerHandle[in] The handle of a controller that the driver
806 specified by This is managing. This handle
807 specifies the controller whose name is to be
810 @param ChildHandle[in] The handle of the child controller to retrieve
811 the name of. This is an optional parameter that
812 may be NULL. It will be NULL for device
813 drivers. It will also be NULL for a bus drivers
814 that wish to retrieve the name of the bus
815 controller. It will not be NULL for a bus
816 driver that wishes to retrieve the name of a
819 @param Language[in] A pointer to a Null-terminated ASCII string
820 array indicating the language. This is the
821 language of the driver name that the caller is
822 requesting, and it must match one of the
823 languages specified in SupportedLanguages. The
824 number of languages supported by a driver is up
825 to the driver writer. Language is specified in
826 RFC 3066 or ISO 639-2 language code format.
828 @param ControllerName[out] A pointer to the Unicode string to return.
829 This Unicode string is the name of the
830 controller specified by ControllerHandle and
831 ChildHandle in the language specified by
832 Language from the point of view of the driver
835 @retval EFI_SUCCESS The Unicode string for the user readable name in
836 the language specified by Language for the
837 driver specified by This was returned in
840 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
842 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
845 @retval EFI_INVALID_PARAMETER Language is NULL.
847 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
849 @retval EFI_UNSUPPORTED The driver specified by This is not currently
850 managing the controller specified by
851 ControllerHandle and ChildHandle.
853 @retval EFI_UNSUPPORTED The driver specified by This does not support
854 the language specified by Language.
859 ConSplitterStdErrComponentNameGetControllerName (
860 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
861 IN EFI_HANDLE ControllerHandle
,
862 IN EFI_HANDLE ChildHandle OPTIONAL
,
864 OUT CHAR16
**ControllerName
869 // TextIn Constructor/Destructor functions
872 ConSplitterTextInAddDevice (
873 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
874 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
879 ConSplitterTextInDeleteDevice (
880 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
881 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
886 // SimplePointer Constuctor/Destructor functions
889 ConSplitterSimplePointerAddDevice (
890 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
891 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
896 ConSplitterSimplePointerDeleteDevice (
897 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
898 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
903 // TextOut Constuctor/Destructor functions
906 ConSplitterTextOutAddDevice (
907 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
908 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
909 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
910 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
915 ConSplitterTextOutDeleteDevice (
916 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
917 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
922 // TextIn I/O Functions
926 ConSplitterTextInReset (
927 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
928 IN BOOLEAN ExtendedVerification
934 ConSplitterTextInReadKeyStroke (
935 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
936 OUT EFI_INPUT_KEY
*Key
940 ConSplitterTextInExAddDevice (
941 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
942 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
947 ConSplitterTextInExDeleteDevice (
948 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
949 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
954 // Simple Text Input Ex protocol function prototypes
959 ConSplitterTextInResetEx (
960 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
961 IN BOOLEAN ExtendedVerification
966 Reset the input device and optionaly run diagnostics
969 This - Protocol instance pointer.
970 ExtendedVerification - Driver may perform diagnostics on reset.
973 EFI_SUCCESS - The device was reset.
974 EFI_DEVICE_ERROR - The device is not functioning properly and could
982 ConSplitterTextInReadKeyStrokeEx (
983 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
984 OUT EFI_KEY_DATA
*KeyData
989 Reads the next keystroke from the input device. The WaitForKey Event can
990 be used to test for existance of a keystroke via WaitForEvent () call.
993 This - Protocol instance pointer.
994 KeyData - A pointer to a buffer that is filled in with the keystroke
995 state data for the key that was pressed.
998 EFI_SUCCESS - The keystroke information was returned.
999 EFI_NOT_READY - There was no keystroke data availiable.
1000 EFI_DEVICE_ERROR - The keystroke information was not returned due to
1002 EFI_INVALID_PARAMETER - KeyData is NULL.
1009 ConSplitterTextInSetState (
1010 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1011 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1015 Routine Description:
1016 Set certain state for the input device.
1019 This - Protocol instance pointer.
1020 KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
1021 state for the input device.
1024 EFI_SUCCESS - The device state was set successfully.
1025 EFI_DEVICE_ERROR - The device is not functioning correctly and could
1026 not have the setting adjusted.
1027 EFI_UNSUPPORTED - The device does not have the ability to set its state.
1028 EFI_INVALID_PARAMETER - KeyToggleState is NULL.
1035 ConSplitterTextInRegisterKeyNotify (
1036 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1037 IN EFI_KEY_DATA
*KeyData
,
1038 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1039 OUT EFI_HANDLE
*NotifyHandle
1043 Routine Description:
1044 Register a notification function for a particular keystroke for the input device.
1047 This - Protocol instance pointer.
1048 KeyData - A pointer to a buffer that is filled in with the keystroke
1049 information data for the key that was pressed.
1050 KeyNotificationFunction - Points to the function to be called when the key
1051 sequence is typed specified by KeyData.
1052 NotifyHandle - Points to the unique handle assigned to the registered notification.
1055 EFI_SUCCESS - The notification function was registered successfully.
1056 EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
1057 EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
1064 ConSplitterTextInUnregisterKeyNotify (
1065 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1066 IN EFI_HANDLE NotificationHandle
1070 Routine Description:
1071 Remove a registered notification function from a particular keystroke.
1074 This - Protocol instance pointer.
1075 NotificationHandle - The handle of the notification function being unregistered.
1078 EFI_SUCCESS - The notification function was unregistered successfully.
1079 EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
1080 EFI_NOT_FOUND - Can not find the matching entry in database.
1086 ConSplitterTextInWaitForKey (
1093 ConSpliterConssoleControlStdInLocked (
1100 ConSpliterConsoleControlLockStdInEvent (
1108 ConSpliterConsoleControlLockStdIn (
1109 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1116 ConSplitterTextInPrivateReadKeyStroke (
1117 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1118 OUT EFI_INPUT_KEY
*Key
1124 ConSplitterSimplePointerReset (
1125 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1126 IN BOOLEAN ExtendedVerification
1132 ConSplitterSimplePointerGetState (
1133 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1134 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1140 ConSplitterSimplePointerWaitForInput (
1147 // TextOut I/O Functions
1150 ConSplitterSynchronizeModeData (
1151 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1157 ConSplitterTextOutReset (
1158 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1159 IN BOOLEAN ExtendedVerification
1165 ConSplitterTextOutOutputString (
1166 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1173 ConSplitterTextOutTestString (
1174 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1181 ConSplitterTextOutQueryMode (
1182 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1183 IN UINTN ModeNumber
,
1191 ConSplitterTextOutSetMode (
1192 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1199 ConSplitterTextOutSetAttribute (
1200 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1207 ConSplitterTextOutClearScreen (
1208 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1214 ConSplitterTextOutSetCursorPosition (
1215 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1223 ConSplitterTextOutEnableCursor (
1224 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1230 ConSplitterGrowBuffer (
1231 IN UINTN SizeOfCount
,
1233 IN OUT VOID
**Buffer
1239 ConSpliterConsoleControlGetMode (
1240 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1241 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE
*Mode
,
1242 OUT BOOLEAN
*GopExists
,
1243 OUT BOOLEAN
*StdInLocked
1249 ConSpliterConsoleControlSetMode (
1250 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1251 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
1257 ConSpliterGraphicsOutputQueryMode (
1258 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1259 IN UINT32 ModeNumber
,
1260 OUT UINTN
*SizeOfInfo
,
1261 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1267 ConSpliterGraphicsOutputSetMode (
1268 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1269 IN UINT32 ModeNumber
1275 ConSpliterGraphicsOutputBlt (
1276 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1277 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1278 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1281 IN UINTN DestinationX
,
1282 IN UINTN DestinationY
,
1285 IN UINTN Delta OPTIONAL
1291 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1292 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1293 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1299 ConSpliterUgaDrawGetMode (
1300 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1301 OUT UINT32
*HorizontalResolution
,
1302 OUT UINT32
*VerticalResolution
,
1303 OUT UINT32
*ColorDepth
,
1304 OUT UINT32
*RefreshRate
1310 ConSpliterUgaDrawSetMode (
1311 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1312 IN UINT32 HorizontalResolution
,
1313 IN UINT32 VerticalResolution
,
1314 IN UINT32 ColorDepth
,
1315 IN UINT32 RefreshRate
1321 ConSpliterUgaDrawBlt (
1322 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1323 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1324 IN EFI_UGA_BLT_OPERATION BltOperation
,
1327 IN UINTN DestinationX
,
1328 IN UINTN DestinationY
,
1331 IN UINTN Delta OPTIONAL
1337 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1338 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1339 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1344 DevNullTextOutOutputString (
1345 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1351 DevNullTextOutSetMode (
1352 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1358 DevNullTextOutClearScreen (
1359 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1364 DevNullTextOutSetCursorPosition (
1365 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1372 DevNullTextOutEnableCursor (
1373 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1380 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private