2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _CON_SPLITTER_H_
10 #define _CON_SPLITTER_H_
15 #include <Protocol/DevicePath.h>
16 #include <Protocol/ComponentName.h>
17 #include <Protocol/DriverBinding.h>
18 #include <Protocol/SimplePointer.h>
19 #include <Protocol/AbsolutePointer.h>
20 #include <Protocol/SimpleTextOut.h>
21 #include <Protocol/SimpleTextIn.h>
22 #include <Protocol/SimpleTextInEx.h>
23 #include <Protocol/GraphicsOutput.h>
24 #include <Protocol/UgaDraw.h>
26 #include <Guid/ConsoleInDevice.h>
27 #include <Guid/StandardErrorDevice.h>
28 #include <Guid/ConsoleOutDevice.h>
29 #include <Guid/ConnectConInEvent.h>
31 #include <Library/PcdLib.h>
32 #include <Library/DebugLib.h>
33 #include <Library/UefiDriverEntryPoint.h>
34 #include <Library/UefiLib.h>
35 #include <Library/BaseLib.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/MemoryAllocationLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39 #include <Library/UefiRuntimeServicesTableLib.h>
42 // Driver Binding Externs
44 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
45 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
46 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
47 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
48 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
49 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
50 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
56 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
57 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
58 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
62 // These definitions were in the old Hii protocol, but are not in the new UEFI
63 // version. So they are defined locally.
65 #define UNICODE_NARROW_CHAR 0xFFF0
66 #define UNICODE_WIDE_CHAR 0xFFF1
70 // Private Data Structures
72 #define CONSOLE_SPLITTER_ALLOC_UNIT 32
83 } TEXT_OUT_SPLITTER_QUERY_DATA
;
85 #define KEY_STATE_VALID_EXPOSED (EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED)
87 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
90 // Private data for Text In Ex Splitter Notify
92 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
94 VOID
**NotifyHandleList
;
96 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
97 LIST_ENTRY NotifyEntry
;
98 } TEXT_IN_EX_SPLITTER_NOTIFY
;
100 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
102 TEXT_IN_EX_SPLITTER_NOTIFY, \
104 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
107 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
110 // Private data for the Console In splitter
114 EFI_HANDLE VirtualHandle
;
116 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
117 UINTN CurrentNumberOfConsoles
;
118 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
119 UINTN TextInListCount
;
121 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
122 UINTN CurrentNumberOfExConsoles
;
123 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
124 UINTN TextInExListCount
;
125 LIST_ENTRY NotifyList
;
126 EFI_KEY_DATA
*KeyQueue
;
127 UINTN CurrentNumberOfKeys
;
129 // It will be initialized and synced between console input devices
130 // for toggle state sync.
132 EFI_KEY_TOGGLE_STATE PhysicalKeyToggleState
;
134 // It will be initialized and used to record if virtual KeyState
135 // has been required to be exposed.
137 BOOLEAN VirtualKeyStateExported
;
140 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
141 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
142 UINTN CurrentNumberOfPointers
;
143 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
144 UINTN PointerListCount
;
146 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
147 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
148 UINTN CurrentNumberOfAbsolutePointers
;
149 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
150 UINTN AbsolutePointerListCount
;
151 BOOLEAN AbsoluteInputEventSignalState
;
153 BOOLEAN KeyEventSignalState
;
154 BOOLEAN InputEventSignalState
;
155 EFI_EVENT ConnectConInEvent
;
156 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
158 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
160 TEXT_IN_SPLITTER_PRIVATE_DATA, \
162 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
165 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
167 TEXT_IN_SPLITTER_PRIVATE_DATA, \
169 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
171 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
173 TEXT_IN_SPLITTER_PRIVATE_DATA, \
175 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
178 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
180 TEXT_IN_SPLITTER_PRIVATE_DATA, \
182 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
186 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
189 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
190 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
191 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
192 } TEXT_OUT_AND_GOP_DATA
;
195 // Private data for the Console Out splitter
199 EFI_HANDLE VirtualHandle
;
200 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
201 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
203 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
204 UINT32 UgaHorizontalResolution
;
205 UINT32 UgaVerticalResolution
;
206 UINT32 UgaColorDepth
;
207 UINT32 UgaRefreshRate
;
209 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
210 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
211 UINTN CurrentNumberOfGraphicsOutput
;
212 UINTN CurrentNumberOfUgaDraw
;
214 UINTN CurrentNumberOfConsoles
;
215 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
216 UINTN TextOutListCount
;
217 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
218 UINTN TextOutQueryDataCount
;
219 INT32
*TextOutModeMap
;
221 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
223 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
225 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
227 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
230 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
232 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
234 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
237 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
239 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
241 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
244 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
246 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
248 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
252 // Function Prototypes
256 The user Entry Point for module ConSplitter. The user code starts with this function.
258 Installs driver module protocols and. Creates virtual device handles for ConIn,
259 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
260 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
261 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
263 @param[in] ImageHandle The firmware allocated handle for the EFI image.
264 @param[in] SystemTable A pointer to the EFI System Table.
266 @retval EFI_SUCCESS The entry point is executed successfully.
267 @retval other Some error occurs when executing this entry point.
272 ConSplitterDriverEntry (
273 IN EFI_HANDLE ImageHandle
,
274 IN EFI_SYSTEM_TABLE
*SystemTable
278 Construct console input devices' private data.
280 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
283 @retval EFI_OUT_OF_RESOURCES Out of resources.
284 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
285 @retval other Failed to construct private data.
289 ConSplitterTextInConstructor (
290 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
294 Construct console output devices' private data.
296 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
299 @retval EFI_OUT_OF_RESOURCES Out of resources.
300 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
304 ConSplitterTextOutConstructor (
305 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
310 Test to see if Console In Device could be supported on the Controller.
312 @param This Driver Binding protocol instance pointer.
313 @param ControllerHandle Handle of device to test.
314 @param RemainingDevicePath Optional parameter use to pick a specific child
317 @retval EFI_SUCCESS This driver supports this device.
318 @retval other This driver does not support this device.
323 ConSplitterConInDriverBindingSupported (
324 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
325 IN EFI_HANDLE ControllerHandle
,
326 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
330 Test to see if Simple Pointer protocol could be supported on the Controller.
332 @param This Driver Binding protocol instance pointer.
333 @param ControllerHandle Handle of device to test.
334 @param RemainingDevicePath Optional parameter use to pick a specific child
337 @retval EFI_SUCCESS This driver supports this device.
338 @retval other This driver does not support this device.
343 ConSplitterSimplePointerDriverBindingSupported (
344 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
345 IN EFI_HANDLE ControllerHandle
,
346 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
350 Test to see if Console Out Device could be supported on the Controller.
352 @param This Driver Binding protocol instance pointer.
353 @param ControllerHandle Handle of device to test.
354 @param RemainingDevicePath Optional parameter use to pick a specific child
357 @retval EFI_SUCCESS This driver supports this device.
358 @retval other This driver does not support this device.
363 ConSplitterConOutDriverBindingSupported (
364 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
365 IN EFI_HANDLE ControllerHandle
,
366 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
370 Test to see if Standard Error Device could be supported on the Controller.
372 @param This Driver Binding protocol instance pointer.
373 @param ControllerHandle Handle of device to test.
374 @param RemainingDevicePath Optional parameter use to pick a specific child
377 @retval EFI_SUCCESS This driver supports this device.
378 @retval other This driver does not support this device.
383 ConSplitterStdErrDriverBindingSupported (
384 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
385 IN EFI_HANDLE ControllerHandle
,
386 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
390 Start Console In Consplitter on device handle.
392 @param This Driver Binding protocol instance pointer.
393 @param ControllerHandle Handle of device to bind driver to.
394 @param RemainingDevicePath Optional parameter use to pick a specific child
397 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
398 @retval other Console In Consplitter does not support this device.
403 ConSplitterConInDriverBindingStart (
404 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
405 IN EFI_HANDLE ControllerHandle
,
406 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
410 Start Simple Pointer Consplitter on device handle.
412 @param This Driver Binding protocol instance pointer.
413 @param ControllerHandle Handle of device to bind driver to.
414 @param RemainingDevicePath Optional parameter use to pick a specific child
417 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
418 @retval other Simple Pointer Consplitter does not support this device.
423 ConSplitterSimplePointerDriverBindingStart (
424 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
425 IN EFI_HANDLE ControllerHandle
,
426 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
430 Start Console Out Consplitter on device handle.
432 @param This Driver Binding protocol instance pointer.
433 @param ControllerHandle Handle of device to bind driver to.
434 @param RemainingDevicePath Optional parameter use to pick a specific child
437 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
438 @retval other Console Out Consplitter does not support this device.
443 ConSplitterConOutDriverBindingStart (
444 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
445 IN EFI_HANDLE ControllerHandle
,
446 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
450 Start Standard Error Consplitter on device handle.
452 @param This Driver Binding protocol instance pointer.
453 @param ControllerHandle Handle of device to bind driver to.
454 @param RemainingDevicePath Optional parameter use to pick a specific child
457 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
458 @retval other Standard Error Consplitter does not support this device.
463 ConSplitterStdErrDriverBindingStart (
464 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
465 IN EFI_HANDLE ControllerHandle
,
466 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
470 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
472 @param This Driver Binding protocol instance pointer.
473 @param ControllerHandle Handle of device to stop driver on
474 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
475 children is zero stop the entire bus driver.
476 @param ChildHandleBuffer List of Child Handles to Stop.
478 @retval EFI_SUCCESS This driver is removed ControllerHandle
479 @retval other This driver was not removed from this device
484 ConSplitterConInDriverBindingStop (
485 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
486 IN EFI_HANDLE ControllerHandle
,
487 IN UINTN NumberOfChildren
,
488 IN EFI_HANDLE
*ChildHandleBuffer
492 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
493 Simple Pointer protocol.
495 @param This Driver Binding protocol instance pointer.
496 @param ControllerHandle Handle of device to stop driver on
497 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
498 children is zero stop the entire bus driver.
499 @param ChildHandleBuffer List of Child Handles to Stop.
501 @retval EFI_SUCCESS This driver is removed ControllerHandle
502 @retval other This driver was not removed from this device
507 ConSplitterSimplePointerDriverBindingStop (
508 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
509 IN EFI_HANDLE ControllerHandle
,
510 IN UINTN NumberOfChildren
,
511 IN EFI_HANDLE
*ChildHandleBuffer
515 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
517 @param This Driver Binding protocol instance pointer.
518 @param ControllerHandle Handle of device to stop driver on
519 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
520 children is zero stop the entire bus driver.
521 @param ChildHandleBuffer List of Child Handles to Stop.
523 @retval EFI_SUCCESS This driver is removed ControllerHandle
524 @retval other This driver was not removed from this device
529 ConSplitterConOutDriverBindingStop (
530 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
531 IN EFI_HANDLE ControllerHandle
,
532 IN UINTN NumberOfChildren
,
533 IN EFI_HANDLE
*ChildHandleBuffer
537 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
539 @param This Driver Binding protocol instance pointer.
540 @param ControllerHandle Handle of device to stop driver on
541 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
542 children is zero stop the entire bus driver.
543 @param ChildHandleBuffer List of Child Handles to Stop.
545 @retval EFI_SUCCESS This driver is removed ControllerHandle
546 @retval other This driver was not removed from this device
551 ConSplitterStdErrDriverBindingStop (
552 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
553 IN EFI_HANDLE ControllerHandle
,
554 IN UINTN NumberOfChildren
,
555 IN EFI_HANDLE
*ChildHandleBuffer
560 Test to see if Absolute Pointer protocol could be supported on the Controller.
562 @param This Driver Binding protocol instance pointer.
563 @param ControllerHandle Handle of device to test.
564 @param RemainingDevicePath Optional parameter use to pick a specific child
567 @retval EFI_SUCCESS This driver supports this device.
568 @retval other This driver does not support this device.
573 ConSplitterAbsolutePointerDriverBindingSupported (
574 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
575 IN EFI_HANDLE ControllerHandle
,
576 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
580 Start Absolute Pointer Consplitter on device handle.
582 @param This Driver Binding protocol instance pointer.
583 @param ControllerHandle Handle of device to bind driver to.
584 @param RemainingDevicePath Optional parameter use to pick a specific child
587 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
588 @retval other Absolute Pointer Consplitter does not support this device.
593 ConSplitterAbsolutePointerDriverBindingStart (
594 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
595 IN EFI_HANDLE ControllerHandle
,
596 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
600 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
601 Absolute Pointer protocol.
603 @param This Driver Binding protocol instance pointer.
604 @param ControllerHandle Handle of device to stop driver on
605 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
606 children is zero stop the entire bus driver.
607 @param ChildHandleBuffer List of Child Handles to Stop.
609 @retval EFI_SUCCESS This driver is removed ControllerHandle
610 @retval other This driver was not removed from this device
615 ConSplitterAbsolutePointerDriverBindingStop (
616 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
617 IN EFI_HANDLE ControllerHandle
,
618 IN UINTN NumberOfChildren
,
619 IN EFI_HANDLE
*ChildHandleBuffer
623 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
625 @param Private Text In Splitter pointer.
626 @param AbsolutePointer Absolute Pointer protocol pointer.
628 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
629 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
633 ConSplitterAbsolutePointerAddDevice (
634 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
635 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
639 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
641 @param Private Text In Splitter pointer.
642 @param AbsolutePointer Absolute Pointer protocol pointer.
644 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
645 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
649 ConSplitterAbsolutePointerDeleteDevice (
650 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
651 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
655 // Absolute Pointer protocol interfaces
660 Resets the pointer device hardware.
662 @param This Protocol instance pointer.
663 @param ExtendedVerification Driver may perform diagnostics on reset.
665 @retval EFI_SUCCESS The device was reset.
666 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
672 ConSplitterAbsolutePointerReset (
673 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
674 IN BOOLEAN ExtendedVerification
679 Retrieves the current state of a pointer device.
681 @param This Protocol instance pointer.
682 @param State A pointer to the state information on the
685 @retval EFI_SUCCESS The state of the pointer device was returned in
687 @retval EFI_NOT_READY The state of the pointer device has not changed
688 since the last call to GetState().
689 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
690 retrieve the pointer device's current state.
695 ConSplitterAbsolutePointerGetState (
696 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
697 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
701 This event agregates all the events of the pointer devices in the splitter.
703 If any events of physical pointer devices are signaled, signal the pointer
704 splitter event. This will cause the calling code to call
705 ConSplitterAbsolutePointerGetState ().
707 @param Event The Event assoicated with callback.
708 @param Context Context registered when Event was created.
713 ConSplitterAbsolutePointerWaitForInput (
719 Retrieves a Unicode string that is the user readable name of the driver.
721 This function retrieves the user readable name of a driver in the form of a
722 Unicode string. If the driver specified by This has a user readable name in
723 the language specified by Language, then a pointer to the driver name is
724 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
725 by This does not support the language specified by Language,
726 then EFI_UNSUPPORTED is returned.
728 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
729 EFI_COMPONENT_NAME_PROTOCOL instance.
731 @param Language[in] A pointer to a Null-terminated ASCII string
732 array indicating the language. This is the
733 language of the driver name that the caller is
734 requesting, and it must match one of the
735 languages specified in SupportedLanguages. The
736 number of languages supported by a driver is up
737 to the driver writer. Language is specified
738 in RFC 4646 or ISO 639-2 language code format.
740 @param DriverName[out] A pointer to the Unicode string to return.
741 This Unicode string is the name of the
742 driver specified by This in the language
743 specified by Language.
745 @retval EFI_SUCCESS The Unicode string for the Driver specified by
746 This and the language specified by Language was
747 returned in DriverName.
749 @retval EFI_INVALID_PARAMETER Language is NULL.
751 @retval EFI_INVALID_PARAMETER DriverName is NULL.
753 @retval EFI_UNSUPPORTED The driver specified by This does not support
754 the language specified by Language.
759 ConSplitterComponentNameGetDriverName (
760 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
762 OUT CHAR16
**DriverName
767 Retrieves a Unicode string that is the user readable name of the controller
768 that is being managed by a driver.
770 This function retrieves the user readable name of the controller specified by
771 ControllerHandle and ChildHandle in the form of a Unicode string. If the
772 driver specified by This has a user readable name in the language specified by
773 Language, then a pointer to the controller name is returned in ControllerName,
774 and EFI_SUCCESS is returned. If the driver specified by This is not currently
775 managing the controller specified by ControllerHandle and ChildHandle,
776 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
777 support the language specified by Language, then EFI_UNSUPPORTED is returned.
779 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
780 EFI_COMPONENT_NAME_PROTOCOL instance.
782 @param ControllerHandle[in] The handle of a controller that the driver
783 specified by This is managing. This handle
784 specifies the controller whose name is to be
787 @param ChildHandle[in] The handle of the child controller to retrieve
788 the name of. This is an optional parameter that
789 may be NULL. It will be NULL for device
790 drivers. It will also be NULL for a bus drivers
791 that wish to retrieve the name of the bus
792 controller. It will not be NULL for a bus
793 driver that wishes to retrieve the name of a
796 @param Language[in] A pointer to a Null-terminated ASCII string
797 array indicating the language. This is the
798 language of the driver name that the caller is
799 requesting, and it must match one of the
800 languages specified in SupportedLanguages. The
801 number of languages supported by a driver is up
802 to the driver writer. Language is specified in
803 RFC 4646 or ISO 639-2 language code format.
805 @param ControllerName[out] A pointer to the Unicode string to return.
806 This Unicode string is the name of the
807 controller specified by ControllerHandle and
808 ChildHandle in the language specified by
809 Language from the point of view of the driver
812 @retval EFI_SUCCESS The Unicode string for the user readable name in
813 the language specified by Language for the
814 driver specified by This was returned in
817 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
819 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
822 @retval EFI_INVALID_PARAMETER Language is NULL.
824 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
826 @retval EFI_UNSUPPORTED The driver specified by This is not currently
827 managing the controller specified by
828 ControllerHandle and ChildHandle.
830 @retval EFI_UNSUPPORTED The driver specified by This does not support
831 the language specified by Language.
836 ConSplitterConInComponentNameGetControllerName (
837 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
838 IN EFI_HANDLE ControllerHandle
,
839 IN EFI_HANDLE ChildHandle OPTIONAL
,
841 OUT CHAR16
**ControllerName
846 Retrieves a Unicode string that is the user readable name of the controller
847 that is being managed by a driver.
849 This function retrieves the user readable name of the controller specified by
850 ControllerHandle and ChildHandle in the form of a Unicode string. If the
851 driver specified by This has a user readable name in the language specified by
852 Language, then a pointer to the controller name is returned in ControllerName,
853 and EFI_SUCCESS is returned. If the driver specified by This is not currently
854 managing the controller specified by ControllerHandle and ChildHandle,
855 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
856 support the language specified by Language, then EFI_UNSUPPORTED is returned.
858 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
859 EFI_COMPONENT_NAME_PROTOCOL instance.
861 @param ControllerHandle[in] The handle of a controller that the driver
862 specified by This is managing. This handle
863 specifies the controller whose name is to be
866 @param ChildHandle[in] The handle of the child controller to retrieve
867 the name of. This is an optional parameter that
868 may be NULL. It will be NULL for device
869 drivers. It will also be NULL for a bus drivers
870 that wish to retrieve the name of the bus
871 controller. It will not be NULL for a bus
872 driver that wishes to retrieve the name of a
875 @param Language[in] A pointer to a Null-terminated ASCII string
876 array indicating the language. This is the
877 language of the driver name that the caller is
878 requesting, and it must match one of the
879 languages specified in SupportedLanguages. The
880 number of languages supported by a driver is up
881 to the driver writer. Language is specified in
882 RFC 4646 or ISO 639-2 language code format.
884 @param ControllerName[out] A pointer to the Unicode string to return.
885 This Unicode string is the name of the
886 controller specified by ControllerHandle and
887 ChildHandle in the language specified by
888 Language from the point of view of the driver
891 @retval EFI_SUCCESS The Unicode string for the user readable name in
892 the language specified by Language for the
893 driver specified by This was returned in
896 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
898 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
901 @retval EFI_INVALID_PARAMETER Language is NULL.
903 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
905 @retval EFI_UNSUPPORTED The driver specified by This is not currently
906 managing the controller specified by
907 ControllerHandle and ChildHandle.
909 @retval EFI_UNSUPPORTED The driver specified by This does not support
910 the language specified by Language.
915 ConSplitterSimplePointerComponentNameGetControllerName (
916 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
917 IN EFI_HANDLE ControllerHandle
,
918 IN EFI_HANDLE ChildHandle OPTIONAL
,
920 OUT CHAR16
**ControllerName
924 Retrieves a Unicode string that is the user readable name of the controller
925 that is being managed by an EFI Driver.
927 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
929 @param ControllerHandle The handle of a controller that the driver
930 specified by This is managing. This handle
931 specifies the controller whose name is to be
933 @param ChildHandle The handle of the child controller to retrieve the
934 name of. This is an optional parameter that may
935 be NULL. It will be NULL for device drivers. It
936 will also be NULL for a bus drivers that wish to
937 retrieve the name of the bus controller. It will
938 not be NULL for a bus driver that wishes to
939 retrieve the name of a child controller.
940 @param Language A pointer to RFC4646 language identifier. This is
941 the language of the controller name that that the
942 caller is requesting, and it must match one of the
943 languages specified in SupportedLanguages. The
944 number of languages supported by a driver is up to
946 @param ControllerName A pointer to the Unicode string to return. This
947 Unicode string is the name of the controller
948 specified by ControllerHandle and ChildHandle in
949 the language specified by Language from the point
950 of view of the driver specified by This.
952 @retval EFI_SUCCESS The Unicode string for the user readable name in
953 the language specified by Language for the driver
954 specified by This was returned in DriverName.
955 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
956 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
958 @retval EFI_INVALID_PARAMETER Language is NULL.
959 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
960 @retval EFI_UNSUPPORTED The driver specified by This is not currently
961 managing the controller specified by
962 ControllerHandle and ChildHandle.
963 @retval EFI_UNSUPPORTED The driver specified by This does not support the
964 language specified by Language.
969 ConSplitterAbsolutePointerComponentNameGetControllerName (
970 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
971 IN EFI_HANDLE ControllerHandle
,
972 IN EFI_HANDLE ChildHandle OPTIONAL
,
974 OUT CHAR16
**ControllerName
978 Retrieves a Unicode string that is the user readable name of the controller
979 that is being managed by a driver.
981 This function retrieves the user readable name of the controller specified by
982 ControllerHandle and ChildHandle in the form of a Unicode string. If the
983 driver specified by This has a user readable name in the language specified by
984 Language, then a pointer to the controller name is returned in ControllerName,
985 and EFI_SUCCESS is returned. If the driver specified by This is not currently
986 managing the controller specified by ControllerHandle and ChildHandle,
987 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
988 support the language specified by Language, then EFI_UNSUPPORTED is returned.
990 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
991 EFI_COMPONENT_NAME_PROTOCOL instance.
993 @param ControllerHandle[in] The handle of a controller that the driver
994 specified by This is managing. This handle
995 specifies the controller whose name is to be
998 @param ChildHandle[in] The handle of the child controller to retrieve
999 the name of. This is an optional parameter that
1000 may be NULL. It will be NULL for device
1001 drivers. It will also be NULL for a bus drivers
1002 that wish to retrieve the name of the bus
1003 controller. It will not be NULL for a bus
1004 driver that wishes to retrieve the name of a
1007 @param Language[in] A pointer to a Null-terminated ASCII string
1008 array indicating the language. This is the
1009 language of the driver name that the caller is
1010 requesting, and it must match one of the
1011 languages specified in SupportedLanguages. The
1012 number of languages supported by a driver is up
1013 to the driver writer. Language is specified in
1014 RFC 4646 or ISO 639-2 language code format.
1016 @param ControllerName[out] A pointer to the Unicode string to return.
1017 This Unicode string is the name of the
1018 controller specified by ControllerHandle and
1019 ChildHandle in the language specified by
1020 Language from the point of view of the driver
1023 @retval EFI_SUCCESS The Unicode string for the user readable name in
1024 the language specified by Language for the
1025 driver specified by This was returned in
1028 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1030 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1033 @retval EFI_INVALID_PARAMETER Language is NULL.
1035 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1037 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1038 managing the controller specified by
1039 ControllerHandle and ChildHandle.
1041 @retval EFI_UNSUPPORTED The driver specified by This does not support
1042 the language specified by Language.
1047 ConSplitterConOutComponentNameGetControllerName (
1048 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1049 IN EFI_HANDLE ControllerHandle
,
1050 IN EFI_HANDLE ChildHandle OPTIONAL
,
1052 OUT CHAR16
**ControllerName
1057 Retrieves a Unicode string that is the user readable name of the controller
1058 that is being managed by a driver.
1060 This function retrieves the user readable name of the controller specified by
1061 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1062 driver specified by This has a user readable name in the language specified by
1063 Language, then a pointer to the controller name is returned in ControllerName,
1064 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1065 managing the controller specified by ControllerHandle and ChildHandle,
1066 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1067 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1069 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1070 EFI_COMPONENT_NAME_PROTOCOL instance.
1072 @param ControllerHandle[in] The handle of a controller that the driver
1073 specified by This is managing. This handle
1074 specifies the controller whose name is to be
1077 @param ChildHandle[in] The handle of the child controller to retrieve
1078 the name of. This is an optional parameter that
1079 may be NULL. It will be NULL for device
1080 drivers. It will also be NULL for a bus drivers
1081 that wish to retrieve the name of the bus
1082 controller. It will not be NULL for a bus
1083 driver that wishes to retrieve the name of a
1086 @param Language[in] A pointer to a Null-terminated ASCII string
1087 array indicating the language. This is the
1088 language of the driver name that the caller is
1089 requesting, and it must match one of the
1090 languages specified in SupportedLanguages. The
1091 number of languages supported by a driver is up
1092 to the driver writer. Language is specified in
1093 RFC 4646 or ISO 639-2 language code format.
1095 @param ControllerName[out] A pointer to the Unicode string to return.
1096 This Unicode string is the name of the
1097 controller specified by ControllerHandle and
1098 ChildHandle in the language specified by
1099 Language from the point of view of the driver
1102 @retval EFI_SUCCESS The Unicode string for the user readable name in
1103 the language specified by Language for the
1104 driver specified by This was returned in
1107 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1109 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1112 @retval EFI_INVALID_PARAMETER Language is NULL.
1114 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1116 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1117 managing the controller specified by
1118 ControllerHandle and ChildHandle.
1120 @retval EFI_UNSUPPORTED The driver specified by This does not support
1121 the language specified by Language.
1126 ConSplitterStdErrComponentNameGetControllerName (
1127 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1128 IN EFI_HANDLE ControllerHandle
,
1129 IN EFI_HANDLE ChildHandle OPTIONAL
,
1131 OUT CHAR16
**ControllerName
1136 // TextIn Constructor/Destructor functions
1140 Add Text Input Device in Consplitter Text Input list.
1142 @param Private Text In Splitter pointer.
1143 @param TextIn Simple Text Input protocol pointer.
1145 @retval EFI_SUCCESS Text Input Device added successfully.
1146 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1150 ConSplitterTextInAddDevice (
1151 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1152 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1156 Remove Text Input Device from Consplitter Text Input list.
1158 @param Private Text In Splitter pointer.
1159 @param TextIn Simple Text protocol pointer.
1161 @retval EFI_SUCCESS Simple Text Device removed successfully.
1162 @retval EFI_NOT_FOUND No Simple Text Device found.
1166 ConSplitterTextInDeleteDevice (
1167 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1168 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1172 // SimplePointer Constuctor/Destructor functions
1176 Add Simple Pointer Device in Consplitter Simple Pointer list.
1178 @param Private Text In Splitter pointer.
1179 @param SimplePointer Simple Pointer protocol pointer.
1181 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1182 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1186 ConSplitterSimplePointerAddDevice (
1187 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1188 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1192 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1194 @param Private Text In Splitter pointer.
1195 @param SimplePointer Simple Pointer protocol pointer.
1197 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1198 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1202 ConSplitterSimplePointerDeleteDevice (
1203 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1204 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1208 // TextOut Constuctor/Destructor functions
1212 Add Text Output Device in Consplitter Text Output list.
1214 @param Private Text Out Splitter pointer.
1215 @param TextOut Simple Text Output protocol pointer.
1216 @param GraphicsOutput Graphics Output protocol pointer.
1217 @param UgaDraw UGA Draw protocol pointer.
1219 @retval EFI_SUCCESS Text Output Device added successfully.
1220 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1224 ConSplitterTextOutAddDevice (
1225 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1226 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1227 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1228 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1232 Remove Text Out Device in Consplitter Text Out list.
1234 @param Private Text Out Splitter pointer.
1235 @param TextOut Simple Text Output Pointer protocol pointer.
1237 @retval EFI_SUCCESS Text Out Device removed successfully.
1238 @retval EFI_NOT_FOUND No Text Out Device found.
1242 ConSplitterTextOutDeleteDevice (
1243 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1244 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1248 // TextIn I/O Functions
1252 Reset the input device and optionaly run diagnostics
1254 @param This Protocol instance pointer.
1255 @param ExtendedVerification Driver may perform diagnostics on reset.
1257 @retval EFI_SUCCESS The device was reset.
1258 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1264 ConSplitterTextInReset (
1265 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1266 IN BOOLEAN ExtendedVerification
1270 Reads the next keystroke from the input device. The WaitForKey Event can
1271 be used to test for existance of a keystroke via WaitForEvent () call.
1273 @param This Protocol instance pointer.
1274 @param Key Driver may perform diagnostics on reset.
1276 @retval EFI_SUCCESS The keystroke information was returned.
1277 @retval EFI_NOT_READY There was no keystroke data availiable.
1278 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1284 ConSplitterTextInReadKeyStroke (
1285 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1286 OUT EFI_INPUT_KEY
*Key
1290 Add Text Input Ex Device in Consplitter Text Input Ex list.
1292 @param Private Text In Splitter pointer.
1293 @param TextInEx Simple Text Input Ex Input protocol pointer.
1295 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1296 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1300 ConSplitterTextInExAddDevice (
1301 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1302 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1306 Remove Text Ex Device from Consplitter Text Input Ex list.
1308 @param Private Text In Splitter pointer.
1309 @param TextInEx Simple Text Ex protocol pointer.
1311 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1312 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1316 ConSplitterTextInExDeleteDevice (
1317 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1318 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1322 // Simple Text Input Ex protocol function prototypes
1326 Reset the input device and optionaly run diagnostics
1328 @param This Protocol instance pointer.
1329 @param ExtendedVerification Driver may perform diagnostics on reset.
1331 @retval EFI_SUCCESS The device was reset.
1332 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1338 ConSplitterTextInResetEx (
1339 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1340 IN BOOLEAN ExtendedVerification
1345 Reads the next keystroke from the input device. The WaitForKey Event can
1346 be used to test for existance of a keystroke via WaitForEvent () call.
1348 @param This Protocol instance pointer.
1349 @param KeyData A pointer to a buffer that is filled in with the
1350 keystroke state data for the key that was
1353 @retval EFI_SUCCESS The keystroke information was returned.
1354 @retval EFI_NOT_READY There was no keystroke data availiable.
1355 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1357 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1362 ConSplitterTextInReadKeyStrokeEx (
1363 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1364 OUT EFI_KEY_DATA
*KeyData
1369 Set certain state for the input device.
1371 @param This Protocol instance pointer.
1372 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1373 state for the input device.
1375 @retval EFI_SUCCESS The device state was set successfully.
1376 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1377 could not have the setting adjusted.
1378 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1380 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1385 ConSplitterTextInSetState (
1386 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1387 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1392 Register a notification function for a particular keystroke for the input device.
1394 @param This Protocol instance pointer.
1395 @param KeyData A pointer to a buffer that is filled in with
1396 the keystroke information for the key that was
1397 pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState
1398 and KeyData.KeyState.KeyShiftState are 0, then any incomplete
1399 keystroke will trigger a notification of the KeyNotificationFunction.
1400 @param KeyNotificationFunction Points to the function to be called when the key
1401 sequence is typed specified by KeyData. This notification function
1402 should be called at <=TPL_CALLBACK.
1403 @param NotifyHandle Points to the unique handle assigned to the
1404 registered notification.
1406 @retval EFI_SUCCESS The notification function was registered
1408 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1410 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1415 ConSplitterTextInRegisterKeyNotify (
1416 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1417 IN EFI_KEY_DATA
*KeyData
,
1418 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1419 OUT VOID
**NotifyHandle
1424 Remove a registered notification function from a particular keystroke.
1426 @param This Protocol instance pointer.
1427 @param NotificationHandle The handle of the notification function being
1430 @retval EFI_SUCCESS The notification function was unregistered
1432 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1433 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1438 ConSplitterTextInUnregisterKeyNotify (
1439 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1440 IN VOID
*NotificationHandle
1444 This event aggregates all the events of the ConIn devices in the spliter.
1446 If any events of physical ConIn devices are signaled, signal the ConIn
1447 spliter event. This will cause the calling code to call
1448 ConSplitterTextInReadKeyStroke ().
1450 @param Event The Event assoicated with callback.
1451 @param Context Context registered when Event was created.
1456 ConSplitterTextInWaitForKey (
1463 Reads the next keystroke from the input device. The WaitForKey Event can
1464 be used to test for existance of a keystroke via WaitForEvent () call.
1466 @param Private Protocol instance pointer.
1467 @param Key Driver may perform diagnostics on reset.
1469 @retval EFI_SUCCESS The keystroke information was returned.
1470 @retval EFI_NOT_READY There was no keystroke data availiable.
1471 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1477 ConSplitterTextInPrivateReadKeyStroke (
1478 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1479 OUT EFI_INPUT_KEY
*Key
1483 Reset the input device and optionaly run diagnostics
1485 @param This Protocol instance pointer.
1486 @param ExtendedVerification Driver may perform diagnostics on reset.
1488 @retval EFI_SUCCESS The device was reset.
1489 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1495 ConSplitterSimplePointerReset (
1496 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1497 IN BOOLEAN ExtendedVerification
1501 Reads the next keystroke from the input device. The WaitForKey Event can
1502 be used to test for existance of a keystroke via WaitForEvent () call.
1504 @param This A pointer to protocol instance.
1505 @param State A pointer to state information on the pointer device
1507 @retval EFI_SUCCESS The keystroke information was returned in State.
1508 @retval EFI_NOT_READY There was no keystroke data availiable.
1509 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1515 ConSplitterSimplePointerGetState (
1516 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1517 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1521 This event agregates all the events of the ConIn devices in the spliter.
1522 If any events of physical ConIn devices are signaled, signal the ConIn
1523 spliter event. This will cause the calling code to call
1524 ConSplitterTextInReadKeyStroke ().
1526 @param Event The Event assoicated with callback.
1527 @param Context Context registered when Event was created.
1532 ConSplitterSimplePointerWaitForInput (
1538 // TextOut I/O Functions
1542 Reset the text output device hardware and optionaly run diagnostics
1544 @param This Protocol instance pointer.
1545 @param ExtendedVerification Driver may perform more exhaustive verfication
1546 operation of the device during reset.
1548 @retval EFI_SUCCESS The text output device was reset.
1549 @retval EFI_DEVICE_ERROR The text output device is not functioning
1550 correctly and could not be reset.
1555 ConSplitterTextOutReset (
1556 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1557 IN BOOLEAN ExtendedVerification
1561 Write a Unicode string to the output device.
1563 @param This Protocol instance pointer.
1564 @param WString The NULL-terminated Unicode string to be
1565 displayed on the output device(s). All output
1566 devices must also support the Unicode drawing
1567 defined in this file.
1569 @retval EFI_SUCCESS The string was output to the device.
1570 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1572 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1574 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1575 characters in the Unicode string could not be
1576 rendered and were skipped.
1581 ConSplitterTextOutOutputString (
1582 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1587 Verifies that all characters in a Unicode string can be output to the
1590 @param This Protocol instance pointer.
1591 @param WString The NULL-terminated Unicode string to be
1592 examined for the output device(s).
1594 @retval EFI_SUCCESS The device(s) are capable of rendering the
1596 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1597 cannot be rendered by one or more of the output
1598 devices mapped by the EFI handle.
1603 ConSplitterTextOutTestString (
1604 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1609 Returns information for an available text mode that the output device(s)
1612 @param This Protocol instance pointer.
1613 @param ModeNumber The mode number to return information on.
1614 @param Columns Returns the columns of the text output device
1615 for the requested ModeNumber.
1616 @param Rows Returns the rows of the text output device
1617 for the requested ModeNumber.
1619 @retval EFI_SUCCESS The requested mode information was returned.
1620 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1622 @retval EFI_UNSUPPORTED The mode number was not valid.
1627 ConSplitterTextOutQueryMode (
1628 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1629 IN UINTN ModeNumber
,
1635 Sets the output device(s) to a specified mode.
1637 @param This Protocol instance pointer.
1638 @param ModeNumber The mode number to set.
1640 @retval EFI_SUCCESS The requested text mode was set.
1641 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1643 @retval EFI_UNSUPPORTED The mode number was not valid.
1648 ConSplitterTextOutSetMode (
1649 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1654 Sets the background and foreground colors for the OutputString () and
1655 ClearScreen () functions.
1657 @param This Protocol instance pointer.
1658 @param Attribute The attribute to set. Bits 0..3 are the
1659 foreground color, and bits 4..6 are the
1660 background color. All other bits are undefined
1661 and must be zero. The valid Attributes are
1662 defined in this file.
1664 @retval EFI_SUCCESS The attribute was set.
1665 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1667 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1672 ConSplitterTextOutSetAttribute (
1673 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1678 Clears the output device(s) display to the currently selected background
1681 @param This Protocol instance pointer.
1683 @retval EFI_SUCCESS The operation completed successfully.
1684 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1686 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1691 ConSplitterTextOutClearScreen (
1692 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1696 Sets the current coordinates of the cursor position
1698 @param This Protocol instance pointer.
1699 @param Column The column position to set the cursor to. Must be
1700 greater than or equal to zero and less than the
1701 number of columns by QueryMode ().
1702 @param Row The row position to set the cursor to. Must be
1703 greater than or equal to zero and less than the
1704 number of rows by QueryMode ().
1706 @retval EFI_SUCCESS The operation completed successfully.
1707 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1709 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1710 or the cursor position is invalid for the
1716 ConSplitterTextOutSetCursorPosition (
1717 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1724 Makes the cursor visible or invisible
1726 @param This Protocol instance pointer.
1727 @param Visible If TRUE, the cursor is set to be visible. If
1728 FALSE, the cursor is set to be invisible.
1730 @retval EFI_SUCCESS The operation completed successfully.
1731 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1732 the request, or the device does not support
1733 changing the cursor mode.
1734 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1739 ConSplitterTextOutEnableCursor (
1740 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1745 Take the passed in Buffer of size ElementSize and grow the buffer
1746 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1747 Copy the current data in Buffer to the new version of Buffer and
1748 free the old version of buffer.
1750 @param ElementSize Size of element in array.
1751 @param Count Current number of elements in array.
1752 @param Buffer Bigger version of passed in Buffer with all the
1755 @retval EFI_SUCCESS Buffer size has grown.
1756 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1760 ConSplitterGrowBuffer (
1761 IN UINTN ElementSize
,
1762 IN OUT UINTN
*Count
,
1763 IN OUT VOID
**Buffer
1767 Returns information for an available graphics mode that the graphics device
1768 and the set of active video output devices supports.
1770 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1771 @param ModeNumber The mode number to return information on.
1772 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1773 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1775 @retval EFI_SUCCESS Mode information returned.
1776 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1777 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1778 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1779 @retval EFI_OUT_OF_RESOURCES No resource available.
1784 ConSplitterGraphicsOutputQueryMode (
1785 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1786 IN UINT32 ModeNumber
,
1787 OUT UINTN
*SizeOfInfo
,
1788 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1792 Set the video device into the specified mode and clears the visible portions of
1793 the output display to black.
1795 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1796 @param ModeNumber Abstraction that defines the current video mode.
1798 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1799 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1800 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1801 @retval EFI_OUT_OF_RESOURCES No resource available.
1806 ConSplitterGraphicsOutputSetMode (
1807 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1808 IN UINT32 ModeNumber
1812 The following table defines actions for BltOperations.
1814 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1815 directly to every pixel of the video display rectangle
1816 (DestinationX, DestinationY)
1817 (DestinationX + Width, DestinationY + Height).
1818 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1819 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1820 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1821 the BltBuffer rectangle (DestinationX, DestinationY )
1822 (DestinationX + Width, DestinationY + Height). If DestinationX or
1823 DestinationY is not zero then Delta must be set to the length in bytes
1824 of a row in the BltBuffer.
1825 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1826 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1827 video display rectangle (DestinationX, DestinationY)
1828 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1829 not zero then Delta must be set to the length in bytes of a row in the
1831 EfiBltVideoToVideo - Copy from the video display rectangle
1832 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1833 to the video display rectangle (DestinationX, DestinationY)
1834 (DestinationX + Width, DestinationY + Height).
1835 The BltBuffer and Delta are not used in this mode.
1837 @param This Protocol instance pointer.
1838 @param BltBuffer Buffer containing data to blit into video buffer.
1839 This buffer has a size of
1840 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1841 @param BltOperation Operation to perform on BlitBuffer and video
1843 @param SourceX X coordinate of source for the BltBuffer.
1844 @param SourceY Y coordinate of source for the BltBuffer.
1845 @param DestinationX X coordinate of destination for the BltBuffer.
1846 @param DestinationY Y coordinate of destination for the BltBuffer.
1847 @param Width Width of rectangle in BltBuffer in pixels.
1848 @param Height Hight of rectangle in BltBuffer in pixels.
1849 @param Delta OPTIONAL.
1851 @retval EFI_SUCCESS The Blt operation completed.
1852 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1853 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1859 ConSplitterGraphicsOutputBlt (
1860 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1861 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1862 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1865 IN UINTN DestinationX
,
1866 IN UINTN DestinationY
,
1869 IN UINTN Delta OPTIONAL
1874 Return the current video mode information.
1876 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1877 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1878 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1879 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1880 @param RefreshRate The refresh rate of the monitor in Hertz.
1882 @retval EFI_SUCCESS Mode information returned.
1883 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1884 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1889 ConSplitterUgaDrawGetMode (
1890 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1891 OUT UINT32
*HorizontalResolution
,
1892 OUT UINT32
*VerticalResolution
,
1893 OUT UINT32
*ColorDepth
,
1894 OUT UINT32
*RefreshRate
1898 Set the current video mode information.
1900 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1901 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1902 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1903 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1904 @param RefreshRate The refresh rate of the monitor in Hertz.
1906 @retval EFI_SUCCESS Mode information returned.
1907 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1908 @retval EFI_OUT_OF_RESOURCES Out of resources.
1913 ConSplitterUgaDrawSetMode (
1914 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1915 IN UINT32 HorizontalResolution
,
1916 IN UINT32 VerticalResolution
,
1917 IN UINT32 ColorDepth
,
1918 IN UINT32 RefreshRate
1922 Blt a rectangle of pixels on the graphics screen.
1924 The following table defines actions for BltOperations.
1927 Write data from the BltBuffer pixel (SourceX, SourceY)
1928 directly to every pixel of the video display rectangle
1929 (DestinationX, DestinationY)
1930 (DestinationX + Width, DestinationY + Height).
1931 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1932 EfiUgaVideoToBltBuffer:
1933 Read data from the video display rectangle
1934 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1935 the BltBuffer rectangle (DestinationX, DestinationY )
1936 (DestinationX + Width, DestinationY + Height). If DestinationX or
1937 DestinationY is not zero then Delta must be set to the length in bytes
1938 of a row in the BltBuffer.
1939 EfiUgaBltBufferToVideo:
1940 Write data from the BltBuffer rectangle
1941 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1942 video display rectangle (DestinationX, DestinationY)
1943 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1944 not zero then Delta must be set to the length in bytes of a row in the
1947 Copy from the video display rectangle
1948 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1949 to the video display rectangle (DestinationX, DestinationY)
1950 (DestinationX + Width, DestinationY + Height).
1951 The BltBuffer and Delta are not used in this mode.
1953 @param This Protocol instance pointer.
1954 @param BltBuffer Buffer containing data to blit into video buffer. This
1955 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1956 @param BltOperation Operation to perform on BlitBuffer and video memory
1957 @param SourceX X coordinate of source for the BltBuffer.
1958 @param SourceY Y coordinate of source for the BltBuffer.
1959 @param DestinationX X coordinate of destination for the BltBuffer.
1960 @param DestinationY Y coordinate of destination for the BltBuffer.
1961 @param Width Width of rectangle in BltBuffer in pixels.
1962 @param Height Hight of rectangle in BltBuffer in pixels.
1963 @param Delta OPTIONAL
1965 @retval EFI_SUCCESS The Blt operation completed.
1966 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1967 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1972 ConSplitterUgaDrawBlt (
1973 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1974 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1975 IN EFI_UGA_BLT_OPERATION BltOperation
,
1978 IN UINTN DestinationX
,
1979 IN UINTN DestinationY
,
1982 IN UINTN Delta OPTIONAL
1986 Sets the output device(s) to a specified mode.
1988 @param Private Text Out Splitter pointer.
1989 @param ModeNumber The mode number to set.
1994 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,