2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
5 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_
21 #include <Protocol/DevicePath.h>
22 #include <Protocol/ComponentName.h>
23 #include <Protocol/DriverBinding.h>
24 #include <Protocol/SimplePointer.h>
25 #include <Protocol/AbsolutePointer.h>
26 #include <Protocol/SimpleTextOut.h>
27 #include <Protocol/SimpleTextIn.h>
28 #include <Protocol/SimpleTextInEx.h>
29 #include <Protocol/GraphicsOutput.h>
30 #include <Protocol/UgaDraw.h>
32 #include <Guid/ConsoleInDevice.h>
33 #include <Guid/StandardErrorDevice.h>
34 #include <Guid/ConsoleOutDevice.h>
35 #include <Guid/ConnectConInEvent.h>
37 #include <Library/PcdLib.h>
38 #include <Library/DebugLib.h>
39 #include <Library/UefiDriverEntryPoint.h>
40 #include <Library/UefiLib.h>
41 #include <Library/BaseLib.h>
42 #include <Library/BaseMemoryLib.h>
43 #include <Library/MemoryAllocationLib.h>
44 #include <Library/UefiBootServicesTableLib.h>
45 #include <Library/UefiRuntimeServicesTableLib.h>
48 // Driver Binding Externs
50 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
56 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
57 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
58 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
59 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
60 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
61 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
62 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
63 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
64 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
68 // These definitions were in the old Hii protocol, but are not in the new UEFI
69 // version. So they are defined locally.
71 #define UNICODE_NARROW_CHAR 0xFFF0
72 #define UNICODE_WIDE_CHAR 0xFFF1
76 // Private Data Structures
78 #define CONSOLE_SPLITTER_ALLOC_UNIT 32
89 } TEXT_OUT_SPLITTER_QUERY_DATA
;
92 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
95 // Private data for Text In Ex Splitter Notify
97 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
99 VOID
**NotifyHandleList
;
100 EFI_KEY_DATA KeyData
;
101 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
102 LIST_ENTRY NotifyEntry
;
103 } TEXT_IN_EX_SPLITTER_NOTIFY
;
105 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
107 TEXT_IN_EX_SPLITTER_NOTIFY, \
109 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
112 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
115 // Private data for the Console In splitter
119 EFI_HANDLE VirtualHandle
;
121 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
122 UINTN CurrentNumberOfConsoles
;
123 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
124 UINTN TextInListCount
;
126 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
127 UINTN CurrentNumberOfExConsoles
;
128 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
129 UINTN TextInExListCount
;
130 LIST_ENTRY NotifyList
;
133 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
134 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
135 UINTN CurrentNumberOfPointers
;
136 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
137 UINTN PointerListCount
;
139 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
140 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
141 UINTN CurrentNumberOfAbsolutePointers
;
142 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
143 UINTN AbsolutePointerListCount
;
144 BOOLEAN AbsoluteInputEventSignalState
;
146 BOOLEAN KeyEventSignalState
;
147 BOOLEAN InputEventSignalState
;
148 EFI_EVENT ConnectConIn
;
149 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
151 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
153 TEXT_IN_SPLITTER_PRIVATE_DATA, \
155 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
158 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
160 TEXT_IN_SPLITTER_PRIVATE_DATA, \
162 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
164 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
166 TEXT_IN_SPLITTER_PRIVATE_DATA, \
168 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
171 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
173 TEXT_IN_SPLITTER_PRIVATE_DATA, \
175 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
179 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
182 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
183 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
184 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
185 } TEXT_OUT_AND_GOP_DATA
;
188 // Private data for the Console Out splitter
192 EFI_HANDLE VirtualHandle
;
193 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
194 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
196 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
197 UINT32 UgaHorizontalResolution
;
198 UINT32 UgaVerticalResolution
;
199 UINT32 UgaColorDepth
;
200 UINT32 UgaRefreshRate
;
202 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
203 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
204 UINTN CurrentNumberOfGraphicsOutput
;
205 UINTN CurrentNumberOfUgaDraw
;
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 } 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 The user Entry Point for module ConSplitter. The user code starts with this function.
251 Installs driver module protocols and. Creates virtual device handles for ConIn,
252 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
253 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
254 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
256 @param[in] ImageHandle The firmware allocated handle for the EFI image.
257 @param[in] SystemTable A pointer to the EFI System Table.
259 @retval EFI_SUCCESS The entry point is executed successfully.
260 @retval other Some error occurs when executing this entry point.
265 ConSplitterDriverEntry (
266 IN EFI_HANDLE ImageHandle
,
267 IN EFI_SYSTEM_TABLE
*SystemTable
271 Construct console input devices' private data.
273 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
276 @retval EFI_OUT_OF_RESOURCES Out of resources.
277 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
278 @retval other Failed to construct private data.
282 ConSplitterTextInConstructor (
283 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
287 Construct console output devices' private data.
289 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
292 @retval EFI_OUT_OF_RESOURCES Out of resources.
293 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
297 ConSplitterTextOutConstructor (
298 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
303 Test to see if Console In Device could be supported on the Controller.
305 @param This Driver Binding protocol instance pointer.
306 @param ControllerHandle Handle of device to test.
307 @param RemainingDevicePath Optional parameter use to pick a specific child
310 @retval EFI_SUCCESS This driver supports this device.
311 @retval other This driver does not support this device.
316 ConSplitterConInDriverBindingSupported (
317 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
318 IN EFI_HANDLE ControllerHandle
,
319 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
323 Test to see if Simple Pointer protocol could be supported on the Controller.
325 @param This Driver Binding protocol instance pointer.
326 @param ControllerHandle Handle of device to test.
327 @param RemainingDevicePath Optional parameter use to pick a specific child
330 @retval EFI_SUCCESS This driver supports this device.
331 @retval other This driver does not support this device.
336 ConSplitterSimplePointerDriverBindingSupported (
337 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
338 IN EFI_HANDLE ControllerHandle
,
339 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
343 Test to see if Console Out Device could be supported on the Controller.
345 @param This Driver Binding protocol instance pointer.
346 @param ControllerHandle Handle of device to test.
347 @param RemainingDevicePath Optional parameter use to pick a specific child
350 @retval EFI_SUCCESS This driver supports this device.
351 @retval other This driver does not support this device.
356 ConSplitterConOutDriverBindingSupported (
357 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
358 IN EFI_HANDLE ControllerHandle
,
359 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
363 Test to see if Standard Error Device could be supported on the Controller.
365 @param This Driver Binding protocol instance pointer.
366 @param ControllerHandle Handle of device to test.
367 @param RemainingDevicePath Optional parameter use to pick a specific child
370 @retval EFI_SUCCESS This driver supports this device.
371 @retval other This driver does not support this device.
376 ConSplitterStdErrDriverBindingSupported (
377 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
378 IN EFI_HANDLE ControllerHandle
,
379 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
383 Start Console In Consplitter on device handle.
385 @param This Driver Binding protocol instance pointer.
386 @param ControllerHandle Handle of device to bind driver to.
387 @param RemainingDevicePath Optional parameter use to pick a specific child
390 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
391 @retval other Console In Consplitter does not support this device.
396 ConSplitterConInDriverBindingStart (
397 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
398 IN EFI_HANDLE ControllerHandle
,
399 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
403 Start Simple Pointer Consplitter on device handle.
405 @param This Driver Binding protocol instance pointer.
406 @param ControllerHandle Handle of device to bind driver to.
407 @param RemainingDevicePath Optional parameter use to pick a specific child
410 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
411 @retval other Simple Pointer Consplitter does not support this device.
416 ConSplitterSimplePointerDriverBindingStart (
417 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
418 IN EFI_HANDLE ControllerHandle
,
419 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
423 Start Console Out Consplitter on device handle.
425 @param This Driver Binding protocol instance pointer.
426 @param ControllerHandle Handle of device to bind driver to.
427 @param RemainingDevicePath Optional parameter use to pick a specific child
430 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
431 @retval other Console Out Consplitter does not support this device.
436 ConSplitterConOutDriverBindingStart (
437 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
438 IN EFI_HANDLE ControllerHandle
,
439 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
443 Start Standard Error Consplitter on device handle.
445 @param This Driver Binding protocol instance pointer.
446 @param ControllerHandle Handle of device to bind driver to.
447 @param RemainingDevicePath Optional parameter use to pick a specific child
450 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
451 @retval other Standard Error Consplitter does not support this device.
456 ConSplitterStdErrDriverBindingStart (
457 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
458 IN EFI_HANDLE ControllerHandle
,
459 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
463 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
465 @param This Driver Binding protocol instance pointer.
466 @param ControllerHandle Handle of device to stop driver on
467 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
468 children is zero stop the entire bus driver.
469 @param ChildHandleBuffer List of Child Handles to Stop.
471 @retval EFI_SUCCESS This driver is removed ControllerHandle
472 @retval other This driver was not removed from this device
477 ConSplitterConInDriverBindingStop (
478 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
479 IN EFI_HANDLE ControllerHandle
,
480 IN UINTN NumberOfChildren
,
481 IN EFI_HANDLE
*ChildHandleBuffer
485 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
486 Simple Pointer protocol.
488 @param This Driver Binding protocol instance pointer.
489 @param ControllerHandle Handle of device to stop driver on
490 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
491 children is zero stop the entire bus driver.
492 @param ChildHandleBuffer List of Child Handles to Stop.
494 @retval EFI_SUCCESS This driver is removed ControllerHandle
495 @retval other This driver was not removed from this device
500 ConSplitterSimplePointerDriverBindingStop (
501 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
502 IN EFI_HANDLE ControllerHandle
,
503 IN UINTN NumberOfChildren
,
504 IN EFI_HANDLE
*ChildHandleBuffer
508 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
510 @param This Driver Binding protocol instance pointer.
511 @param ControllerHandle Handle of device to stop driver on
512 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
513 children is zero stop the entire bus driver.
514 @param ChildHandleBuffer List of Child Handles to Stop.
516 @retval EFI_SUCCESS This driver is removed ControllerHandle
517 @retval other This driver was not removed from this device
522 ConSplitterConOutDriverBindingStop (
523 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
524 IN EFI_HANDLE ControllerHandle
,
525 IN UINTN NumberOfChildren
,
526 IN EFI_HANDLE
*ChildHandleBuffer
530 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
532 @param This Driver Binding protocol instance pointer.
533 @param ControllerHandle Handle of device to stop driver on
534 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
535 children is zero stop the entire bus driver.
536 @param ChildHandleBuffer List of Child Handles to Stop.
538 @retval EFI_SUCCESS This driver is removed ControllerHandle
539 @retval other This driver was not removed from this device
544 ConSplitterStdErrDriverBindingStop (
545 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
546 IN EFI_HANDLE ControllerHandle
,
547 IN UINTN NumberOfChildren
,
548 IN EFI_HANDLE
*ChildHandleBuffer
553 Test to see if Absolute Pointer protocol could be supported on the Controller.
555 @param This Driver Binding protocol instance pointer.
556 @param ControllerHandle Handle of device to test.
557 @param RemainingDevicePath Optional parameter use to pick a specific child
560 @retval EFI_SUCCESS This driver supports this device.
561 @retval other This driver does not support this device.
566 ConSplitterAbsolutePointerDriverBindingSupported (
567 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
568 IN EFI_HANDLE ControllerHandle
,
569 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
573 Start Absolute Pointer Consplitter on device handle.
575 @param This Driver Binding protocol instance pointer.
576 @param ControllerHandle Handle of device to bind driver to.
577 @param RemainingDevicePath Optional parameter use to pick a specific child
580 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
581 @retval other Absolute Pointer Consplitter does not support this device.
586 ConSplitterAbsolutePointerDriverBindingStart (
587 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
588 IN EFI_HANDLE ControllerHandle
,
589 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
593 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
594 Absolute Pointer protocol.
596 @param This Driver Binding protocol instance pointer.
597 @param ControllerHandle Handle of device to stop driver on
598 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
599 children is zero stop the entire bus driver.
600 @param ChildHandleBuffer List of Child Handles to Stop.
602 @retval EFI_SUCCESS This driver is removed ControllerHandle
603 @retval other This driver was not removed from this device
608 ConSplitterAbsolutePointerDriverBindingStop (
609 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
610 IN EFI_HANDLE ControllerHandle
,
611 IN UINTN NumberOfChildren
,
612 IN EFI_HANDLE
*ChildHandleBuffer
616 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
618 @param Private Text In Splitter pointer.
619 @param AbsolutePointer Absolute Pointer protocol pointer.
621 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
622 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
626 ConSplitterAbsolutePointerAddDevice (
627 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
628 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
632 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
634 @param Private Text In Splitter pointer.
635 @param AbsolutePointer Absolute Pointer protocol pointer.
637 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
638 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
642 ConSplitterAbsolutePointerDeleteDevice (
643 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
644 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
648 // Absolute Pointer protocol interfaces
653 Resets the pointer device hardware.
655 @param This Protocol instance pointer.
656 @param ExtendedVerification Driver may perform diagnostics on reset.
658 @retval EFI_SUCCESS The device was reset.
659 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
665 ConSplitterAbsolutePointerReset (
666 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
667 IN BOOLEAN ExtendedVerification
672 Retrieves the current state of a pointer device.
674 @param This Protocol instance pointer.
675 @param State A pointer to the state information on the
678 @retval EFI_SUCCESS The state of the pointer device was returned in
680 @retval EFI_NOT_READY The state of the pointer device has not changed
681 since the last call to GetState().
682 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
683 retrieve the pointer device's current state.
688 ConSplitterAbsolutePointerGetState (
689 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
690 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
694 This event agregates all the events of the pointer devices in the splitter.
696 If any events of physical pointer devices are signaled, signal the pointer
697 splitter event. This will cause the calling code to call
698 ConSplitterAbsolutePointerGetState ().
700 @param Event The Event assoicated with callback.
701 @param Context Context registered when Event was created.
706 ConSplitterAbsolutePointerWaitForInput (
712 Retrieves a Unicode string that is the user readable name of the driver.
714 This function retrieves the user readable name of a driver in the form of a
715 Unicode string. If the driver specified by This has a user readable name in
716 the language specified by Language, then a pointer to the driver name is
717 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
718 by This does not support the language specified by Language,
719 then EFI_UNSUPPORTED is returned.
721 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
722 EFI_COMPONENT_NAME_PROTOCOL instance.
724 @param Language[in] A pointer to a Null-terminated ASCII string
725 array indicating the language. This is the
726 language of the driver name that the caller is
727 requesting, and it must match one of the
728 languages specified in SupportedLanguages. The
729 number of languages supported by a driver is up
730 to the driver writer. Language is specified
731 in RFC 4646 or ISO 639-2 language code format.
733 @param DriverName[out] A pointer to the Unicode string to return.
734 This Unicode string is the name of the
735 driver specified by This in the language
736 specified by Language.
738 @retval EFI_SUCCESS The Unicode string for the Driver specified by
739 This and the language specified by Language was
740 returned in DriverName.
742 @retval EFI_INVALID_PARAMETER Language is NULL.
744 @retval EFI_INVALID_PARAMETER DriverName is NULL.
746 @retval EFI_UNSUPPORTED The driver specified by This does not support
747 the language specified by Language.
752 ConSplitterComponentNameGetDriverName (
753 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
755 OUT CHAR16
**DriverName
760 Retrieves a Unicode string that is the user readable name of the controller
761 that is being managed by a driver.
763 This function retrieves the user readable name of the controller specified by
764 ControllerHandle and ChildHandle in the form of a Unicode string. If the
765 driver specified by This has a user readable name in the language specified by
766 Language, then a pointer to the controller name is returned in ControllerName,
767 and EFI_SUCCESS is returned. If the driver specified by This is not currently
768 managing the controller specified by ControllerHandle and ChildHandle,
769 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
770 support the language specified by Language, then EFI_UNSUPPORTED is returned.
772 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
773 EFI_COMPONENT_NAME_PROTOCOL instance.
775 @param ControllerHandle[in] The handle of a controller that the driver
776 specified by This is managing. This handle
777 specifies the controller whose name is to be
780 @param ChildHandle[in] The handle of the child controller to retrieve
781 the name of. This is an optional parameter that
782 may be NULL. It will be NULL for device
783 drivers. It will also be NULL for a bus drivers
784 that wish to retrieve the name of the bus
785 controller. It will not be NULL for a bus
786 driver that wishes to retrieve the name of a
789 @param Language[in] A pointer to a Null-terminated ASCII string
790 array indicating the language. This is the
791 language of the driver name that the caller is
792 requesting, and it must match one of the
793 languages specified in SupportedLanguages. The
794 number of languages supported by a driver is up
795 to the driver writer. Language is specified in
796 RFC 4646 or ISO 639-2 language code format.
798 @param ControllerName[out] A pointer to the Unicode string to return.
799 This Unicode string is the name of the
800 controller specified by ControllerHandle and
801 ChildHandle in the language specified by
802 Language from the point of view of the driver
805 @retval EFI_SUCCESS The Unicode string for the user readable name in
806 the language specified by Language for the
807 driver specified by This was returned in
810 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
812 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
815 @retval EFI_INVALID_PARAMETER Language is NULL.
817 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
819 @retval EFI_UNSUPPORTED The driver specified by This is not currently
820 managing the controller specified by
821 ControllerHandle and ChildHandle.
823 @retval EFI_UNSUPPORTED The driver specified by This does not support
824 the language specified by Language.
829 ConSplitterConInComponentNameGetControllerName (
830 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
831 IN EFI_HANDLE ControllerHandle
,
832 IN EFI_HANDLE ChildHandle OPTIONAL
,
834 OUT CHAR16
**ControllerName
839 Retrieves a Unicode string that is the user readable name of the controller
840 that is being managed by a driver.
842 This function retrieves the user readable name of the controller specified by
843 ControllerHandle and ChildHandle in the form of a Unicode string. If the
844 driver specified by This has a user readable name in the language specified by
845 Language, then a pointer to the controller name is returned in ControllerName,
846 and EFI_SUCCESS is returned. If the driver specified by This is not currently
847 managing the controller specified by ControllerHandle and ChildHandle,
848 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
849 support the language specified by Language, then EFI_UNSUPPORTED is returned.
851 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
852 EFI_COMPONENT_NAME_PROTOCOL instance.
854 @param ControllerHandle[in] The handle of a controller that the driver
855 specified by This is managing. This handle
856 specifies the controller whose name is to be
859 @param ChildHandle[in] The handle of the child controller to retrieve
860 the name of. This is an optional parameter that
861 may be NULL. It will be NULL for device
862 drivers. It will also be NULL for a bus drivers
863 that wish to retrieve the name of the bus
864 controller. It will not be NULL for a bus
865 driver that wishes to retrieve the name of a
868 @param Language[in] A pointer to a Null-terminated ASCII string
869 array indicating the language. This is the
870 language of the driver name that the caller is
871 requesting, and it must match one of the
872 languages specified in SupportedLanguages. The
873 number of languages supported by a driver is up
874 to the driver writer. Language is specified in
875 RFC 4646 or ISO 639-2 language code format.
877 @param ControllerName[out] A pointer to the Unicode string to return.
878 This Unicode string is the name of the
879 controller specified by ControllerHandle and
880 ChildHandle in the language specified by
881 Language from the point of view of the driver
884 @retval EFI_SUCCESS The Unicode string for the user readable name in
885 the language specified by Language for the
886 driver specified by This was returned in
889 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
891 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
894 @retval EFI_INVALID_PARAMETER Language is NULL.
896 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
898 @retval EFI_UNSUPPORTED The driver specified by This is not currently
899 managing the controller specified by
900 ControllerHandle and ChildHandle.
902 @retval EFI_UNSUPPORTED The driver specified by This does not support
903 the language specified by Language.
908 ConSplitterSimplePointerComponentNameGetControllerName (
909 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
910 IN EFI_HANDLE ControllerHandle
,
911 IN EFI_HANDLE ChildHandle OPTIONAL
,
913 OUT CHAR16
**ControllerName
917 Retrieves a Unicode string that is the user readable name of the controller
918 that is being managed by an EFI Driver.
920 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
922 @param ControllerHandle The handle of a controller that the driver
923 specified by This is managing. This handle
924 specifies the controller whose name is to be
926 @param ChildHandle The handle of the child controller to retrieve the
927 name of. This is an optional parameter that may
928 be NULL. It will be NULL for device drivers. It
929 will also be NULL for a bus drivers that wish to
930 retrieve the name of the bus controller. It will
931 not be NULL for a bus driver that wishes to
932 retrieve the name of a child controller.
933 @param Language A pointer to RFC4646 language identifier. This is
934 the language of the controller name that that the
935 caller is requesting, and it must match one of the
936 languages specified in SupportedLanguages. The
937 number of languages supported by a driver is up to
939 @param ControllerName A pointer to the Unicode string to return. This
940 Unicode string is the name of the controller
941 specified by ControllerHandle and ChildHandle in
942 the language specified by Language from the point
943 of view of the driver specified by This.
945 @retval EFI_SUCCESS The Unicode string for the user readable name in
946 the language specified by Language for the driver
947 specified by This was returned in DriverName.
948 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
949 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
951 @retval EFI_INVALID_PARAMETER Language is NULL.
952 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
953 @retval EFI_UNSUPPORTED The driver specified by This is not currently
954 managing the controller specified by
955 ControllerHandle and ChildHandle.
956 @retval EFI_UNSUPPORTED The driver specified by This does not support the
957 language specified by Language.
962 ConSplitterAbsolutePointerComponentNameGetControllerName (
963 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
964 IN EFI_HANDLE ControllerHandle
,
965 IN EFI_HANDLE ChildHandle OPTIONAL
,
967 OUT CHAR16
**ControllerName
971 Retrieves a Unicode string that is the user readable name of the controller
972 that is being managed by a driver.
974 This function retrieves the user readable name of the controller specified by
975 ControllerHandle and ChildHandle in the form of a Unicode string. If the
976 driver specified by This has a user readable name in the language specified by
977 Language, then a pointer to the controller name is returned in ControllerName,
978 and EFI_SUCCESS is returned. If the driver specified by This is not currently
979 managing the controller specified by ControllerHandle and ChildHandle,
980 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
981 support the language specified by Language, then EFI_UNSUPPORTED is returned.
983 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
984 EFI_COMPONENT_NAME_PROTOCOL instance.
986 @param ControllerHandle[in] The handle of a controller that the driver
987 specified by This is managing. This handle
988 specifies the controller whose name is to be
991 @param ChildHandle[in] The handle of the child controller to retrieve
992 the name of. This is an optional parameter that
993 may be NULL. It will be NULL for device
994 drivers. It will also be NULL for a bus drivers
995 that wish to retrieve the name of the bus
996 controller. It will not be NULL for a bus
997 driver that wishes to retrieve the name of a
1000 @param Language[in] A pointer to a Null-terminated ASCII string
1001 array indicating the language. This is the
1002 language of the driver name that the caller is
1003 requesting, and it must match one of the
1004 languages specified in SupportedLanguages. The
1005 number of languages supported by a driver is up
1006 to the driver writer. Language is specified in
1007 RFC 4646 or ISO 639-2 language code format.
1009 @param ControllerName[out] A pointer to the Unicode string to return.
1010 This Unicode string is the name of the
1011 controller specified by ControllerHandle and
1012 ChildHandle in the language specified by
1013 Language from the point of view of the driver
1016 @retval EFI_SUCCESS The Unicode string for the user readable name in
1017 the language specified by Language for the
1018 driver specified by This was returned in
1021 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1023 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1026 @retval EFI_INVALID_PARAMETER Language is NULL.
1028 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1030 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1031 managing the controller specified by
1032 ControllerHandle and ChildHandle.
1034 @retval EFI_UNSUPPORTED The driver specified by This does not support
1035 the language specified by Language.
1040 ConSplitterConOutComponentNameGetControllerName (
1041 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1042 IN EFI_HANDLE ControllerHandle
,
1043 IN EFI_HANDLE ChildHandle OPTIONAL
,
1045 OUT CHAR16
**ControllerName
1050 Retrieves a Unicode string that is the user readable name of the controller
1051 that is being managed by a driver.
1053 This function retrieves the user readable name of the controller specified by
1054 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1055 driver specified by This has a user readable name in the language specified by
1056 Language, then a pointer to the controller name is returned in ControllerName,
1057 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1058 managing the controller specified by ControllerHandle and ChildHandle,
1059 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1060 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1062 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1063 EFI_COMPONENT_NAME_PROTOCOL instance.
1065 @param ControllerHandle[in] The handle of a controller that the driver
1066 specified by This is managing. This handle
1067 specifies the controller whose name is to be
1070 @param ChildHandle[in] The handle of the child controller to retrieve
1071 the name of. This is an optional parameter that
1072 may be NULL. It will be NULL for device
1073 drivers. It will also be NULL for a bus drivers
1074 that wish to retrieve the name of the bus
1075 controller. It will not be NULL for a bus
1076 driver that wishes to retrieve the name of a
1079 @param Language[in] A pointer to a Null-terminated ASCII string
1080 array indicating the language. This is the
1081 language of the driver name that the caller is
1082 requesting, and it must match one of the
1083 languages specified in SupportedLanguages. The
1084 number of languages supported by a driver is up
1085 to the driver writer. Language is specified in
1086 RFC 4646 or ISO 639-2 language code format.
1088 @param ControllerName[out] A pointer to the Unicode string to return.
1089 This Unicode string is the name of the
1090 controller specified by ControllerHandle and
1091 ChildHandle in the language specified by
1092 Language from the point of view of the driver
1095 @retval EFI_SUCCESS The Unicode string for the user readable name in
1096 the language specified by Language for the
1097 driver specified by This was returned in
1100 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1102 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1105 @retval EFI_INVALID_PARAMETER Language is NULL.
1107 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1109 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1110 managing the controller specified by
1111 ControllerHandle and ChildHandle.
1113 @retval EFI_UNSUPPORTED The driver specified by This does not support
1114 the language specified by Language.
1119 ConSplitterStdErrComponentNameGetControllerName (
1120 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1121 IN EFI_HANDLE ControllerHandle
,
1122 IN EFI_HANDLE ChildHandle OPTIONAL
,
1124 OUT CHAR16
**ControllerName
1129 // TextIn Constructor/Destructor functions
1133 Add Text Input Device in Consplitter Text Input list.
1135 @param Private Text In Splitter pointer.
1136 @param TextIn Simple Text Input protocol pointer.
1138 @retval EFI_SUCCESS Text Input Device added successfully.
1139 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1143 ConSplitterTextInAddDevice (
1144 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1145 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1149 Remove Text Input Device from Consplitter Text Input list.
1151 @param Private Text In Splitter pointer.
1152 @param TextIn Simple Text protocol pointer.
1154 @retval EFI_SUCCESS Simple Text Device removed successfully.
1155 @retval EFI_NOT_FOUND No Simple Text Device found.
1159 ConSplitterTextInDeleteDevice (
1160 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1161 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1165 // SimplePointer Constuctor/Destructor functions
1169 Add Simple Pointer Device in Consplitter Simple Pointer list.
1171 @param Private Text In Splitter pointer.
1172 @param SimplePointer Simple Pointer protocol pointer.
1174 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1175 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1179 ConSplitterSimplePointerAddDevice (
1180 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1181 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1185 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1187 @param Private Text In Splitter pointer.
1188 @param SimplePointer Simple Pointer protocol pointer.
1190 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1191 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1195 ConSplitterSimplePointerDeleteDevice (
1196 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1197 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1201 // TextOut Constuctor/Destructor functions
1205 Add Text Output Device in Consplitter Text Output list.
1207 @param Private Text Out Splitter pointer.
1208 @param TextOut Simple Text Output protocol pointer.
1209 @param GraphicsOutput Graphics Output protocol pointer.
1210 @param UgaDraw UGA Draw protocol pointer.
1212 @retval EFI_SUCCESS Text Output Device added successfully.
1213 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1217 ConSplitterTextOutAddDevice (
1218 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1219 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1220 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1221 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1225 Remove Text Out Device in Consplitter Text Out list.
1227 @param Private Text Out Splitter pointer.
1228 @param TextOut Simple Text Output Pointer protocol pointer.
1230 @retval EFI_SUCCESS Text Out Device removed successfully.
1231 @retval EFI_NOT_FOUND No Text Out Device found.
1235 ConSplitterTextOutDeleteDevice (
1236 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1237 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1241 // TextIn I/O Functions
1245 Reset the input device and optionaly run diagnostics
1247 @param This Protocol instance pointer.
1248 @param ExtendedVerification Driver may perform diagnostics on reset.
1250 @retval EFI_SUCCESS The device was reset.
1251 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1257 ConSplitterTextInReset (
1258 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1259 IN BOOLEAN ExtendedVerification
1263 Reads the next keystroke from the input device. The WaitForKey Event can
1264 be used to test for existance of a keystroke via WaitForEvent () call.
1266 @param This Protocol instance pointer.
1267 @param Key Driver may perform diagnostics on reset.
1269 @retval EFI_SUCCESS The keystroke information was returned.
1270 @retval EFI_NOT_READY There was no keystroke data availiable.
1271 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1277 ConSplitterTextInReadKeyStroke (
1278 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1279 OUT EFI_INPUT_KEY
*Key
1283 Add Text Input Ex Device in Consplitter Text Input Ex list.
1285 @param Private Text In Splitter pointer.
1286 @param TextInEx Simple Text Input Ex Input protocol pointer.
1288 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1289 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1293 ConSplitterTextInExAddDevice (
1294 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1295 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1299 Remove Text Ex Device from Consplitter Text Input Ex list.
1301 @param Private Text In Splitter pointer.
1302 @param TextInEx Simple Text Ex protocol pointer.
1304 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1305 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1309 ConSplitterTextInExDeleteDevice (
1310 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1311 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1315 // Simple Text Input Ex protocol function prototypes
1319 Reset the input device and optionaly run diagnostics
1321 @param This Protocol instance pointer.
1322 @param ExtendedVerification Driver may perform diagnostics on reset.
1324 @retval EFI_SUCCESS The device was reset.
1325 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1331 ConSplitterTextInResetEx (
1332 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1333 IN BOOLEAN ExtendedVerification
1338 Reads the next keystroke from the input device. The WaitForKey Event can
1339 be used to test for existance of a keystroke via WaitForEvent () call.
1341 @param This Protocol instance pointer.
1342 @param KeyData A pointer to a buffer that is filled in with the
1343 keystroke state data for the key that was
1346 @retval EFI_SUCCESS The keystroke information was returned.
1347 @retval EFI_NOT_READY There was no keystroke data availiable.
1348 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1350 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1355 ConSplitterTextInReadKeyStrokeEx (
1356 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1357 OUT EFI_KEY_DATA
*KeyData
1362 Set certain state for the input device.
1364 @param This Protocol instance pointer.
1365 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1366 state for the input device.
1368 @retval EFI_SUCCESS The device state was set successfully.
1369 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1370 could not have the setting adjusted.
1371 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1373 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1378 ConSplitterTextInSetState (
1379 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1380 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1385 Register a notification function for a particular keystroke for the input device.
1387 @param This Protocol instance pointer.
1388 @param KeyData A pointer to a buffer that is filled in with the
1389 keystroke information data for the key that was
1391 @param KeyNotificationFunction Points to the function to be called when the key
1392 sequence is typed specified by KeyData.
1393 @param NotifyHandle Points to the unique handle assigned to the
1394 registered notification.
1396 @retval EFI_SUCCESS The notification function was registered
1398 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1400 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1405 ConSplitterTextInRegisterKeyNotify (
1406 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1407 IN EFI_KEY_DATA
*KeyData
,
1408 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1409 OUT VOID
**NotifyHandle
1414 Remove a registered notification function from a particular keystroke.
1416 @param This Protocol instance pointer.
1417 @param NotificationHandle The handle of the notification function being
1420 @retval EFI_SUCCESS The notification function was unregistered
1422 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1423 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1428 ConSplitterTextInUnregisterKeyNotify (
1429 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1430 IN VOID
*NotificationHandle
1434 This event aggregates all the events of the ConIn devices in the spliter.
1436 If any events of physical ConIn devices are signaled, signal the ConIn
1437 spliter event. This will cause the calling code to call
1438 ConSplitterTextInReadKeyStroke ().
1440 @param Event The Event assoicated with callback.
1441 @param Context Context registered when Event was created.
1446 ConSplitterTextInWaitForKey (
1453 Reads the next keystroke from the input device. The WaitForKey Event can
1454 be used to test for existance of a keystroke via WaitForEvent () call.
1456 @param Private Protocol instance pointer.
1457 @param Key Driver may perform diagnostics on reset.
1459 @retval EFI_SUCCESS The keystroke information was returned.
1460 @retval EFI_NOT_READY There was no keystroke data availiable.
1461 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1467 ConSplitterTextInPrivateReadKeyStroke (
1468 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1469 OUT EFI_INPUT_KEY
*Key
1473 Reset the input device and optionaly run diagnostics
1475 @param This Protocol instance pointer.
1476 @param ExtendedVerification Driver may perform diagnostics on reset.
1478 @retval EFI_SUCCESS The device was reset.
1479 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1485 ConSplitterSimplePointerReset (
1486 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1487 IN BOOLEAN ExtendedVerification
1491 Reads the next keystroke from the input device. The WaitForKey Event can
1492 be used to test for existance of a keystroke via WaitForEvent () call.
1494 @param This A pointer to protocol instance.
1495 @param State A pointer to state information on the pointer device
1497 @retval EFI_SUCCESS The keystroke information was returned in State.
1498 @retval EFI_NOT_READY There was no keystroke data availiable.
1499 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1505 ConSplitterSimplePointerGetState (
1506 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1507 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1511 This event agregates all the events of the ConIn devices in the spliter.
1512 If any events of physical ConIn devices are signaled, signal the ConIn
1513 spliter event. This will cause the calling code to call
1514 ConSplitterTextInReadKeyStroke ().
1516 @param Event The Event assoicated with callback.
1517 @param Context Context registered when Event was created.
1522 ConSplitterSimplePointerWaitForInput (
1528 // TextOut I/O Functions
1532 Reset the text output device hardware and optionaly run diagnostics
1534 @param This Protocol instance pointer.
1535 @param ExtendedVerification Driver may perform more exhaustive verfication
1536 operation of the device during reset.
1538 @retval EFI_SUCCESS The text output device was reset.
1539 @retval EFI_DEVICE_ERROR The text output device is not functioning
1540 correctly and could not be reset.
1545 ConSplitterTextOutReset (
1546 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1547 IN BOOLEAN ExtendedVerification
1551 Write a Unicode string to the output device.
1553 @param This Protocol instance pointer.
1554 @param WString The NULL-terminated Unicode string to be
1555 displayed on the output device(s). All output
1556 devices must also support the Unicode drawing
1557 defined in this file.
1559 @retval EFI_SUCCESS The string was output to the device.
1560 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1562 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1564 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1565 characters in the Unicode string could not be
1566 rendered and were skipped.
1571 ConSplitterTextOutOutputString (
1572 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1577 Verifies that all characters in a Unicode string can be output to the
1580 @param This Protocol instance pointer.
1581 @param WString The NULL-terminated Unicode string to be
1582 examined for the output device(s).
1584 @retval EFI_SUCCESS The device(s) are capable of rendering the
1586 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1587 cannot be rendered by one or more of the output
1588 devices mapped by the EFI handle.
1593 ConSplitterTextOutTestString (
1594 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1599 Returns information for an available text mode that the output device(s)
1602 @param This Protocol instance pointer.
1603 @param ModeNumber The mode number to return information on.
1604 @param Columns Returns the columns of the text output device
1605 for the requested ModeNumber.
1606 @param Rows Returns the rows of the text output device
1607 for the requested ModeNumber.
1609 @retval EFI_SUCCESS The requested mode information was returned.
1610 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1612 @retval EFI_UNSUPPORTED The mode number was not valid.
1617 ConSplitterTextOutQueryMode (
1618 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1619 IN UINTN ModeNumber
,
1625 Sets the output device(s) to a specified mode.
1627 @param This Protocol instance pointer.
1628 @param ModeNumber The mode number to set.
1630 @retval EFI_SUCCESS The requested text mode was set.
1631 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1633 @retval EFI_UNSUPPORTED The mode number was not valid.
1638 ConSplitterTextOutSetMode (
1639 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1644 Sets the background and foreground colors for the OutputString () and
1645 ClearScreen () functions.
1647 @param This Protocol instance pointer.
1648 @param Attribute The attribute to set. Bits 0..3 are the
1649 foreground color, and bits 4..6 are the
1650 background color. All other bits are undefined
1651 and must be zero. The valid Attributes are
1652 defined in this file.
1654 @retval EFI_SUCCESS The attribute was set.
1655 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1657 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1662 ConSplitterTextOutSetAttribute (
1663 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1668 Clears the output device(s) display to the currently selected background
1671 @param This Protocol instance pointer.
1673 @retval EFI_SUCCESS The operation completed successfully.
1674 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1676 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1681 ConSplitterTextOutClearScreen (
1682 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1686 Sets the current coordinates of the cursor position
1688 @param This Protocol instance pointer.
1689 @param Column The column position to set the cursor to. Must be
1690 greater than or equal to zero and less than the
1691 number of columns by QueryMode ().
1692 @param Row The row position to set the cursor to. Must be
1693 greater than or equal to zero and less than the
1694 number of rows by QueryMode ().
1696 @retval EFI_SUCCESS The operation completed successfully.
1697 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1699 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1700 or the cursor position is invalid for the
1706 ConSplitterTextOutSetCursorPosition (
1707 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1714 Makes the cursor visible or invisible
1716 @param This Protocol instance pointer.
1717 @param Visible If TRUE, the cursor is set to be visible. If
1718 FALSE, the cursor is set to be invisible.
1720 @retval EFI_SUCCESS The operation completed successfully.
1721 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1722 the request, or the device does not support
1723 changing the cursor mode.
1724 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1729 ConSplitterTextOutEnableCursor (
1730 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1735 Take the passed in Buffer of size ElementSize and grow the buffer
1736 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1737 Copy the current data in Buffer to the new version of Buffer and
1738 free the old version of buffer.
1740 @param ElementSize Size of element in array.
1741 @param Count Current number of elements in array.
1742 @param Buffer Bigger version of passed in Buffer with all the
1745 @retval EFI_SUCCESS Buffer size has grown.
1746 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1750 ConSplitterGrowBuffer (
1751 IN UINTN ElementSize
,
1752 IN OUT UINTN
*Count
,
1753 IN OUT VOID
**Buffer
1757 Returns information for an available graphics mode that the graphics device
1758 and the set of active video output devices supports.
1760 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1761 @param ModeNumber The mode number to return information on.
1762 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1763 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1765 @retval EFI_SUCCESS Mode information returned.
1766 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1767 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1768 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1769 @retval EFI_OUT_OF_RESOURCES No resource available.
1774 ConSplitterGraphicsOutputQueryMode (
1775 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1776 IN UINT32 ModeNumber
,
1777 OUT UINTN
*SizeOfInfo
,
1778 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1782 Set the video device into the specified mode and clears the visible portions of
1783 the output display to black.
1785 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1786 @param ModeNumber Abstraction that defines the current video mode.
1788 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1789 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1790 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1791 @retval EFI_OUT_OF_RESOURCES No resource available.
1796 ConSplitterGraphicsOutputSetMode (
1797 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1798 IN UINT32 ModeNumber
1802 The following table defines actions for BltOperations.
1804 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1805 directly to every pixel of the video display rectangle
1806 (DestinationX, DestinationY)
1807 (DestinationX + Width, DestinationY + Height).
1808 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1809 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1810 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1811 the BltBuffer rectangle (DestinationX, DestinationY )
1812 (DestinationX + Width, DestinationY + Height). If DestinationX or
1813 DestinationY is not zero then Delta must be set to the length in bytes
1814 of a row in the BltBuffer.
1815 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1816 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1817 video display rectangle (DestinationX, DestinationY)
1818 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1819 not zero then Delta must be set to the length in bytes of a row in the
1821 EfiBltVideoToVideo - Copy from the video display rectangle
1822 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1823 to the video display rectangle (DestinationX, DestinationY)
1824 (DestinationX + Width, DestinationY + Height).
1825 The BltBuffer and Delta are not used in this mode.
1827 @param This Protocol instance pointer.
1828 @param BltBuffer Buffer containing data to blit into video buffer.
1829 This buffer has a size of
1830 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1831 @param BltOperation Operation to perform on BlitBuffer and video
1833 @param SourceX X coordinate of source for the BltBuffer.
1834 @param SourceY Y coordinate of source for the BltBuffer.
1835 @param DestinationX X coordinate of destination for the BltBuffer.
1836 @param DestinationY Y coordinate of destination for the BltBuffer.
1837 @param Width Width of rectangle in BltBuffer in pixels.
1838 @param Height Hight of rectangle in BltBuffer in pixels.
1839 @param Delta OPTIONAL.
1841 @retval EFI_SUCCESS The Blt operation completed.
1842 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1843 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1849 ConSplitterGraphicsOutputBlt (
1850 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1851 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1852 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1855 IN UINTN DestinationX
,
1856 IN UINTN DestinationY
,
1859 IN UINTN Delta OPTIONAL
1864 Return the current video mode information.
1866 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1867 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1868 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1869 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1870 @param RefreshRate The refresh rate of the monitor in Hertz.
1872 @retval EFI_SUCCESS Mode information returned.
1873 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1874 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1879 ConSplitterUgaDrawGetMode (
1880 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1881 OUT UINT32
*HorizontalResolution
,
1882 OUT UINT32
*VerticalResolution
,
1883 OUT UINT32
*ColorDepth
,
1884 OUT UINT32
*RefreshRate
1888 Set the current video mode information.
1890 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1891 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1892 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1893 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1894 @param RefreshRate The refresh rate of the monitor in Hertz.
1896 @retval EFI_SUCCESS Mode information returned.
1897 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1898 @retval EFI_OUT_OF_RESOURCES Out of resources.
1903 ConSplitterUgaDrawSetMode (
1904 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1905 IN UINT32 HorizontalResolution
,
1906 IN UINT32 VerticalResolution
,
1907 IN UINT32 ColorDepth
,
1908 IN UINT32 RefreshRate
1912 Blt a rectangle of pixels on the graphics screen.
1914 The following table defines actions for BltOperations.
1917 Write data from the BltBuffer pixel (SourceX, SourceY)
1918 directly to every pixel of the video display rectangle
1919 (DestinationX, DestinationY)
1920 (DestinationX + Width, DestinationY + Height).
1921 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1922 EfiUgaVideoToBltBuffer:
1923 Read data from the video display rectangle
1924 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1925 the BltBuffer rectangle (DestinationX, DestinationY )
1926 (DestinationX + Width, DestinationY + Height). If DestinationX or
1927 DestinationY is not zero then Delta must be set to the length in bytes
1928 of a row in the BltBuffer.
1929 EfiUgaBltBufferToVideo:
1930 Write data from the BltBuffer rectangle
1931 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1932 video display rectangle (DestinationX, DestinationY)
1933 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1934 not zero then Delta must be set to the length in bytes of a row in the
1937 Copy from the video display rectangle
1938 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1939 to the video display rectangle (DestinationX, DestinationY)
1940 (DestinationX + Width, DestinationY + Height).
1941 The BltBuffer and Delta are not used in this mode.
1943 @param This Protocol instance pointer.
1944 @param BltBuffer Buffer containing data to blit into video buffer. This
1945 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1946 @param BltOperation Operation to perform on BlitBuffer and video memory
1947 @param SourceX X coordinate of source for the BltBuffer.
1948 @param SourceY Y coordinate of source for the BltBuffer.
1949 @param DestinationX X coordinate of destination for the BltBuffer.
1950 @param DestinationY Y coordinate of destination for the BltBuffer.
1951 @param Width Width of rectangle in BltBuffer in pixels.
1952 @param Height Hight of rectangle in BltBuffer in pixels.
1953 @param Delta OPTIONAL
1955 @retval EFI_SUCCESS The Blt operation completed.
1956 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1957 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1962 ConSplitterUgaDrawBlt (
1963 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1964 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1965 IN EFI_UGA_BLT_OPERATION BltOperation
,
1968 IN UINTN DestinationX
,
1969 IN UINTN DestinationY
,
1972 IN UINTN Delta OPTIONAL
1976 Sets the output device(s) to a specified mode.
1978 @param Private Text Out Splitter pointer.
1979 @param ModeNumber The mode number to set.
1984 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1989 An empty function to pass error checking of CreateEventEx ().
1991 @param Event Event whose notification function is being invoked.
1992 @param Context Pointer to the notification function's context,
1993 which is implementation-dependent.
1998 ConSplitterEmptyCallbackFunction (