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_
20 #include <Protocol/DevicePath.h>
21 #include <Protocol/ComponentName.h>
22 #include <Protocol/DriverBinding.h>
23 #include <Protocol/SimplePointer.h>
24 #include <Protocol/AbsolutePointer.h>
25 #include <Protocol/SimpleTextOut.h>
26 #include <Protocol/SimpleTextIn.h>
27 #include <Protocol/SimpleTextInEx.h>
28 #include <Protocol/GraphicsOutput.h>
29 #include <Protocol/UgaDraw.h>
31 #include <Guid/ConsoleInDevice.h>
32 #include <Guid/StandardErrorDevice.h>
33 #include <Guid/ConsoleOutDevice.h>
35 #include <Library/PcdLib.h>
36 #include <Library/DebugLib.h>
37 #include <Library/UefiDriverEntryPoint.h>
38 #include <Library/UefiLib.h>
39 #include <Library/BaseLib.h>
40 #include <Library/BaseMemoryLib.h>
41 #include <Library/MemoryAllocationLib.h>
42 #include <Library/UefiBootServicesTableLib.h>
43 #include <Library/UefiRuntimeServicesTableLib.h>
47 // Driver Binding Externs
49 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
50 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
51 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
52 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
53 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
54 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
55 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
56 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
57 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
58 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
59 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
60 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
61 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
62 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
63 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
67 // These definitions were in the old Hii protocol, but are not in the new UEFI
68 // version. So they are defined locally.
70 #define UNICODE_NARROW_CHAR 0xFFF0
71 #define UNICODE_WIDE_CHAR 0xFFF1
75 // Private Data Structures
77 #define CONSOLE_SPLITTER_ALLOC_UNIT 32
88 } TEXT_OUT_SPLITTER_QUERY_DATA
;
91 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
94 // Private data for Text In Ex Splitter Notify
96 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
98 VOID
**NotifyHandleList
;
100 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
101 LIST_ENTRY NotifyEntry
;
102 } TEXT_IN_EX_SPLITTER_NOTIFY
;
104 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
106 TEXT_IN_EX_SPLITTER_NOTIFY, \
108 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
111 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
114 // Private data for the Console In splitter
118 EFI_HANDLE VirtualHandle
;
120 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
121 UINTN CurrentNumberOfConsoles
;
122 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
123 UINTN TextInListCount
;
125 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
126 UINTN CurrentNumberOfExConsoles
;
127 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
128 UINTN TextInExListCount
;
129 LIST_ENTRY NotifyList
;
132 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
133 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
134 UINTN CurrentNumberOfPointers
;
135 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
136 UINTN PointerListCount
;
138 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
139 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
140 UINTN CurrentNumberOfAbsolutePointers
;
141 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
142 UINTN AbsolutePointerListCount
;
143 BOOLEAN AbsoluteInputEventSignalState
;
145 BOOLEAN KeyEventSignalState
;
146 BOOLEAN InputEventSignalState
;
147 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
149 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
151 TEXT_IN_SPLITTER_PRIVATE_DATA, \
153 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
156 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
158 TEXT_IN_SPLITTER_PRIVATE_DATA, \
160 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
162 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
164 TEXT_IN_SPLITTER_PRIVATE_DATA, \
166 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
169 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
171 TEXT_IN_SPLITTER_PRIVATE_DATA, \
173 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
177 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
180 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
181 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
182 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
183 } TEXT_OUT_AND_GOP_DATA
;
186 // Private data for the Console Out splitter
190 EFI_HANDLE VirtualHandle
;
191 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
192 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
194 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
195 UINT32 UgaHorizontalResolution
;
196 UINT32 UgaVerticalResolution
;
197 UINT32 UgaColorDepth
;
198 UINT32 UgaRefreshRate
;
200 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
201 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
202 UINTN CurrentNumberOfGraphicsOutput
;
203 UINTN CurrentNumberOfUgaDraw
;
205 UINTN CurrentNumberOfConsoles
;
206 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
207 UINTN TextOutListCount
;
208 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
209 UINTN TextOutQueryDataCount
;
210 INT32
*TextOutModeMap
;
212 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
214 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
216 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
218 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
221 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
223 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
225 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
228 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
230 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
232 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
235 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
237 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
239 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
243 // Function Prototypes
247 The user Entry Point for module ConSplitter. The user code starts with this function.
249 Installs driver module protocols and. Creates virtual device handles for ConIn,
250 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
251 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
252 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
254 @param[in] ImageHandle The firmware allocated handle for the EFI image.
255 @param[in] SystemTable A pointer to the EFI System Table.
257 @retval EFI_SUCCESS The entry point is executed successfully.
258 @retval other Some error occurs when executing this entry point.
263 ConSplitterDriverEntry (
264 IN EFI_HANDLE ImageHandle
,
265 IN EFI_SYSTEM_TABLE
*SystemTable
269 Construct console input devices' private data.
271 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
274 @retval EFI_OUT_OF_RESOURCES Out of resources.
275 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
276 @retval other Failed to construct private data.
280 ConSplitterTextInConstructor (
281 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
285 Construct console output devices' private data.
287 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
290 @retval EFI_OUT_OF_RESOURCES Out of resources.
291 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
295 ConSplitterTextOutConstructor (
296 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
301 Test to see if Console In Device could be supported on the Controller.
303 @param This Driver Binding protocol instance pointer.
304 @param ControllerHandle Handle of device to test.
305 @param RemainingDevicePath Optional parameter use to pick a specific child
308 @retval EFI_SUCCESS This driver supports this device.
309 @retval other This driver does not support this device.
314 ConSplitterConInDriverBindingSupported (
315 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
316 IN EFI_HANDLE ControllerHandle
,
317 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
321 Test to see if Simple Pointer protocol could be supported on the Controller.
323 @param This Driver Binding protocol instance pointer.
324 @param ControllerHandle Handle of device to test.
325 @param RemainingDevicePath Optional parameter use to pick a specific child
328 @retval EFI_SUCCESS This driver supports this device.
329 @retval other This driver does not support this device.
334 ConSplitterSimplePointerDriverBindingSupported (
335 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
336 IN EFI_HANDLE ControllerHandle
,
337 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
341 Test to see if Console Out Device could be supported on the Controller.
343 @param This Driver Binding protocol instance pointer.
344 @param ControllerHandle Handle of device to test.
345 @param RemainingDevicePath Optional parameter use to pick a specific child
348 @retval EFI_SUCCESS This driver supports this device.
349 @retval other This driver does not support this device.
354 ConSplitterConOutDriverBindingSupported (
355 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
356 IN EFI_HANDLE ControllerHandle
,
357 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
361 Test to see if Standard Error Device could be supported on the Controller.
363 @param This Driver Binding protocol instance pointer.
364 @param ControllerHandle Handle of device to test.
365 @param RemainingDevicePath Optional parameter use to pick a specific child
368 @retval EFI_SUCCESS This driver supports this device.
369 @retval other This driver does not support this device.
374 ConSplitterStdErrDriverBindingSupported (
375 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
376 IN EFI_HANDLE ControllerHandle
,
377 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
381 Start Console In Consplitter on device handle.
383 @param This Driver Binding protocol instance pointer.
384 @param ControllerHandle Handle of device to bind driver to.
385 @param RemainingDevicePath Optional parameter use to pick a specific child
388 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
389 @retval other Console In Consplitter does not support this device.
394 ConSplitterConInDriverBindingStart (
395 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
396 IN EFI_HANDLE ControllerHandle
,
397 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
401 Start Simple Pointer Consplitter on device handle.
403 @param This Driver Binding protocol instance pointer.
404 @param ControllerHandle Handle of device to bind driver to.
405 @param RemainingDevicePath Optional parameter use to pick a specific child
408 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
409 @retval other Simple Pointer Consplitter does not support this device.
414 ConSplitterSimplePointerDriverBindingStart (
415 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
416 IN EFI_HANDLE ControllerHandle
,
417 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
421 Start Console Out Consplitter on device handle.
423 @param This Driver Binding protocol instance pointer.
424 @param ControllerHandle Handle of device to bind driver to.
425 @param RemainingDevicePath Optional parameter use to pick a specific child
428 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
429 @retval other Console Out Consplitter does not support this device.
434 ConSplitterConOutDriverBindingStart (
435 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
436 IN EFI_HANDLE ControllerHandle
,
437 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
441 Start Standard Error Consplitter on device handle.
443 @param This Driver Binding protocol instance pointer.
444 @param ControllerHandle Handle of device to bind driver to.
445 @param RemainingDevicePath Optional parameter use to pick a specific child
448 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
449 @retval other Standard Error Consplitter does not support this device.
454 ConSplitterStdErrDriverBindingStart (
455 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
456 IN EFI_HANDLE ControllerHandle
,
457 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
461 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
463 @param This Driver Binding protocol instance pointer.
464 @param ControllerHandle Handle of device to stop driver on
465 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
466 children is zero stop the entire bus driver.
467 @param ChildHandleBuffer List of Child Handles to Stop.
469 @retval EFI_SUCCESS This driver is removed ControllerHandle
470 @retval other This driver was not removed from this device
475 ConSplitterConInDriverBindingStop (
476 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
477 IN EFI_HANDLE ControllerHandle
,
478 IN UINTN NumberOfChildren
,
479 IN EFI_HANDLE
*ChildHandleBuffer
483 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
484 Simple Pointer protocol.
486 @param This Driver Binding protocol instance pointer.
487 @param ControllerHandle Handle of device to stop driver on
488 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
489 children is zero stop the entire bus driver.
490 @param ChildHandleBuffer List of Child Handles to Stop.
492 @retval EFI_SUCCESS This driver is removed ControllerHandle
493 @retval other This driver was not removed from this device
498 ConSplitterSimplePointerDriverBindingStop (
499 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
500 IN EFI_HANDLE ControllerHandle
,
501 IN UINTN NumberOfChildren
,
502 IN EFI_HANDLE
*ChildHandleBuffer
506 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
508 @param This Driver Binding protocol instance pointer.
509 @param ControllerHandle Handle of device to stop driver on
510 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
511 children is zero stop the entire bus driver.
512 @param ChildHandleBuffer List of Child Handles to Stop.
514 @retval EFI_SUCCESS This driver is removed ControllerHandle
515 @retval other This driver was not removed from this device
520 ConSplitterConOutDriverBindingStop (
521 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
522 IN EFI_HANDLE ControllerHandle
,
523 IN UINTN NumberOfChildren
,
524 IN EFI_HANDLE
*ChildHandleBuffer
528 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
530 @param This Driver Binding protocol instance pointer.
531 @param ControllerHandle Handle of device to stop driver on
532 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
533 children is zero stop the entire bus driver.
534 @param ChildHandleBuffer List of Child Handles to Stop.
536 @retval EFI_SUCCESS This driver is removed ControllerHandle
537 @retval other This driver was not removed from this device
542 ConSplitterStdErrDriverBindingStop (
543 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
544 IN EFI_HANDLE ControllerHandle
,
545 IN UINTN NumberOfChildren
,
546 IN EFI_HANDLE
*ChildHandleBuffer
551 Test to see if Absolute Pointer protocol could be supported on the Controller.
553 @param This Driver Binding protocol instance pointer.
554 @param ControllerHandle Handle of device to test.
555 @param RemainingDevicePath Optional parameter use to pick a specific child
558 @retval EFI_SUCCESS This driver supports this device.
559 @retval other This driver does not support this device.
564 ConSplitterAbsolutePointerDriverBindingSupported (
565 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
566 IN EFI_HANDLE ControllerHandle
,
567 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
571 Start Absolute Pointer Consplitter on device handle.
573 @param This Driver Binding protocol instance pointer.
574 @param ControllerHandle Handle of device to bind driver to.
575 @param RemainingDevicePath Optional parameter use to pick a specific child
578 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
579 @retval other Absolute Pointer Consplitter does not support this device.
584 ConSplitterAbsolutePointerDriverBindingStart (
585 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
586 IN EFI_HANDLE ControllerHandle
,
587 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
591 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
592 Absolute Pointer protocol.
594 @param This Driver Binding protocol instance pointer.
595 @param ControllerHandle Handle of device to stop driver on
596 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
597 children is zero stop the entire bus driver.
598 @param ChildHandleBuffer List of Child Handles to Stop.
600 @retval EFI_SUCCESS This driver is removed ControllerHandle
601 @retval other This driver was not removed from this device
606 ConSplitterAbsolutePointerDriverBindingStop (
607 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
608 IN EFI_HANDLE ControllerHandle
,
609 IN UINTN NumberOfChildren
,
610 IN EFI_HANDLE
*ChildHandleBuffer
614 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
616 @param Private Text In Splitter pointer.
617 @param AbsolutePointer Absolute Pointer protocol pointer.
619 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
620 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
624 ConSplitterAbsolutePointerAddDevice (
625 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
626 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
630 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
632 @param Private Text In Splitter pointer.
633 @param AbsolutePointer Absolute Pointer protocol pointer.
635 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
636 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
640 ConSplitterAbsolutePointerDeleteDevice (
641 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
642 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
646 // Absolute Pointer protocol interfaces
651 Resets the pointer device hardware.
653 @param This Protocol instance pointer.
654 @param ExtendedVerification Driver may perform diagnostics on reset.
656 @retval EFI_SUCCESS The device was reset.
657 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
663 ConSplitterAbsolutePointerReset (
664 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
665 IN BOOLEAN ExtendedVerification
670 Retrieves the current state of a pointer device.
672 @param This Protocol instance pointer.
673 @param State A pointer to the state information on the
676 @retval EFI_SUCCESS The state of the pointer device was returned in
678 @retval EFI_NOT_READY The state of the pointer device has not changed
679 since the last call to GetState().
680 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
681 retrieve the pointer device's current state.
686 ConSplitterAbsolutePointerGetState (
687 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
688 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
692 This event agregates all the events of the pointer devices in the splitter.
694 If any events of physical pointer devices are signaled, signal the pointer
695 splitter event. This will cause the calling code to call
696 ConSplitterAbsolutePointerGetState ().
698 @param Event The Event assoicated with callback.
699 @param Context Context registered when Event was created.
704 ConSplitterAbsolutePointerWaitForInput (
710 Retrieves a Unicode string that is the user readable name of the driver.
712 This function retrieves the user readable name of a driver in the form of a
713 Unicode string. If the driver specified by This has a user readable name in
714 the language specified by Language, then a pointer to the driver name is
715 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
716 by This does not support the language specified by Language,
717 then EFI_UNSUPPORTED is returned.
719 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
720 EFI_COMPONENT_NAME_PROTOCOL instance.
722 @param Language[in] A pointer to a Null-terminated ASCII string
723 array indicating the language. This is the
724 language of the driver name that the caller is
725 requesting, and it must match one of the
726 languages specified in SupportedLanguages. The
727 number of languages supported by a driver is up
728 to the driver writer. Language is specified
729 in RFC 4646 or ISO 639-2 language code format.
731 @param DriverName[out] A pointer to the Unicode string to return.
732 This Unicode string is the name of the
733 driver specified by This in the language
734 specified by Language.
736 @retval EFI_SUCCESS The Unicode string for the Driver specified by
737 This and the language specified by Language was
738 returned in DriverName.
740 @retval EFI_INVALID_PARAMETER Language is NULL.
742 @retval EFI_INVALID_PARAMETER DriverName is NULL.
744 @retval EFI_UNSUPPORTED The driver specified by This does not support
745 the language specified by Language.
750 ConSplitterComponentNameGetDriverName (
751 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
753 OUT CHAR16
**DriverName
758 Retrieves a Unicode string that is the user readable name of the controller
759 that is being managed by a driver.
761 This function retrieves the user readable name of the controller specified by
762 ControllerHandle and ChildHandle in the form of a Unicode string. If the
763 driver specified by This has a user readable name in the language specified by
764 Language, then a pointer to the controller name is returned in ControllerName,
765 and EFI_SUCCESS is returned. If the driver specified by This is not currently
766 managing the controller specified by ControllerHandle and ChildHandle,
767 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
768 support the language specified by Language, then EFI_UNSUPPORTED is returned.
770 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
771 EFI_COMPONENT_NAME_PROTOCOL instance.
773 @param ControllerHandle[in] The handle of a controller that the driver
774 specified by This is managing. This handle
775 specifies the controller whose name is to be
778 @param ChildHandle[in] The handle of the child controller to retrieve
779 the name of. This is an optional parameter that
780 may be NULL. It will be NULL for device
781 drivers. It will also be NULL for a bus drivers
782 that wish to retrieve the name of the bus
783 controller. It will not be NULL for a bus
784 driver that wishes to retrieve the name of a
787 @param Language[in] A pointer to a Null-terminated ASCII string
788 array indicating the language. This is the
789 language of the driver name that the caller is
790 requesting, and it must match one of the
791 languages specified in SupportedLanguages. The
792 number of languages supported by a driver is up
793 to the driver writer. Language is specified in
794 RFC 4646 or ISO 639-2 language code format.
796 @param ControllerName[out] A pointer to the Unicode string to return.
797 This Unicode string is the name of the
798 controller specified by ControllerHandle and
799 ChildHandle in the language specified by
800 Language from the point of view of the driver
803 @retval EFI_SUCCESS The Unicode string for the user readable name in
804 the language specified by Language for the
805 driver specified by This was returned in
808 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
810 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
813 @retval EFI_INVALID_PARAMETER Language is NULL.
815 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
817 @retval EFI_UNSUPPORTED The driver specified by This is not currently
818 managing the controller specified by
819 ControllerHandle and ChildHandle.
821 @retval EFI_UNSUPPORTED The driver specified by This does not support
822 the language specified by Language.
827 ConSplitterConInComponentNameGetControllerName (
828 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
829 IN EFI_HANDLE ControllerHandle
,
830 IN EFI_HANDLE ChildHandle OPTIONAL
,
832 OUT CHAR16
**ControllerName
837 Retrieves a Unicode string that is the user readable name of the controller
838 that is being managed by a driver.
840 This function retrieves the user readable name of the controller specified by
841 ControllerHandle and ChildHandle in the form of a Unicode string. If the
842 driver specified by This has a user readable name in the language specified by
843 Language, then a pointer to the controller name is returned in ControllerName,
844 and EFI_SUCCESS is returned. If the driver specified by This is not currently
845 managing the controller specified by ControllerHandle and ChildHandle,
846 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
847 support the language specified by Language, then EFI_UNSUPPORTED is returned.
849 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
850 EFI_COMPONENT_NAME_PROTOCOL instance.
852 @param ControllerHandle[in] The handle of a controller that the driver
853 specified by This is managing. This handle
854 specifies the controller whose name is to be
857 @param ChildHandle[in] The handle of the child controller to retrieve
858 the name of. This is an optional parameter that
859 may be NULL. It will be NULL for device
860 drivers. It will also be NULL for a bus drivers
861 that wish to retrieve the name of the bus
862 controller. It will not be NULL for a bus
863 driver that wishes to retrieve the name of a
866 @param Language[in] A pointer to a Null-terminated ASCII string
867 array indicating the language. This is the
868 language of the driver name that the caller is
869 requesting, and it must match one of the
870 languages specified in SupportedLanguages. The
871 number of languages supported by a driver is up
872 to the driver writer. Language is specified in
873 RFC 4646 or ISO 639-2 language code format.
875 @param ControllerName[out] A pointer to the Unicode string to return.
876 This Unicode string is the name of the
877 controller specified by ControllerHandle and
878 ChildHandle in the language specified by
879 Language from the point of view of the driver
882 @retval EFI_SUCCESS The Unicode string for the user readable name in
883 the language specified by Language for the
884 driver specified by This was returned in
887 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
889 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
892 @retval EFI_INVALID_PARAMETER Language is NULL.
894 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
896 @retval EFI_UNSUPPORTED The driver specified by This is not currently
897 managing the controller specified by
898 ControllerHandle and ChildHandle.
900 @retval EFI_UNSUPPORTED The driver specified by This does not support
901 the language specified by Language.
906 ConSplitterSimplePointerComponentNameGetControllerName (
907 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
908 IN EFI_HANDLE ControllerHandle
,
909 IN EFI_HANDLE ChildHandle OPTIONAL
,
911 OUT CHAR16
**ControllerName
915 Retrieves a Unicode string that is the user readable name of the controller
916 that is being managed by an EFI Driver.
918 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
920 @param ControllerHandle The handle of a controller that the driver
921 specified by This is managing. This handle
922 specifies the controller whose name is to be
924 @param ChildHandle The handle of the child controller to retrieve the
925 name of. This is an optional parameter that may
926 be NULL. It will be NULL for device drivers. It
927 will also be NULL for a bus drivers that wish to
928 retrieve the name of the bus controller. It will
929 not be NULL for a bus driver that wishes to
930 retrieve the name of a child controller.
931 @param Language A pointer to RFC4646 language identifier. This is
932 the language of the controller name that that the
933 caller is requesting, and it must match one of the
934 languages specified in SupportedLanguages. The
935 number of languages supported by a driver is up to
937 @param ControllerName A pointer to the Unicode string to return. This
938 Unicode string is the name of the controller
939 specified by ControllerHandle and ChildHandle in
940 the language specified by Language from the point
941 of view of the driver specified by This.
943 @retval EFI_SUCCESS The Unicode string for the user readable name in
944 the language specified by Language for the driver
945 specified by This was returned in DriverName.
946 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
947 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
949 @retval EFI_INVALID_PARAMETER Language is NULL.
950 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
951 @retval EFI_UNSUPPORTED The driver specified by This is not currently
952 managing the controller specified by
953 ControllerHandle and ChildHandle.
954 @retval EFI_UNSUPPORTED The driver specified by This does not support the
955 language specified by Language.
960 ConSplitterAbsolutePointerComponentNameGetControllerName (
961 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
962 IN EFI_HANDLE ControllerHandle
,
963 IN EFI_HANDLE ChildHandle OPTIONAL
,
965 OUT CHAR16
**ControllerName
969 Retrieves a Unicode string that is the user readable name of the controller
970 that is being managed by a driver.
972 This function retrieves the user readable name of the controller specified by
973 ControllerHandle and ChildHandle in the form of a Unicode string. If the
974 driver specified by This has a user readable name in the language specified by
975 Language, then a pointer to the controller name is returned in ControllerName,
976 and EFI_SUCCESS is returned. If the driver specified by This is not currently
977 managing the controller specified by ControllerHandle and ChildHandle,
978 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
979 support the language specified by Language, then EFI_UNSUPPORTED is returned.
981 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
982 EFI_COMPONENT_NAME_PROTOCOL instance.
984 @param ControllerHandle[in] The handle of a controller that the driver
985 specified by This is managing. This handle
986 specifies the controller whose name is to be
989 @param ChildHandle[in] The handle of the child controller to retrieve
990 the name of. This is an optional parameter that
991 may be NULL. It will be NULL for device
992 drivers. It will also be NULL for a bus drivers
993 that wish to retrieve the name of the bus
994 controller. It will not be NULL for a bus
995 driver that wishes to retrieve the name of a
998 @param Language[in] A pointer to a Null-terminated ASCII string
999 array indicating the language. This is the
1000 language of the driver name that the caller is
1001 requesting, and it must match one of the
1002 languages specified in SupportedLanguages. The
1003 number of languages supported by a driver is up
1004 to the driver writer. Language is specified in
1005 RFC 4646 or ISO 639-2 language code format.
1007 @param ControllerName[out] A pointer to the Unicode string to return.
1008 This Unicode string is the name of the
1009 controller specified by ControllerHandle and
1010 ChildHandle in the language specified by
1011 Language from the point of view of the driver
1014 @retval EFI_SUCCESS The Unicode string for the user readable name in
1015 the language specified by Language for the
1016 driver specified by This was returned in
1019 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1021 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1024 @retval EFI_INVALID_PARAMETER Language is NULL.
1026 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1028 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1029 managing the controller specified by
1030 ControllerHandle and ChildHandle.
1032 @retval EFI_UNSUPPORTED The driver specified by This does not support
1033 the language specified by Language.
1038 ConSplitterConOutComponentNameGetControllerName (
1039 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1040 IN EFI_HANDLE ControllerHandle
,
1041 IN EFI_HANDLE ChildHandle OPTIONAL
,
1043 OUT CHAR16
**ControllerName
1048 Retrieves a Unicode string that is the user readable name of the controller
1049 that is being managed by a driver.
1051 This function retrieves the user readable name of the controller specified by
1052 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1053 driver specified by This has a user readable name in the language specified by
1054 Language, then a pointer to the controller name is returned in ControllerName,
1055 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1056 managing the controller specified by ControllerHandle and ChildHandle,
1057 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1058 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1060 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1061 EFI_COMPONENT_NAME_PROTOCOL instance.
1063 @param ControllerHandle[in] The handle of a controller that the driver
1064 specified by This is managing. This handle
1065 specifies the controller whose name is to be
1068 @param ChildHandle[in] The handle of the child controller to retrieve
1069 the name of. This is an optional parameter that
1070 may be NULL. It will be NULL for device
1071 drivers. It will also be NULL for a bus drivers
1072 that wish to retrieve the name of the bus
1073 controller. It will not be NULL for a bus
1074 driver that wishes to retrieve the name of a
1077 @param Language[in] A pointer to a Null-terminated ASCII string
1078 array indicating the language. This is the
1079 language of the driver name that the caller is
1080 requesting, and it must match one of the
1081 languages specified in SupportedLanguages. The
1082 number of languages supported by a driver is up
1083 to the driver writer. Language is specified in
1084 RFC 4646 or ISO 639-2 language code format.
1086 @param ControllerName[out] A pointer to the Unicode string to return.
1087 This Unicode string is the name of the
1088 controller specified by ControllerHandle and
1089 ChildHandle in the language specified by
1090 Language from the point of view of the driver
1093 @retval EFI_SUCCESS The Unicode string for the user readable name in
1094 the language specified by Language for the
1095 driver specified by This was returned in
1098 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1100 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1103 @retval EFI_INVALID_PARAMETER Language is NULL.
1105 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1107 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1108 managing the controller specified by
1109 ControllerHandle and ChildHandle.
1111 @retval EFI_UNSUPPORTED The driver specified by This does not support
1112 the language specified by Language.
1117 ConSplitterStdErrComponentNameGetControllerName (
1118 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1119 IN EFI_HANDLE ControllerHandle
,
1120 IN EFI_HANDLE ChildHandle OPTIONAL
,
1122 OUT CHAR16
**ControllerName
1127 // TextIn Constructor/Destructor functions
1131 Add Text Input Device in Consplitter Text Input list.
1133 @param Private Text In Splitter pointer.
1134 @param TextIn Simple Text Input protocol pointer.
1136 @retval EFI_SUCCESS Text Input Device added successfully.
1137 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1141 ConSplitterTextInAddDevice (
1142 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1143 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1147 Remove Text Input Device from Consplitter Text Input list.
1149 @param Private Text In Splitter pointer.
1150 @param TextIn Simple Text protocol pointer.
1152 @retval EFI_SUCCESS Simple Text Device removed successfully.
1153 @retval EFI_NOT_FOUND No Simple Text Device found.
1157 ConSplitterTextInDeleteDevice (
1158 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1159 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1163 // SimplePointer Constuctor/Destructor functions
1167 Add Simple Pointer Device in Consplitter Simple Pointer list.
1169 @param Private Text In Splitter pointer.
1170 @param SimplePointer Simple Pointer protocol pointer.
1172 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1173 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1177 ConSplitterSimplePointerAddDevice (
1178 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1179 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1183 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1185 @param Private Text In Splitter pointer.
1186 @param SimplePointer Simple Pointer protocol pointer.
1188 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1189 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1193 ConSplitterSimplePointerDeleteDevice (
1194 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1195 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1199 // TextOut Constuctor/Destructor functions
1203 Add Text Output Device in Consplitter Text Output list.
1205 @param Private Text Out Splitter pointer.
1206 @param TextOut Simple Text Output protocol pointer.
1207 @param GraphicsOutput Graphics Output protocol pointer.
1208 @param UgaDraw UGA Draw protocol pointer.
1210 @retval EFI_SUCCESS Text Output Device added successfully.
1211 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1215 ConSplitterTextOutAddDevice (
1216 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1217 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1218 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1219 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1223 Remove Text Out Device in Consplitter Text Out list.
1225 @param Private Text Out Splitter pointer.
1226 @param TextOut Simple Text Output Pointer protocol pointer.
1228 @retval EFI_SUCCESS Text Out Device removed successfully.
1229 @retval EFI_NOT_FOUND No Text Out Device found.
1233 ConSplitterTextOutDeleteDevice (
1234 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1235 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1239 // TextIn I/O Functions
1243 Reset the input device and optionaly run diagnostics
1245 @param This Protocol instance pointer.
1246 @param ExtendedVerification Driver may perform diagnostics on reset.
1248 @retval EFI_SUCCESS The device was reset.
1249 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1255 ConSplitterTextInReset (
1256 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1257 IN BOOLEAN ExtendedVerification
1261 Reads the next keystroke from the input device. The WaitForKey Event can
1262 be used to test for existance of a keystroke via WaitForEvent () call.
1264 @param This Protocol instance pointer.
1265 @param Key Driver may perform diagnostics on reset.
1267 @retval EFI_SUCCESS The keystroke information was returned.
1268 @retval EFI_NOT_READY There was no keystroke data availiable.
1269 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1275 ConSplitterTextInReadKeyStroke (
1276 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1277 OUT EFI_INPUT_KEY
*Key
1281 Add Text Input Ex Device in Consplitter Text Input Ex list.
1283 @param Private Text In Splitter pointer.
1284 @param TextInEx Simple Text Input Ex Input protocol pointer.
1286 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1287 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1291 ConSplitterTextInExAddDevice (
1292 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1293 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1297 Remove Text Ex Device from Consplitter Text Input Ex list.
1299 @param Private Text In Splitter pointer.
1300 @param TextInEx Simple Text Ex protocol pointer.
1302 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1303 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1307 ConSplitterTextInExDeleteDevice (
1308 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1309 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1313 // Simple Text Input Ex protocol function prototypes
1317 Reset the input device and optionaly run diagnostics
1319 @param This Protocol instance pointer.
1320 @param ExtendedVerification Driver may perform diagnostics on reset.
1322 @retval EFI_SUCCESS The device was reset.
1323 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1329 ConSplitterTextInResetEx (
1330 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1331 IN BOOLEAN ExtendedVerification
1336 Reads the next keystroke from the input device. The WaitForKey Event can
1337 be used to test for existance of a keystroke via WaitForEvent () call.
1339 @param This Protocol instance pointer.
1340 @param KeyData A pointer to a buffer that is filled in with the
1341 keystroke state data for the key that was
1344 @retval EFI_SUCCESS The keystroke information was returned.
1345 @retval EFI_NOT_READY There was no keystroke data availiable.
1346 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1348 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1353 ConSplitterTextInReadKeyStrokeEx (
1354 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1355 OUT EFI_KEY_DATA
*KeyData
1360 Set certain state for the input device.
1362 @param This Protocol instance pointer.
1363 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1364 state for the input device.
1366 @retval EFI_SUCCESS The device state was set successfully.
1367 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1368 could not have the setting adjusted.
1369 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1371 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1376 ConSplitterTextInSetState (
1377 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1378 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1383 Register a notification function for a particular keystroke for the input device.
1385 @param This Protocol instance pointer.
1386 @param KeyData A pointer to a buffer that is filled in with the
1387 keystroke information data for the key that was
1389 @param KeyNotificationFunction Points to the function to be called when the key
1390 sequence is typed specified by KeyData.
1391 @param NotifyHandle Points to the unique handle assigned to the
1392 registered notification.
1394 @retval EFI_SUCCESS The notification function was registered
1396 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1398 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1403 ConSplitterTextInRegisterKeyNotify (
1404 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1405 IN EFI_KEY_DATA
*KeyData
,
1406 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1407 OUT VOID
**NotifyHandle
1412 Remove a registered notification function from a particular keystroke.
1414 @param This Protocol instance pointer.
1415 @param NotificationHandle The handle of the notification function being
1418 @retval EFI_SUCCESS The notification function was unregistered
1420 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1421 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1426 ConSplitterTextInUnregisterKeyNotify (
1427 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1428 IN VOID
*NotificationHandle
1432 This event aggregates all the events of the ConIn devices in the spliter.
1434 If any events of physical ConIn devices are signaled, signal the ConIn
1435 spliter event. This will cause the calling code to call
1436 ConSplitterTextInReadKeyStroke ().
1438 @param Event The Event assoicated with callback.
1439 @param Context Context registered when Event was created.
1444 ConSplitterTextInWaitForKey (
1451 Reads the next keystroke from the input device. The WaitForKey Event can
1452 be used to test for existance of a keystroke via WaitForEvent () call.
1454 @param Private Protocol instance pointer.
1455 @param Key Driver may perform diagnostics on reset.
1457 @retval EFI_SUCCESS The keystroke information was returned.
1458 @retval EFI_NOT_READY There was no keystroke data availiable.
1459 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1465 ConSplitterTextInPrivateReadKeyStroke (
1466 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1467 OUT EFI_INPUT_KEY
*Key
1471 Reset the input device and optionaly run diagnostics
1473 @param This Protocol instance pointer.
1474 @param ExtendedVerification Driver may perform diagnostics on reset.
1476 @retval EFI_SUCCESS The device was reset.
1477 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1483 ConSplitterSimplePointerReset (
1484 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1485 IN BOOLEAN ExtendedVerification
1489 Reads the next keystroke from the input device. The WaitForKey Event can
1490 be used to test for existance of a keystroke via WaitForEvent () call.
1492 @param This A pointer to protocol instance.
1493 @param State A pointer to state information on the pointer device
1495 @retval EFI_SUCCESS The keystroke information was returned in State.
1496 @retval EFI_NOT_READY There was no keystroke data availiable.
1497 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1503 ConSplitterSimplePointerGetState (
1504 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1505 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1509 This event agregates all the events of the ConIn devices in the spliter.
1510 If any events of physical ConIn devices are signaled, signal the ConIn
1511 spliter event. This will cause the calling code to call
1512 ConSplitterTextInReadKeyStroke ().
1514 @param Event The Event assoicated with callback.
1515 @param Context Context registered when Event was created.
1520 ConSplitterSimplePointerWaitForInput (
1526 // TextOut I/O Functions
1530 Reset the text output device hardware and optionaly run diagnostics
1532 @param This Protocol instance pointer.
1533 @param ExtendedVerification Driver may perform more exhaustive verfication
1534 operation of the device during reset.
1536 @retval EFI_SUCCESS The text output device was reset.
1537 @retval EFI_DEVICE_ERROR The text output device is not functioning
1538 correctly and could not be reset.
1543 ConSplitterTextOutReset (
1544 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1545 IN BOOLEAN ExtendedVerification
1549 Write a Unicode string to the output device.
1551 @param This Protocol instance pointer.
1552 @param WString The NULL-terminated Unicode string to be
1553 displayed on the output device(s). All output
1554 devices must also support the Unicode drawing
1555 defined in this file.
1557 @retval EFI_SUCCESS The string was output to the device.
1558 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1560 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1562 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1563 characters in the Unicode string could not be
1564 rendered and were skipped.
1569 ConSplitterTextOutOutputString (
1570 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1575 Verifies that all characters in a Unicode string can be output to the
1578 @param This Protocol instance pointer.
1579 @param WString The NULL-terminated Unicode string to be
1580 examined for the output device(s).
1582 @retval EFI_SUCCESS The device(s) are capable of rendering the
1584 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1585 cannot be rendered by one or more of the output
1586 devices mapped by the EFI handle.
1591 ConSplitterTextOutTestString (
1592 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1597 Returns information for an available text mode that the output device(s)
1600 @param This Protocol instance pointer.
1601 @param ModeNumber The mode number to return information on.
1602 @param Columns Returns the columns of the text output device
1603 for the requested ModeNumber.
1604 @param Rows Returns the rows of the text output device
1605 for the requested ModeNumber.
1607 @retval EFI_SUCCESS The requested mode information was returned.
1608 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1610 @retval EFI_UNSUPPORTED The mode number was not valid.
1615 ConSplitterTextOutQueryMode (
1616 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1617 IN UINTN ModeNumber
,
1623 Sets the output device(s) to a specified mode.
1625 @param This Protocol instance pointer.
1626 @param ModeNumber The mode number to set.
1628 @retval EFI_SUCCESS The requested text mode was set.
1629 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1631 @retval EFI_UNSUPPORTED The mode number was not valid.
1636 ConSplitterTextOutSetMode (
1637 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1642 Sets the background and foreground colors for the OutputString () and
1643 ClearScreen () functions.
1645 @param This Protocol instance pointer.
1646 @param Attribute The attribute to set. Bits 0..3 are the
1647 foreground color, and bits 4..6 are the
1648 background color. All other bits are undefined
1649 and must be zero. The valid Attributes are
1650 defined in this file.
1652 @retval EFI_SUCCESS The attribute was set.
1653 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1655 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1660 ConSplitterTextOutSetAttribute (
1661 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1666 Clears the output device(s) display to the currently selected background
1669 @param This Protocol instance pointer.
1671 @retval EFI_SUCCESS The operation completed successfully.
1672 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1674 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1679 ConSplitterTextOutClearScreen (
1680 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1684 Sets the current coordinates of the cursor position
1686 @param This Protocol instance pointer.
1687 @param Column The column position to set the cursor to. Must be
1688 greater than or equal to zero and less than the
1689 number of columns by QueryMode ().
1690 @param Row The row position to set the cursor to. Must be
1691 greater than or equal to zero and less than the
1692 number of rows by QueryMode ().
1694 @retval EFI_SUCCESS The operation completed successfully.
1695 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1697 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1698 or the cursor position is invalid for the
1704 ConSplitterTextOutSetCursorPosition (
1705 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1712 Makes the cursor visible or invisible
1714 @param This Protocol instance pointer.
1715 @param Visible If TRUE, the cursor is set to be visible. If
1716 FALSE, the cursor is set to be invisible.
1718 @retval EFI_SUCCESS The operation completed successfully.
1719 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1720 the request, or the device does not support
1721 changing the cursor mode.
1722 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1727 ConSplitterTextOutEnableCursor (
1728 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1733 Take the passed in Buffer of size ElementSize and grow the buffer
1734 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1735 Copy the current data in Buffer to the new version of Buffer and
1736 free the old version of buffer.
1738 @param ElementSize Size of element in array.
1739 @param Count Current number of elements in array.
1740 @param Buffer Bigger version of passed in Buffer with all the
1743 @retval EFI_SUCCESS Buffer size has grown.
1744 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1748 ConSplitterGrowBuffer (
1749 IN UINTN ElementSize
,
1750 IN OUT UINTN
*Count
,
1751 IN OUT VOID
**Buffer
1755 Returns information for an available graphics mode that the graphics device
1756 and the set of active video output devices supports.
1758 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1759 @param ModeNumber The mode number to return information on.
1760 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1761 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1763 @retval EFI_SUCCESS Mode information returned.
1764 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1765 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1766 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1767 @retval EFI_OUT_OF_RESOURCES No resource available.
1772 ConSplitterGraphicsOutputQueryMode (
1773 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1774 IN UINT32 ModeNumber
,
1775 OUT UINTN
*SizeOfInfo
,
1776 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1780 Set the video device into the specified mode and clears the visible portions of
1781 the output display to black.
1783 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1784 @param ModeNumber Abstraction that defines the current video mode.
1786 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1787 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1788 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1789 @retval EFI_OUT_OF_RESOURCES No resource available.
1794 ConSplitterGraphicsOutputSetMode (
1795 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1796 IN UINT32 ModeNumber
1800 The following table defines actions for BltOperations.
1802 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1803 directly to every pixel of the video display rectangle
1804 (DestinationX, DestinationY)
1805 (DestinationX + Width, DestinationY + Height).
1806 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1807 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1808 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1809 the BltBuffer rectangle (DestinationX, DestinationY )
1810 (DestinationX + Width, DestinationY + Height). If DestinationX or
1811 DestinationY is not zero then Delta must be set to the length in bytes
1812 of a row in the BltBuffer.
1813 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1814 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1815 video display rectangle (DestinationX, DestinationY)
1816 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1817 not zero then Delta must be set to the length in bytes of a row in the
1819 EfiBltVideoToVideo - Copy from the video display rectangle
1820 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1821 to the video display rectangle (DestinationX, DestinationY)
1822 (DestinationX + Width, DestinationY + Height).
1823 The BltBuffer and Delta are not used in this mode.
1825 @param This Protocol instance pointer.
1826 @param BltBuffer Buffer containing data to blit into video buffer.
1827 This buffer has a size of
1828 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1829 @param BltOperation Operation to perform on BlitBuffer and video
1831 @param SourceX X coordinate of source for the BltBuffer.
1832 @param SourceY Y coordinate of source for the BltBuffer.
1833 @param DestinationX X coordinate of destination for the BltBuffer.
1834 @param DestinationY Y coordinate of destination for the BltBuffer.
1835 @param Width Width of rectangle in BltBuffer in pixels.
1836 @param Height Hight of rectangle in BltBuffer in pixels.
1837 @param Delta OPTIONAL.
1839 @retval EFI_SUCCESS The Blt operation completed.
1840 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1841 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1847 ConSplitterGraphicsOutputBlt (
1848 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1849 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1850 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1853 IN UINTN DestinationX
,
1854 IN UINTN DestinationY
,
1857 IN UINTN Delta OPTIONAL
1862 Return the current video mode information.
1864 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1865 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1866 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1867 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1868 @param RefreshRate The refresh rate of the monitor in Hertz.
1870 @retval EFI_SUCCESS Mode information returned.
1871 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1872 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1877 ConSplitterUgaDrawGetMode (
1878 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1879 OUT UINT32
*HorizontalResolution
,
1880 OUT UINT32
*VerticalResolution
,
1881 OUT UINT32
*ColorDepth
,
1882 OUT UINT32
*RefreshRate
1886 Set the current video mode information.
1888 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1889 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1890 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1891 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1892 @param RefreshRate The refresh rate of the monitor in Hertz.
1894 @retval EFI_SUCCESS Mode information returned.
1895 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1896 @retval EFI_OUT_OF_RESOURCES Out of resources.
1901 ConSplitterUgaDrawSetMode (
1902 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1903 IN UINT32 HorizontalResolution
,
1904 IN UINT32 VerticalResolution
,
1905 IN UINT32 ColorDepth
,
1906 IN UINT32 RefreshRate
1910 Blt a rectangle of pixels on the graphics screen.
1912 The following table defines actions for BltOperations.
1915 Write data from the BltBuffer pixel (SourceX, SourceY)
1916 directly to every pixel of the video display rectangle
1917 (DestinationX, DestinationY)
1918 (DestinationX + Width, DestinationY + Height).
1919 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1920 EfiUgaVideoToBltBuffer:
1921 Read data from the video display rectangle
1922 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1923 the BltBuffer rectangle (DestinationX, DestinationY )
1924 (DestinationX + Width, DestinationY + Height). If DestinationX or
1925 DestinationY is not zero then Delta must be set to the length in bytes
1926 of a row in the BltBuffer.
1927 EfiUgaBltBufferToVideo:
1928 Write data from the BltBuffer rectangle
1929 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1930 video display rectangle (DestinationX, DestinationY)
1931 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1932 not zero then Delta must be set to the length in bytes of a row in the
1935 Copy from the video display rectangle
1936 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1937 to the video display rectangle (DestinationX, DestinationY)
1938 (DestinationX + Width, DestinationY + Height).
1939 The BltBuffer and Delta are not used in this mode.
1941 @param This Protocol instance pointer.
1942 @param BltBuffer Buffer containing data to blit into video buffer. This
1943 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1944 @param BltOperation Operation to perform on BlitBuffer and video memory
1945 @param SourceX X coordinate of source for the BltBuffer.
1946 @param SourceY Y coordinate of source for the BltBuffer.
1947 @param DestinationX X coordinate of destination for the BltBuffer.
1948 @param DestinationY Y coordinate of destination for the BltBuffer.
1949 @param Width Width of rectangle in BltBuffer in pixels.
1950 @param Height Hight of rectangle in BltBuffer in pixels.
1951 @param Delta OPTIONAL
1953 @retval EFI_SUCCESS The Blt operation completed.
1954 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1955 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1960 ConSplitterUgaDrawBlt (
1961 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1962 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1963 IN EFI_UGA_BLT_OPERATION BltOperation
,
1966 IN UINTN DestinationX
,
1967 IN UINTN DestinationY
,
1970 IN UINTN Delta OPTIONAL
1974 Sets the output device(s) to a specified mode.
1976 @param Private Text Out Splitter pointer.
1977 @param ModeNumber The mode number to set.
1982 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,