2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2019, 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 BOOLEAN AddingConOutDevice
;
223 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
225 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
227 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
229 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
232 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
234 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
236 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
239 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
241 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
243 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
246 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
248 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
250 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
254 // Function Prototypes
258 The user Entry Point for module ConSplitter. The user code starts with this function.
260 Installs driver module protocols and. Creates virtual device handles for ConIn,
261 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
262 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
263 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
265 @param[in] ImageHandle The firmware allocated handle for the EFI image.
266 @param[in] SystemTable A pointer to the EFI System Table.
268 @retval EFI_SUCCESS The entry point is executed successfully.
269 @retval other Some error occurs when executing this entry point.
274 ConSplitterDriverEntry (
275 IN EFI_HANDLE ImageHandle
,
276 IN EFI_SYSTEM_TABLE
*SystemTable
280 Construct console input devices' private data.
282 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
285 @retval EFI_OUT_OF_RESOURCES Out of resources.
286 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
287 @retval other Failed to construct private data.
291 ConSplitterTextInConstructor (
292 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
296 Construct console output devices' private data.
298 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
301 @retval EFI_OUT_OF_RESOURCES Out of resources.
302 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
306 ConSplitterTextOutConstructor (
307 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
312 Test to see if Console In Device could be supported on the Controller.
314 @param This Driver Binding protocol instance pointer.
315 @param ControllerHandle Handle of device to test.
316 @param RemainingDevicePath Optional parameter use to pick a specific child
319 @retval EFI_SUCCESS This driver supports this device.
320 @retval other This driver does not support this device.
325 ConSplitterConInDriverBindingSupported (
326 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
327 IN EFI_HANDLE ControllerHandle
,
328 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
332 Test to see if Simple Pointer protocol could be supported on the Controller.
334 @param This Driver Binding protocol instance pointer.
335 @param ControllerHandle Handle of device to test.
336 @param RemainingDevicePath Optional parameter use to pick a specific child
339 @retval EFI_SUCCESS This driver supports this device.
340 @retval other This driver does not support this device.
345 ConSplitterSimplePointerDriverBindingSupported (
346 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
347 IN EFI_HANDLE ControllerHandle
,
348 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
352 Test to see if Console Out Device could be supported on the Controller.
354 @param This Driver Binding protocol instance pointer.
355 @param ControllerHandle Handle of device to test.
356 @param RemainingDevicePath Optional parameter use to pick a specific child
359 @retval EFI_SUCCESS This driver supports this device.
360 @retval other This driver does not support this device.
365 ConSplitterConOutDriverBindingSupported (
366 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
367 IN EFI_HANDLE ControllerHandle
,
368 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
372 Test to see if Standard Error Device could be supported on the Controller.
374 @param This Driver Binding protocol instance pointer.
375 @param ControllerHandle Handle of device to test.
376 @param RemainingDevicePath Optional parameter use to pick a specific child
379 @retval EFI_SUCCESS This driver supports this device.
380 @retval other This driver does not support this device.
385 ConSplitterStdErrDriverBindingSupported (
386 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
387 IN EFI_HANDLE ControllerHandle
,
388 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
392 Start Console In Consplitter on device handle.
394 @param This Driver Binding protocol instance pointer.
395 @param ControllerHandle Handle of device to bind driver to.
396 @param RemainingDevicePath Optional parameter use to pick a specific child
399 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
400 @retval other Console In Consplitter does not support this device.
405 ConSplitterConInDriverBindingStart (
406 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
407 IN EFI_HANDLE ControllerHandle
,
408 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
412 Start Simple Pointer Consplitter on device handle.
414 @param This Driver Binding protocol instance pointer.
415 @param ControllerHandle Handle of device to bind driver to.
416 @param RemainingDevicePath Optional parameter use to pick a specific child
419 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
420 @retval other Simple Pointer Consplitter does not support this device.
425 ConSplitterSimplePointerDriverBindingStart (
426 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
427 IN EFI_HANDLE ControllerHandle
,
428 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
432 Start Console Out Consplitter on device handle.
434 @param This Driver Binding protocol instance pointer.
435 @param ControllerHandle Handle of device to bind driver to.
436 @param RemainingDevicePath Optional parameter use to pick a specific child
439 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
440 @retval other Console Out Consplitter does not support this device.
445 ConSplitterConOutDriverBindingStart (
446 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
447 IN EFI_HANDLE ControllerHandle
,
448 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
452 Start Standard Error Consplitter on device handle.
454 @param This Driver Binding protocol instance pointer.
455 @param ControllerHandle Handle of device to bind driver to.
456 @param RemainingDevicePath Optional parameter use to pick a specific child
459 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
460 @retval other Standard Error Consplitter does not support this device.
465 ConSplitterStdErrDriverBindingStart (
466 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
467 IN EFI_HANDLE ControllerHandle
,
468 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
472 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
474 @param This Driver Binding protocol instance pointer.
475 @param ControllerHandle Handle of device to stop driver on
476 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
477 children is zero stop the entire bus driver.
478 @param ChildHandleBuffer List of Child Handles to Stop.
480 @retval EFI_SUCCESS This driver is removed ControllerHandle
481 @retval other This driver was not removed from this device
486 ConSplitterConInDriverBindingStop (
487 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
488 IN EFI_HANDLE ControllerHandle
,
489 IN UINTN NumberOfChildren
,
490 IN EFI_HANDLE
*ChildHandleBuffer
494 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
495 Simple Pointer protocol.
497 @param This Driver Binding protocol instance pointer.
498 @param ControllerHandle Handle of device to stop driver on
499 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
500 children is zero stop the entire bus driver.
501 @param ChildHandleBuffer List of Child Handles to Stop.
503 @retval EFI_SUCCESS This driver is removed ControllerHandle
504 @retval other This driver was not removed from this device
509 ConSplitterSimplePointerDriverBindingStop (
510 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
511 IN EFI_HANDLE ControllerHandle
,
512 IN UINTN NumberOfChildren
,
513 IN EFI_HANDLE
*ChildHandleBuffer
517 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
519 @param This Driver Binding protocol instance pointer.
520 @param ControllerHandle Handle of device to stop driver on
521 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
522 children is zero stop the entire bus driver.
523 @param ChildHandleBuffer List of Child Handles to Stop.
525 @retval EFI_SUCCESS This driver is removed ControllerHandle
526 @retval other This driver was not removed from this device
531 ConSplitterConOutDriverBindingStop (
532 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
533 IN EFI_HANDLE ControllerHandle
,
534 IN UINTN NumberOfChildren
,
535 IN EFI_HANDLE
*ChildHandleBuffer
539 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
541 @param This Driver Binding protocol instance pointer.
542 @param ControllerHandle Handle of device to stop driver on
543 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
544 children is zero stop the entire bus driver.
545 @param ChildHandleBuffer List of Child Handles to Stop.
547 @retval EFI_SUCCESS This driver is removed ControllerHandle
548 @retval other This driver was not removed from this device
553 ConSplitterStdErrDriverBindingStop (
554 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
555 IN EFI_HANDLE ControllerHandle
,
556 IN UINTN NumberOfChildren
,
557 IN EFI_HANDLE
*ChildHandleBuffer
562 Test to see if Absolute Pointer protocol could be supported on the Controller.
564 @param This Driver Binding protocol instance pointer.
565 @param ControllerHandle Handle of device to test.
566 @param RemainingDevicePath Optional parameter use to pick a specific child
569 @retval EFI_SUCCESS This driver supports this device.
570 @retval other This driver does not support this device.
575 ConSplitterAbsolutePointerDriverBindingSupported (
576 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
577 IN EFI_HANDLE ControllerHandle
,
578 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
582 Start Absolute Pointer Consplitter on device handle.
584 @param This Driver Binding protocol instance pointer.
585 @param ControllerHandle Handle of device to bind driver to.
586 @param RemainingDevicePath Optional parameter use to pick a specific child
589 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
590 @retval other Absolute Pointer Consplitter does not support this device.
595 ConSplitterAbsolutePointerDriverBindingStart (
596 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
597 IN EFI_HANDLE ControllerHandle
,
598 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
602 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
603 Absolute Pointer protocol.
605 @param This Driver Binding protocol instance pointer.
606 @param ControllerHandle Handle of device to stop driver on
607 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
608 children is zero stop the entire bus driver.
609 @param ChildHandleBuffer List of Child Handles to Stop.
611 @retval EFI_SUCCESS This driver is removed ControllerHandle
612 @retval other This driver was not removed from this device
617 ConSplitterAbsolutePointerDriverBindingStop (
618 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
619 IN EFI_HANDLE ControllerHandle
,
620 IN UINTN NumberOfChildren
,
621 IN EFI_HANDLE
*ChildHandleBuffer
625 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
627 @param Private Text In Splitter pointer.
628 @param AbsolutePointer Absolute Pointer protocol pointer.
630 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
631 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
635 ConSplitterAbsolutePointerAddDevice (
636 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
637 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
641 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
643 @param Private Text In Splitter pointer.
644 @param AbsolutePointer Absolute Pointer protocol pointer.
646 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
647 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
651 ConSplitterAbsolutePointerDeleteDevice (
652 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
653 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
657 // Absolute Pointer protocol interfaces
662 Resets the pointer device hardware.
664 @param This Protocol instance pointer.
665 @param ExtendedVerification Driver may perform diagnostics on reset.
667 @retval EFI_SUCCESS The device was reset.
668 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
674 ConSplitterAbsolutePointerReset (
675 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
676 IN BOOLEAN ExtendedVerification
681 Retrieves the current state of a pointer device.
683 @param This Protocol instance pointer.
684 @param State A pointer to the state information on the
687 @retval EFI_SUCCESS The state of the pointer device was returned in
689 @retval EFI_NOT_READY The state of the pointer device has not changed
690 since the last call to GetState().
691 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
692 retrieve the pointer device's current state.
697 ConSplitterAbsolutePointerGetState (
698 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
699 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
703 This event agregates all the events of the pointer devices in the splitter.
705 If any events of physical pointer devices are signaled, signal the pointer
706 splitter event. This will cause the calling code to call
707 ConSplitterAbsolutePointerGetState ().
709 @param Event The Event assoicated with callback.
710 @param Context Context registered when Event was created.
715 ConSplitterAbsolutePointerWaitForInput (
721 Retrieves a Unicode string that is the user readable name of the driver.
723 This function retrieves the user readable name of a driver in the form of a
724 Unicode string. If the driver specified by This has a user readable name in
725 the language specified by Language, then a pointer to the driver name is
726 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
727 by This does not support the language specified by Language,
728 then EFI_UNSUPPORTED is returned.
730 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
731 EFI_COMPONENT_NAME_PROTOCOL instance.
733 @param Language[in] A pointer to a Null-terminated ASCII string
734 array indicating the language. This is the
735 language of the driver name that the caller is
736 requesting, and it must match one of the
737 languages specified in SupportedLanguages. The
738 number of languages supported by a driver is up
739 to the driver writer. Language is specified
740 in RFC 4646 or ISO 639-2 language code format.
742 @param DriverName[out] A pointer to the Unicode string to return.
743 This Unicode string is the name of the
744 driver specified by This in the language
745 specified by Language.
747 @retval EFI_SUCCESS The Unicode string for the Driver specified by
748 This and the language specified by Language was
749 returned in DriverName.
751 @retval EFI_INVALID_PARAMETER Language is NULL.
753 @retval EFI_INVALID_PARAMETER DriverName is NULL.
755 @retval EFI_UNSUPPORTED The driver specified by This does not support
756 the language specified by Language.
761 ConSplitterComponentNameGetDriverName (
762 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
764 OUT CHAR16
**DriverName
769 Retrieves a Unicode string that is the user readable name of the controller
770 that is being managed by a driver.
772 This function retrieves the user readable name of the controller specified by
773 ControllerHandle and ChildHandle in the form of a Unicode string. If the
774 driver specified by This has a user readable name in the language specified by
775 Language, then a pointer to the controller name is returned in ControllerName,
776 and EFI_SUCCESS is returned. If the driver specified by This is not currently
777 managing the controller specified by ControllerHandle and ChildHandle,
778 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
779 support the language specified by Language, then EFI_UNSUPPORTED is returned.
781 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
782 EFI_COMPONENT_NAME_PROTOCOL instance.
784 @param ControllerHandle[in] The handle of a controller that the driver
785 specified by This is managing. This handle
786 specifies the controller whose name is to be
789 @param ChildHandle[in] The handle of the child controller to retrieve
790 the name of. This is an optional parameter that
791 may be NULL. It will be NULL for device
792 drivers. It will also be NULL for a bus drivers
793 that wish to retrieve the name of the bus
794 controller. It will not be NULL for a bus
795 driver that wishes to retrieve the name of a
798 @param Language[in] A pointer to a Null-terminated ASCII string
799 array indicating the language. This is the
800 language of the driver name that the caller is
801 requesting, and it must match one of the
802 languages specified in SupportedLanguages. The
803 number of languages supported by a driver is up
804 to the driver writer. Language is specified in
805 RFC 4646 or ISO 639-2 language code format.
807 @param ControllerName[out] A pointer to the Unicode string to return.
808 This Unicode string is the name of the
809 controller specified by ControllerHandle and
810 ChildHandle in the language specified by
811 Language from the point of view of the driver
814 @retval EFI_SUCCESS The Unicode string for the user readable name in
815 the language specified by Language for the
816 driver specified by This was returned in
819 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
821 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
824 @retval EFI_INVALID_PARAMETER Language is NULL.
826 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
828 @retval EFI_UNSUPPORTED The driver specified by This is not currently
829 managing the controller specified by
830 ControllerHandle and ChildHandle.
832 @retval EFI_UNSUPPORTED The driver specified by This does not support
833 the language specified by Language.
838 ConSplitterConInComponentNameGetControllerName (
839 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
840 IN EFI_HANDLE ControllerHandle
,
841 IN EFI_HANDLE ChildHandle OPTIONAL
,
843 OUT CHAR16
**ControllerName
848 Retrieves a Unicode string that is the user readable name of the controller
849 that is being managed by a driver.
851 This function retrieves the user readable name of the controller specified by
852 ControllerHandle and ChildHandle in the form of a Unicode string. If the
853 driver specified by This has a user readable name in the language specified by
854 Language, then a pointer to the controller name is returned in ControllerName,
855 and EFI_SUCCESS is returned. If the driver specified by This is not currently
856 managing the controller specified by ControllerHandle and ChildHandle,
857 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
858 support the language specified by Language, then EFI_UNSUPPORTED is returned.
860 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
861 EFI_COMPONENT_NAME_PROTOCOL instance.
863 @param ControllerHandle[in] The handle of a controller that the driver
864 specified by This is managing. This handle
865 specifies the controller whose name is to be
868 @param ChildHandle[in] The handle of the child controller to retrieve
869 the name of. This is an optional parameter that
870 may be NULL. It will be NULL for device
871 drivers. It will also be NULL for a bus drivers
872 that wish to retrieve the name of the bus
873 controller. It will not be NULL for a bus
874 driver that wishes to retrieve the name of a
877 @param Language[in] A pointer to a Null-terminated ASCII string
878 array indicating the language. This is the
879 language of the driver name that the caller is
880 requesting, and it must match one of the
881 languages specified in SupportedLanguages. The
882 number of languages supported by a driver is up
883 to the driver writer. Language is specified in
884 RFC 4646 or ISO 639-2 language code format.
886 @param ControllerName[out] A pointer to the Unicode string to return.
887 This Unicode string is the name of the
888 controller specified by ControllerHandle and
889 ChildHandle in the language specified by
890 Language from the point of view of the driver
893 @retval EFI_SUCCESS The Unicode string for the user readable name in
894 the language specified by Language for the
895 driver specified by This was returned in
898 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
900 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
903 @retval EFI_INVALID_PARAMETER Language is NULL.
905 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
907 @retval EFI_UNSUPPORTED The driver specified by This is not currently
908 managing the controller specified by
909 ControllerHandle and ChildHandle.
911 @retval EFI_UNSUPPORTED The driver specified by This does not support
912 the language specified by Language.
917 ConSplitterSimplePointerComponentNameGetControllerName (
918 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
919 IN EFI_HANDLE ControllerHandle
,
920 IN EFI_HANDLE ChildHandle OPTIONAL
,
922 OUT CHAR16
**ControllerName
926 Retrieves a Unicode string that is the user readable name of the controller
927 that is being managed by an EFI Driver.
929 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
931 @param ControllerHandle The handle of a controller that the driver
932 specified by This is managing. This handle
933 specifies the controller whose name is to be
935 @param ChildHandle The handle of the child controller to retrieve the
936 name of. This is an optional parameter that may
937 be NULL. It will be NULL for device drivers. It
938 will also be NULL for a bus drivers that wish to
939 retrieve the name of the bus controller. It will
940 not be NULL for a bus driver that wishes to
941 retrieve the name of a child controller.
942 @param Language A pointer to RFC4646 language identifier. This is
943 the language of the controller name that that the
944 caller is requesting, and it must match one of the
945 languages specified in SupportedLanguages. The
946 number of languages supported by a driver is up to
948 @param ControllerName A pointer to the Unicode string to return. This
949 Unicode string is the name of the controller
950 specified by ControllerHandle and ChildHandle in
951 the language specified by Language from the point
952 of view of the driver specified by This.
954 @retval EFI_SUCCESS The Unicode string for the user readable name in
955 the language specified by Language for the driver
956 specified by This was returned in DriverName.
957 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
958 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
960 @retval EFI_INVALID_PARAMETER Language is NULL.
961 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
962 @retval EFI_UNSUPPORTED The driver specified by This is not currently
963 managing the controller specified by
964 ControllerHandle and ChildHandle.
965 @retval EFI_UNSUPPORTED The driver specified by This does not support the
966 language specified by Language.
971 ConSplitterAbsolutePointerComponentNameGetControllerName (
972 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
973 IN EFI_HANDLE ControllerHandle
,
974 IN EFI_HANDLE ChildHandle OPTIONAL
,
976 OUT CHAR16
**ControllerName
980 Retrieves a Unicode string that is the user readable name of the controller
981 that is being managed by a driver.
983 This function retrieves the user readable name of the controller specified by
984 ControllerHandle and ChildHandle in the form of a Unicode string. If the
985 driver specified by This has a user readable name in the language specified by
986 Language, then a pointer to the controller name is returned in ControllerName,
987 and EFI_SUCCESS is returned. If the driver specified by This is not currently
988 managing the controller specified by ControllerHandle and ChildHandle,
989 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
990 support the language specified by Language, then EFI_UNSUPPORTED is returned.
992 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
993 EFI_COMPONENT_NAME_PROTOCOL instance.
995 @param ControllerHandle[in] The handle of a controller that the driver
996 specified by This is managing. This handle
997 specifies the controller whose name is to be
1000 @param ChildHandle[in] The handle of the child controller to retrieve
1001 the name of. This is an optional parameter that
1002 may be NULL. It will be NULL for device
1003 drivers. It will also be NULL for a bus drivers
1004 that wish to retrieve the name of the bus
1005 controller. It will not be NULL for a bus
1006 driver that wishes to retrieve the name of a
1009 @param Language[in] A pointer to a Null-terminated ASCII string
1010 array indicating the language. This is the
1011 language of the driver name that the caller is
1012 requesting, and it must match one of the
1013 languages specified in SupportedLanguages. The
1014 number of languages supported by a driver is up
1015 to the driver writer. Language is specified in
1016 RFC 4646 or ISO 639-2 language code format.
1018 @param ControllerName[out] A pointer to the Unicode string to return.
1019 This Unicode string is the name of the
1020 controller specified by ControllerHandle and
1021 ChildHandle in the language specified by
1022 Language from the point of view of the driver
1025 @retval EFI_SUCCESS The Unicode string for the user readable name in
1026 the language specified by Language for the
1027 driver specified by This was returned in
1030 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1032 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1035 @retval EFI_INVALID_PARAMETER Language is NULL.
1037 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1039 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1040 managing the controller specified by
1041 ControllerHandle and ChildHandle.
1043 @retval EFI_UNSUPPORTED The driver specified by This does not support
1044 the language specified by Language.
1049 ConSplitterConOutComponentNameGetControllerName (
1050 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1051 IN EFI_HANDLE ControllerHandle
,
1052 IN EFI_HANDLE ChildHandle OPTIONAL
,
1054 OUT CHAR16
**ControllerName
1059 Retrieves a Unicode string that is the user readable name of the controller
1060 that is being managed by a driver.
1062 This function retrieves the user readable name of the controller specified by
1063 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1064 driver specified by This has a user readable name in the language specified by
1065 Language, then a pointer to the controller name is returned in ControllerName,
1066 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1067 managing the controller specified by ControllerHandle and ChildHandle,
1068 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1069 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1071 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1072 EFI_COMPONENT_NAME_PROTOCOL instance.
1074 @param ControllerHandle[in] The handle of a controller that the driver
1075 specified by This is managing. This handle
1076 specifies the controller whose name is to be
1079 @param ChildHandle[in] The handle of the child controller to retrieve
1080 the name of. This is an optional parameter that
1081 may be NULL. It will be NULL for device
1082 drivers. It will also be NULL for a bus drivers
1083 that wish to retrieve the name of the bus
1084 controller. It will not be NULL for a bus
1085 driver that wishes to retrieve the name of a
1088 @param Language[in] A pointer to a Null-terminated ASCII string
1089 array indicating the language. This is the
1090 language of the driver name that the caller is
1091 requesting, and it must match one of the
1092 languages specified in SupportedLanguages. The
1093 number of languages supported by a driver is up
1094 to the driver writer. Language is specified in
1095 RFC 4646 or ISO 639-2 language code format.
1097 @param ControllerName[out] A pointer to the Unicode string to return.
1098 This Unicode string is the name of the
1099 controller specified by ControllerHandle and
1100 ChildHandle in the language specified by
1101 Language from the point of view of the driver
1104 @retval EFI_SUCCESS The Unicode string for the user readable name in
1105 the language specified by Language for the
1106 driver specified by This was returned in
1109 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1111 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1114 @retval EFI_INVALID_PARAMETER Language is NULL.
1116 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1118 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1119 managing the controller specified by
1120 ControllerHandle and ChildHandle.
1122 @retval EFI_UNSUPPORTED The driver specified by This does not support
1123 the language specified by Language.
1128 ConSplitterStdErrComponentNameGetControllerName (
1129 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1130 IN EFI_HANDLE ControllerHandle
,
1131 IN EFI_HANDLE ChildHandle OPTIONAL
,
1133 OUT CHAR16
**ControllerName
1138 // TextIn Constructor/Destructor functions
1142 Add Text Input Device in Consplitter Text Input list.
1144 @param Private Text In Splitter pointer.
1145 @param TextIn Simple Text Input protocol pointer.
1147 @retval EFI_SUCCESS Text Input Device added successfully.
1148 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1152 ConSplitterTextInAddDevice (
1153 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1154 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1158 Remove Text Input Device from Consplitter Text Input list.
1160 @param Private Text In Splitter pointer.
1161 @param TextIn Simple Text protocol pointer.
1163 @retval EFI_SUCCESS Simple Text Device removed successfully.
1164 @retval EFI_NOT_FOUND No Simple Text Device found.
1168 ConSplitterTextInDeleteDevice (
1169 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1170 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1174 // SimplePointer Constuctor/Destructor functions
1178 Add Simple Pointer Device in Consplitter Simple Pointer list.
1180 @param Private Text In Splitter pointer.
1181 @param SimplePointer Simple Pointer protocol pointer.
1183 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1184 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1188 ConSplitterSimplePointerAddDevice (
1189 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1190 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1194 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1196 @param Private Text In Splitter pointer.
1197 @param SimplePointer Simple Pointer protocol pointer.
1199 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1200 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1204 ConSplitterSimplePointerDeleteDevice (
1205 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1206 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1210 // TextOut Constuctor/Destructor functions
1214 Add Text Output Device in Consplitter Text Output list.
1216 @param Private Text Out Splitter pointer.
1217 @param TextOut Simple Text Output protocol pointer.
1218 @param GraphicsOutput Graphics Output protocol pointer.
1219 @param UgaDraw UGA Draw protocol pointer.
1221 @retval EFI_SUCCESS Text Output Device added successfully.
1222 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1226 ConSplitterTextOutAddDevice (
1227 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1228 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1229 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1230 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1234 Remove Text Out Device in Consplitter Text Out list.
1236 @param Private Text Out Splitter pointer.
1237 @param TextOut Simple Text Output Pointer protocol pointer.
1239 @retval EFI_SUCCESS Text Out Device removed successfully.
1240 @retval EFI_NOT_FOUND No Text Out Device found.
1244 ConSplitterTextOutDeleteDevice (
1245 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1246 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1250 // TextIn I/O Functions
1254 Reset the input device and optionaly run diagnostics
1256 @param This Protocol instance pointer.
1257 @param ExtendedVerification Driver may perform diagnostics on reset.
1259 @retval EFI_SUCCESS The device was reset.
1260 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1266 ConSplitterTextInReset (
1267 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1268 IN BOOLEAN ExtendedVerification
1272 Reads the next keystroke from the input device. The WaitForKey Event can
1273 be used to test for existance of a keystroke via WaitForEvent () call.
1275 @param This Protocol instance pointer.
1276 @param Key Driver may perform diagnostics on reset.
1278 @retval EFI_SUCCESS The keystroke information was returned.
1279 @retval EFI_NOT_READY There was no keystroke data availiable.
1280 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1286 ConSplitterTextInReadKeyStroke (
1287 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1288 OUT EFI_INPUT_KEY
*Key
1292 Add Text Input Ex Device in Consplitter Text Input Ex list.
1294 @param Private Text In Splitter pointer.
1295 @param TextInEx Simple Text Input Ex Input protocol pointer.
1297 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1298 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1302 ConSplitterTextInExAddDevice (
1303 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1304 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1308 Remove Text Ex Device from Consplitter Text Input Ex list.
1310 @param Private Text In Splitter pointer.
1311 @param TextInEx Simple Text Ex protocol pointer.
1313 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1314 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1318 ConSplitterTextInExDeleteDevice (
1319 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1320 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1324 // Simple Text Input Ex protocol function prototypes
1328 Reset the input device and optionaly run diagnostics
1330 @param This Protocol instance pointer.
1331 @param ExtendedVerification Driver may perform diagnostics on reset.
1333 @retval EFI_SUCCESS The device was reset.
1334 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1340 ConSplitterTextInResetEx (
1341 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1342 IN BOOLEAN ExtendedVerification
1347 Reads the next keystroke from the input device. The WaitForKey Event can
1348 be used to test for existance of a keystroke via WaitForEvent () call.
1350 @param This Protocol instance pointer.
1351 @param KeyData A pointer to a buffer that is filled in with the
1352 keystroke state data for the key that was
1355 @retval EFI_SUCCESS The keystroke information was returned.
1356 @retval EFI_NOT_READY There was no keystroke data availiable.
1357 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1359 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1364 ConSplitterTextInReadKeyStrokeEx (
1365 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1366 OUT EFI_KEY_DATA
*KeyData
1371 Set certain state for the input device.
1373 @param This Protocol instance pointer.
1374 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1375 state for the input device.
1377 @retval EFI_SUCCESS The device state was set successfully.
1378 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1379 could not have the setting adjusted.
1380 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1382 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1387 ConSplitterTextInSetState (
1388 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1389 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1394 Register a notification function for a particular keystroke for the input device.
1396 @param This Protocol instance pointer.
1397 @param KeyData A pointer to a buffer that is filled in with
1398 the keystroke information for the key that was
1399 pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState
1400 and KeyData.KeyState.KeyShiftState are 0, then any incomplete
1401 keystroke will trigger a notification of the KeyNotificationFunction.
1402 @param KeyNotificationFunction Points to the function to be called when the key
1403 sequence is typed specified by KeyData. This notification function
1404 should be called at <=TPL_CALLBACK.
1405 @param NotifyHandle Points to the unique handle assigned to the
1406 registered notification.
1408 @retval EFI_SUCCESS The notification function was registered
1410 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1412 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1417 ConSplitterTextInRegisterKeyNotify (
1418 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1419 IN EFI_KEY_DATA
*KeyData
,
1420 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1421 OUT VOID
**NotifyHandle
1426 Remove a registered notification function from a particular keystroke.
1428 @param This Protocol instance pointer.
1429 @param NotificationHandle The handle of the notification function being
1432 @retval EFI_SUCCESS The notification function was unregistered
1434 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1435 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1440 ConSplitterTextInUnregisterKeyNotify (
1441 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1442 IN VOID
*NotificationHandle
1446 This event aggregates all the events of the ConIn devices in the spliter.
1448 If any events of physical ConIn devices are signaled, signal the ConIn
1449 spliter event. This will cause the calling code to call
1450 ConSplitterTextInReadKeyStroke ().
1452 @param Event The Event assoicated with callback.
1453 @param Context Context registered when Event was created.
1458 ConSplitterTextInWaitForKey (
1465 Reads the next keystroke from the input device. The WaitForKey Event can
1466 be used to test for existance of a keystroke via WaitForEvent () call.
1468 @param Private Protocol instance pointer.
1469 @param Key Driver may perform diagnostics on reset.
1471 @retval EFI_SUCCESS The keystroke information was returned.
1472 @retval EFI_NOT_READY There was no keystroke data availiable.
1473 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1479 ConSplitterTextInPrivateReadKeyStroke (
1480 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1481 OUT EFI_INPUT_KEY
*Key
1485 Reset the input device and optionaly run diagnostics
1487 @param This Protocol instance pointer.
1488 @param ExtendedVerification Driver may perform diagnostics on reset.
1490 @retval EFI_SUCCESS The device was reset.
1491 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1497 ConSplitterSimplePointerReset (
1498 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1499 IN BOOLEAN ExtendedVerification
1503 Reads the next keystroke from the input device. The WaitForKey Event can
1504 be used to test for existance of a keystroke via WaitForEvent () call.
1506 @param This A pointer to protocol instance.
1507 @param State A pointer to state information on the pointer device
1509 @retval EFI_SUCCESS The keystroke information was returned in State.
1510 @retval EFI_NOT_READY There was no keystroke data availiable.
1511 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1517 ConSplitterSimplePointerGetState (
1518 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1519 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1523 This event agregates all the events of the ConIn devices in the spliter.
1524 If any events of physical ConIn devices are signaled, signal the ConIn
1525 spliter event. This will cause the calling code to call
1526 ConSplitterTextInReadKeyStroke ().
1528 @param Event The Event assoicated with callback.
1529 @param Context Context registered when Event was created.
1534 ConSplitterSimplePointerWaitForInput (
1540 // TextOut I/O Functions
1544 Reset the text output device hardware and optionaly run diagnostics
1546 @param This Protocol instance pointer.
1547 @param ExtendedVerification Driver may perform more exhaustive verfication
1548 operation of the device during reset.
1550 @retval EFI_SUCCESS The text output device was reset.
1551 @retval EFI_DEVICE_ERROR The text output device is not functioning
1552 correctly and could not be reset.
1557 ConSplitterTextOutReset (
1558 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1559 IN BOOLEAN ExtendedVerification
1563 Write a Unicode string to the output device.
1565 @param This Protocol instance pointer.
1566 @param WString The NULL-terminated Unicode string to be
1567 displayed on the output device(s). All output
1568 devices must also support the Unicode drawing
1569 defined in this file.
1571 @retval EFI_SUCCESS The string was output to the device.
1572 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1574 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1576 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1577 characters in the Unicode string could not be
1578 rendered and were skipped.
1583 ConSplitterTextOutOutputString (
1584 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1589 Verifies that all characters in a Unicode string can be output to the
1592 @param This Protocol instance pointer.
1593 @param WString The NULL-terminated Unicode string to be
1594 examined for the output device(s).
1596 @retval EFI_SUCCESS The device(s) are capable of rendering the
1598 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1599 cannot be rendered by one or more of the output
1600 devices mapped by the EFI handle.
1605 ConSplitterTextOutTestString (
1606 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1611 Returns information for an available text mode that the output device(s)
1614 @param This Protocol instance pointer.
1615 @param ModeNumber The mode number to return information on.
1616 @param Columns Returns the columns of the text output device
1617 for the requested ModeNumber.
1618 @param Rows Returns the rows of the text output device
1619 for the requested ModeNumber.
1621 @retval EFI_SUCCESS The requested mode information was returned.
1622 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1624 @retval EFI_UNSUPPORTED The mode number was not valid.
1629 ConSplitterTextOutQueryMode (
1630 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1631 IN UINTN ModeNumber
,
1637 Sets the output device(s) to a specified mode.
1639 @param This Protocol instance pointer.
1640 @param ModeNumber The mode number to set.
1642 @retval EFI_SUCCESS The requested text mode was set.
1643 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1645 @retval EFI_UNSUPPORTED The mode number was not valid.
1650 ConSplitterTextOutSetMode (
1651 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1656 Sets the background and foreground colors for the OutputString () and
1657 ClearScreen () functions.
1659 @param This Protocol instance pointer.
1660 @param Attribute The attribute to set. Bits 0..3 are the
1661 foreground color, and bits 4..6 are the
1662 background color. All other bits are undefined
1663 and must be zero. The valid Attributes are
1664 defined in this file.
1666 @retval EFI_SUCCESS The attribute was set.
1667 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1669 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1674 ConSplitterTextOutSetAttribute (
1675 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1680 Clears the output device(s) display to the currently selected background
1683 @param This Protocol instance pointer.
1685 @retval EFI_SUCCESS The operation completed successfully.
1686 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1688 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1693 ConSplitterTextOutClearScreen (
1694 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1698 Sets the current coordinates of the cursor position
1700 @param This Protocol instance pointer.
1701 @param Column The column position to set the cursor to. Must be
1702 greater than or equal to zero and less than the
1703 number of columns by QueryMode ().
1704 @param Row The row position to set the cursor to. Must be
1705 greater than or equal to zero and less than the
1706 number of rows by QueryMode ().
1708 @retval EFI_SUCCESS The operation completed successfully.
1709 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1711 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1712 or the cursor position is invalid for the
1718 ConSplitterTextOutSetCursorPosition (
1719 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1726 Makes the cursor visible or invisible
1728 @param This Protocol instance pointer.
1729 @param Visible If TRUE, the cursor is set to be visible. If
1730 FALSE, the cursor is set to be invisible.
1732 @retval EFI_SUCCESS The operation completed successfully.
1733 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1734 the request, or the device does not support
1735 changing the cursor mode.
1736 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1741 ConSplitterTextOutEnableCursor (
1742 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1747 Take the passed in Buffer of size ElementSize and grow the buffer
1748 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1749 Copy the current data in Buffer to the new version of Buffer and
1750 free the old version of buffer.
1752 @param ElementSize Size of element in array.
1753 @param Count Current number of elements in array.
1754 @param Buffer Bigger version of passed in Buffer with all the
1757 @retval EFI_SUCCESS Buffer size has grown.
1758 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1762 ConSplitterGrowBuffer (
1763 IN UINTN ElementSize
,
1764 IN OUT UINTN
*Count
,
1765 IN OUT VOID
**Buffer
1769 Returns information for an available graphics mode that the graphics device
1770 and the set of active video output devices supports.
1772 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1773 @param ModeNumber The mode number to return information on.
1774 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1775 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1777 @retval EFI_SUCCESS Mode information returned.
1778 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1779 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1780 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1781 @retval EFI_OUT_OF_RESOURCES No resource available.
1786 ConSplitterGraphicsOutputQueryMode (
1787 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1788 IN UINT32 ModeNumber
,
1789 OUT UINTN
*SizeOfInfo
,
1790 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1794 Set the video device into the specified mode and clears the visible portions of
1795 the output display to black.
1797 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1798 @param ModeNumber Abstraction that defines the current video mode.
1800 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1801 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1802 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1803 @retval EFI_OUT_OF_RESOURCES No resource available.
1808 ConSplitterGraphicsOutputSetMode (
1809 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1810 IN UINT32 ModeNumber
1814 The following table defines actions for BltOperations.
1816 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1817 directly to every pixel of the video display rectangle
1818 (DestinationX, DestinationY)
1819 (DestinationX + Width, DestinationY + Height).
1820 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1821 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1822 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1823 the BltBuffer rectangle (DestinationX, DestinationY )
1824 (DestinationX + Width, DestinationY + Height). If DestinationX or
1825 DestinationY is not zero then Delta must be set to the length in bytes
1826 of a row in the BltBuffer.
1827 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1828 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1829 video display rectangle (DestinationX, DestinationY)
1830 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1831 not zero then Delta must be set to the length in bytes of a row in the
1833 EfiBltVideoToVideo - Copy from the video display rectangle
1834 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1835 to the video display rectangle (DestinationX, DestinationY)
1836 (DestinationX + Width, DestinationY + Height).
1837 The BltBuffer and Delta are not used in this mode.
1839 @param This Protocol instance pointer.
1840 @param BltBuffer Buffer containing data to blit into video buffer.
1841 This buffer has a size of
1842 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1843 @param BltOperation Operation to perform on BlitBuffer and video
1845 @param SourceX X coordinate of source for the BltBuffer.
1846 @param SourceY Y coordinate of source for the BltBuffer.
1847 @param DestinationX X coordinate of destination for the BltBuffer.
1848 @param DestinationY Y coordinate of destination for the BltBuffer.
1849 @param Width Width of rectangle in BltBuffer in pixels.
1850 @param Height Hight of rectangle in BltBuffer in pixels.
1851 @param Delta OPTIONAL.
1853 @retval EFI_SUCCESS The Blt operation completed.
1854 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1855 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1861 ConSplitterGraphicsOutputBlt (
1862 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1863 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1864 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1867 IN UINTN DestinationX
,
1868 IN UINTN DestinationY
,
1871 IN UINTN Delta OPTIONAL
1876 Return the current video mode information.
1878 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1879 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1880 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1881 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1882 @param RefreshRate The refresh rate of the monitor in Hertz.
1884 @retval EFI_SUCCESS Mode information returned.
1885 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1886 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1891 ConSplitterUgaDrawGetMode (
1892 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1893 OUT UINT32
*HorizontalResolution
,
1894 OUT UINT32
*VerticalResolution
,
1895 OUT UINT32
*ColorDepth
,
1896 OUT UINT32
*RefreshRate
1900 Set the current video mode information.
1902 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1903 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1904 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1905 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1906 @param RefreshRate The refresh rate of the monitor in Hertz.
1908 @retval EFI_SUCCESS Mode information returned.
1909 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1910 @retval EFI_OUT_OF_RESOURCES Out of resources.
1915 ConSplitterUgaDrawSetMode (
1916 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1917 IN UINT32 HorizontalResolution
,
1918 IN UINT32 VerticalResolution
,
1919 IN UINT32 ColorDepth
,
1920 IN UINT32 RefreshRate
1924 Blt a rectangle of pixels on the graphics screen.
1926 The following table defines actions for BltOperations.
1929 Write data from the BltBuffer pixel (SourceX, SourceY)
1930 directly to every pixel of the video display rectangle
1931 (DestinationX, DestinationY)
1932 (DestinationX + Width, DestinationY + Height).
1933 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1934 EfiUgaVideoToBltBuffer:
1935 Read data from the video display rectangle
1936 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1937 the BltBuffer rectangle (DestinationX, DestinationY )
1938 (DestinationX + Width, DestinationY + Height). If DestinationX or
1939 DestinationY is not zero then Delta must be set to the length in bytes
1940 of a row in the BltBuffer.
1941 EfiUgaBltBufferToVideo:
1942 Write data from the BltBuffer rectangle
1943 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1944 video display rectangle (DestinationX, DestinationY)
1945 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1946 not zero then Delta must be set to the length in bytes of a row in the
1949 Copy from the video display rectangle
1950 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1951 to the video display rectangle (DestinationX, DestinationY)
1952 (DestinationX + Width, DestinationY + Height).
1953 The BltBuffer and Delta are not used in this mode.
1955 @param This Protocol instance pointer.
1956 @param BltBuffer Buffer containing data to blit into video buffer. This
1957 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1958 @param BltOperation Operation to perform on BlitBuffer and video memory
1959 @param SourceX X coordinate of source for the BltBuffer.
1960 @param SourceY Y coordinate of source for the BltBuffer.
1961 @param DestinationX X coordinate of destination for the BltBuffer.
1962 @param DestinationY Y coordinate of destination for the BltBuffer.
1963 @param Width Width of rectangle in BltBuffer in pixels.
1964 @param Height Hight of rectangle in BltBuffer in pixels.
1965 @param Delta OPTIONAL
1967 @retval EFI_SUCCESS The Blt operation completed.
1968 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1969 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1974 ConSplitterUgaDrawBlt (
1975 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1976 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1977 IN EFI_UGA_BLT_OPERATION BltOperation
,
1980 IN UINTN DestinationX
,
1981 IN UINTN DestinationY
,
1984 IN UINTN Delta OPTIONAL
1988 Sets the output device(s) to a specified mode.
1990 @param Private Text Out Splitter pointer.
1991 @param ModeNumber The mode number to set.
1996 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,