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
;
61 // These definitions were in the old Hii protocol, but are not in the new UEFI
62 // version. So they are defined locally.
64 #define UNICODE_NARROW_CHAR 0xFFF0
65 #define UNICODE_WIDE_CHAR 0xFFF1
68 // Private Data Structures
70 #define CONSOLE_SPLITTER_ALLOC_UNIT 32
80 } TEXT_OUT_SPLITTER_QUERY_DATA
;
82 #define KEY_STATE_VALID_EXPOSED (EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED)
84 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
87 // Private data for Text In Ex Splitter Notify
89 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
91 VOID
**NotifyHandleList
;
93 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
94 LIST_ENTRY NotifyEntry
;
95 } TEXT_IN_EX_SPLITTER_NOTIFY
;
97 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
99 TEXT_IN_EX_SPLITTER_NOTIFY, \
101 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
104 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
107 // Private data for the Console In splitter
111 EFI_HANDLE VirtualHandle
;
113 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
114 UINTN CurrentNumberOfConsoles
;
115 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
116 UINTN TextInListCount
;
118 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
119 UINTN CurrentNumberOfExConsoles
;
120 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
121 UINTN TextInExListCount
;
122 LIST_ENTRY NotifyList
;
123 EFI_KEY_DATA
*KeyQueue
;
124 UINTN CurrentNumberOfKeys
;
126 // It will be initialized and synced between console input devices
127 // for toggle state sync.
129 EFI_KEY_TOGGLE_STATE PhysicalKeyToggleState
;
131 // It will be initialized and used to record if virtual KeyState
132 // has been required to be exposed.
134 BOOLEAN VirtualKeyStateExported
;
136 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
137 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
138 UINTN CurrentNumberOfPointers
;
139 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
140 UINTN PointerListCount
;
142 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
143 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
144 UINTN CurrentNumberOfAbsolutePointers
;
145 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
146 UINTN AbsolutePointerListCount
;
147 BOOLEAN AbsoluteInputEventSignalState
;
149 BOOLEAN KeyEventSignalState
;
150 BOOLEAN InputEventSignalState
;
151 EFI_EVENT ConnectConInEvent
;
152 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
154 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
156 TEXT_IN_SPLITTER_PRIVATE_DATA, \
158 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
161 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
163 TEXT_IN_SPLITTER_PRIVATE_DATA, \
165 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
167 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
169 TEXT_IN_SPLITTER_PRIVATE_DATA, \
171 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
174 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
176 TEXT_IN_SPLITTER_PRIVATE_DATA, \
178 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
181 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
184 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
185 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
186 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
187 } TEXT_OUT_AND_GOP_DATA
;
190 // Private data for the Console Out splitter
194 EFI_HANDLE VirtualHandle
;
195 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
196 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
198 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
199 UINT32 UgaHorizontalResolution
;
200 UINT32 UgaVerticalResolution
;
201 UINT32 UgaColorDepth
;
202 UINT32 UgaRefreshRate
;
204 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
205 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
206 UINTN CurrentNumberOfGraphicsOutput
;
207 UINTN CurrentNumberOfUgaDraw
;
209 UINTN CurrentNumberOfConsoles
;
210 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
211 UINTN TextOutListCount
;
212 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
213 UINTN TextOutQueryDataCount
;
214 INT32
*TextOutModeMap
;
216 BOOLEAN AddingConOutDevice
;
217 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
219 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
221 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
223 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
226 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
228 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
230 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
233 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
235 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
237 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
240 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
242 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
244 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
248 // Function Prototypes
252 The user Entry Point for module ConSplitter. The user code starts with this function.
254 Installs driver module protocols and. Creates virtual device handles for ConIn,
255 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
256 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
257 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
259 @param[in] ImageHandle The firmware allocated handle for the EFI image.
260 @param[in] SystemTable A pointer to the EFI System Table.
262 @retval EFI_SUCCESS The entry point is executed successfully.
263 @retval other Some error occurs when executing this entry point.
268 ConSplitterDriverEntry (
269 IN EFI_HANDLE ImageHandle
,
270 IN EFI_SYSTEM_TABLE
*SystemTable
274 Construct console input devices' private data.
276 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
279 @retval EFI_OUT_OF_RESOURCES Out of resources.
280 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
281 @retval other Failed to construct private data.
285 ConSplitterTextInConstructor (
286 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
290 Construct console output devices' private data.
292 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
295 @retval EFI_OUT_OF_RESOURCES Out of resources.
296 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
300 ConSplitterTextOutConstructor (
301 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
305 Test to see if Console In Device could be supported on the Controller.
307 @param This Driver Binding protocol instance pointer.
308 @param ControllerHandle Handle of device to test.
309 @param RemainingDevicePath Optional parameter use to pick a specific child
312 @retval EFI_SUCCESS This driver supports this device.
313 @retval other This driver does not support this device.
318 ConSplitterConInDriverBindingSupported (
319 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
320 IN EFI_HANDLE ControllerHandle
,
321 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
325 Test to see if Simple Pointer protocol could be supported on the Controller.
327 @param This Driver Binding protocol instance pointer.
328 @param ControllerHandle Handle of device to test.
329 @param RemainingDevicePath Optional parameter use to pick a specific child
332 @retval EFI_SUCCESS This driver supports this device.
333 @retval other This driver does not support this device.
338 ConSplitterSimplePointerDriverBindingSupported (
339 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
340 IN EFI_HANDLE ControllerHandle
,
341 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
345 Test to see if Console Out Device could be supported on the Controller.
347 @param This Driver Binding protocol instance pointer.
348 @param ControllerHandle Handle of device to test.
349 @param RemainingDevicePath Optional parameter use to pick a specific child
352 @retval EFI_SUCCESS This driver supports this device.
353 @retval other This driver does not support this device.
358 ConSplitterConOutDriverBindingSupported (
359 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
360 IN EFI_HANDLE ControllerHandle
,
361 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
365 Test to see if Standard Error Device could be supported on the Controller.
367 @param This Driver Binding protocol instance pointer.
368 @param ControllerHandle Handle of device to test.
369 @param RemainingDevicePath Optional parameter use to pick a specific child
372 @retval EFI_SUCCESS This driver supports this device.
373 @retval other This driver does not support this device.
378 ConSplitterStdErrDriverBindingSupported (
379 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
380 IN EFI_HANDLE ControllerHandle
,
381 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
385 Start Console In Consplitter on device handle.
387 @param This Driver Binding protocol instance pointer.
388 @param ControllerHandle Handle of device to bind driver to.
389 @param RemainingDevicePath Optional parameter use to pick a specific child
392 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
393 @retval other Console In Consplitter does not support this device.
398 ConSplitterConInDriverBindingStart (
399 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
400 IN EFI_HANDLE ControllerHandle
,
401 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
405 Start Simple Pointer Consplitter on device handle.
407 @param This Driver Binding protocol instance pointer.
408 @param ControllerHandle Handle of device to bind driver to.
409 @param RemainingDevicePath Optional parameter use to pick a specific child
412 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
413 @retval other Simple Pointer Consplitter does not support this device.
418 ConSplitterSimplePointerDriverBindingStart (
419 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
420 IN EFI_HANDLE ControllerHandle
,
421 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
425 Start Console Out Consplitter on device handle.
427 @param This Driver Binding protocol instance pointer.
428 @param ControllerHandle Handle of device to bind driver to.
429 @param RemainingDevicePath Optional parameter use to pick a specific child
432 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
433 @retval other Console Out Consplitter does not support this device.
438 ConSplitterConOutDriverBindingStart (
439 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
440 IN EFI_HANDLE ControllerHandle
,
441 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
445 Start Standard Error Consplitter on device handle.
447 @param This Driver Binding protocol instance pointer.
448 @param ControllerHandle Handle of device to bind driver to.
449 @param RemainingDevicePath Optional parameter use to pick a specific child
452 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
453 @retval other Standard Error Consplitter does not support this device.
458 ConSplitterStdErrDriverBindingStart (
459 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
460 IN EFI_HANDLE ControllerHandle
,
461 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
465 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
467 @param This Driver Binding protocol instance pointer.
468 @param ControllerHandle Handle of device to stop driver on
469 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
470 children is zero stop the entire bus driver.
471 @param ChildHandleBuffer List of Child Handles to Stop.
473 @retval EFI_SUCCESS This driver is removed ControllerHandle
474 @retval other This driver was not removed from this device
479 ConSplitterConInDriverBindingStop (
480 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
481 IN EFI_HANDLE ControllerHandle
,
482 IN UINTN NumberOfChildren
,
483 IN EFI_HANDLE
*ChildHandleBuffer
487 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
488 Simple Pointer protocol.
490 @param This Driver Binding protocol instance pointer.
491 @param ControllerHandle Handle of device to stop driver on
492 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
493 children is zero stop the entire bus driver.
494 @param ChildHandleBuffer List of Child Handles to Stop.
496 @retval EFI_SUCCESS This driver is removed ControllerHandle
497 @retval other This driver was not removed from this device
502 ConSplitterSimplePointerDriverBindingStop (
503 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
504 IN EFI_HANDLE ControllerHandle
,
505 IN UINTN NumberOfChildren
,
506 IN EFI_HANDLE
*ChildHandleBuffer
510 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
512 @param This Driver Binding protocol instance pointer.
513 @param ControllerHandle Handle of device to stop driver on
514 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
515 children is zero stop the entire bus driver.
516 @param ChildHandleBuffer List of Child Handles to Stop.
518 @retval EFI_SUCCESS This driver is removed ControllerHandle
519 @retval other This driver was not removed from this device
524 ConSplitterConOutDriverBindingStop (
525 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
526 IN EFI_HANDLE ControllerHandle
,
527 IN UINTN NumberOfChildren
,
528 IN EFI_HANDLE
*ChildHandleBuffer
532 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
534 @param This Driver Binding protocol instance pointer.
535 @param ControllerHandle Handle of device to stop driver on
536 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
537 children is zero stop the entire bus driver.
538 @param ChildHandleBuffer List of Child Handles to Stop.
540 @retval EFI_SUCCESS This driver is removed ControllerHandle
541 @retval other This driver was not removed from this device
546 ConSplitterStdErrDriverBindingStop (
547 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
548 IN EFI_HANDLE ControllerHandle
,
549 IN UINTN NumberOfChildren
,
550 IN EFI_HANDLE
*ChildHandleBuffer
554 Test to see if Absolute Pointer protocol could be supported on the Controller.
556 @param This Driver Binding protocol instance pointer.
557 @param ControllerHandle Handle of device to test.
558 @param RemainingDevicePath Optional parameter use to pick a specific child
561 @retval EFI_SUCCESS This driver supports this device.
562 @retval other This driver does not support this device.
567 ConSplitterAbsolutePointerDriverBindingSupported (
568 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
569 IN EFI_HANDLE ControllerHandle
,
570 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
574 Start Absolute Pointer Consplitter on device handle.
576 @param This Driver Binding protocol instance pointer.
577 @param ControllerHandle Handle of device to bind driver to.
578 @param RemainingDevicePath Optional parameter use to pick a specific child
581 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
582 @retval other Absolute Pointer Consplitter does not support this device.
587 ConSplitterAbsolutePointerDriverBindingStart (
588 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
589 IN EFI_HANDLE ControllerHandle
,
590 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
594 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
595 Absolute Pointer protocol.
597 @param This Driver Binding protocol instance pointer.
598 @param ControllerHandle Handle of device to stop driver on
599 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
600 children is zero stop the entire bus driver.
601 @param ChildHandleBuffer List of Child Handles to Stop.
603 @retval EFI_SUCCESS This driver is removed ControllerHandle
604 @retval other This driver was not removed from this device
609 ConSplitterAbsolutePointerDriverBindingStop (
610 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
611 IN EFI_HANDLE ControllerHandle
,
612 IN UINTN NumberOfChildren
,
613 IN EFI_HANDLE
*ChildHandleBuffer
617 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
619 @param Private Text In Splitter pointer.
620 @param AbsolutePointer Absolute Pointer protocol pointer.
622 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
623 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
627 ConSplitterAbsolutePointerAddDevice (
628 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
629 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
633 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
635 @param Private Text In Splitter pointer.
636 @param AbsolutePointer Absolute Pointer protocol pointer.
638 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
639 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
643 ConSplitterAbsolutePointerDeleteDevice (
644 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
645 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
649 // Absolute Pointer protocol interfaces
653 Resets the pointer device hardware.
655 @param This Protocol instance pointer.
656 @param ExtendedVerification Driver may perform diagnostics on reset.
658 @retval EFI_SUCCESS The device was reset.
659 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
665 ConSplitterAbsolutePointerReset (
666 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
667 IN BOOLEAN ExtendedVerification
671 Retrieves the current state of a pointer device.
673 @param This Protocol instance pointer.
674 @param State A pointer to the state information on the
677 @retval EFI_SUCCESS The state of the pointer device was returned in
679 @retval EFI_NOT_READY The state of the pointer device has not changed
680 since the last call to GetState().
681 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
682 retrieve the pointer device's current state.
687 ConSplitterAbsolutePointerGetState (
688 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
689 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
693 This event agregates all the events of the pointer devices in the splitter.
695 If any events of physical pointer devices are signaled, signal the pointer
696 splitter event. This will cause the calling code to call
697 ConSplitterAbsolutePointerGetState ().
699 @param Event The Event assoicated with callback.
700 @param Context Context registered when Event was created.
705 ConSplitterAbsolutePointerWaitForInput (
711 Retrieves a Unicode string that is the user readable name of the driver.
713 This function retrieves the user readable name of a driver in the form of a
714 Unicode string. If the driver specified by This has a user readable name in
715 the language specified by Language, then a pointer to the driver name is
716 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
717 by This does not support the language specified by Language,
718 then EFI_UNSUPPORTED is returned.
720 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
721 EFI_COMPONENT_NAME_PROTOCOL instance.
723 @param Language[in] A pointer to a Null-terminated ASCII string
724 array indicating the language. This is the
725 language of the driver name that the caller is
726 requesting, and it must match one of the
727 languages specified in SupportedLanguages. The
728 number of languages supported by a driver is up
729 to the driver writer. Language is specified
730 in RFC 4646 or ISO 639-2 language code format.
732 @param DriverName[out] A pointer to the Unicode string to return.
733 This Unicode string is the name of the
734 driver specified by This in the language
735 specified by Language.
737 @retval EFI_SUCCESS The Unicode string for the Driver specified by
738 This and the language specified by Language was
739 returned in DriverName.
741 @retval EFI_INVALID_PARAMETER Language is NULL.
743 @retval EFI_INVALID_PARAMETER DriverName is NULL.
745 @retval EFI_UNSUPPORTED The driver specified by This does not support
746 the language specified by Language.
751 ConSplitterComponentNameGetDriverName (
752 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
754 OUT CHAR16
**DriverName
758 Retrieves a Unicode string that is the user readable name of the controller
759 that is being managed by a driver.
761 This function retrieves the user readable name of the controller specified by
762 ControllerHandle and ChildHandle in the form of a Unicode string. If the
763 driver specified by This has a user readable name in the language specified by
764 Language, then a pointer to the controller name is returned in ControllerName,
765 and EFI_SUCCESS is returned. If the driver specified by This is not currently
766 managing the controller specified by ControllerHandle and ChildHandle,
767 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
768 support the language specified by Language, then EFI_UNSUPPORTED is returned.
770 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
771 EFI_COMPONENT_NAME_PROTOCOL instance.
773 @param ControllerHandle[in] The handle of a controller that the driver
774 specified by This is managing. This handle
775 specifies the controller whose name is to be
778 @param ChildHandle[in] The handle of the child controller to retrieve
779 the name of. This is an optional parameter that
780 may be NULL. It will be NULL for device
781 drivers. It will also be NULL for a bus drivers
782 that wish to retrieve the name of the bus
783 controller. It will not be NULL for a bus
784 driver that wishes to retrieve the name of a
787 @param Language[in] A pointer to a Null-terminated ASCII string
788 array indicating the language. This is the
789 language of the driver name that the caller is
790 requesting, and it must match one of the
791 languages specified in SupportedLanguages. The
792 number of languages supported by a driver is up
793 to the driver writer. Language is specified in
794 RFC 4646 or ISO 639-2 language code format.
796 @param ControllerName[out] A pointer to the Unicode string to return.
797 This Unicode string is the name of the
798 controller specified by ControllerHandle and
799 ChildHandle in the language specified by
800 Language from the point of view of the driver
803 @retval EFI_SUCCESS The Unicode string for the user readable name in
804 the language specified by Language for the
805 driver specified by This was returned in
808 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
810 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
813 @retval EFI_INVALID_PARAMETER Language is NULL.
815 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
817 @retval EFI_UNSUPPORTED The driver specified by This is not currently
818 managing the controller specified by
819 ControllerHandle and ChildHandle.
821 @retval EFI_UNSUPPORTED The driver specified by This does not support
822 the language specified by Language.
827 ConSplitterConInComponentNameGetControllerName (
828 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
829 IN EFI_HANDLE ControllerHandle
,
830 IN EFI_HANDLE ChildHandle OPTIONAL
,
832 OUT CHAR16
**ControllerName
836 Retrieves a Unicode string that is the user readable name of the controller
837 that is being managed by a driver.
839 This function retrieves the user readable name of the controller specified by
840 ControllerHandle and ChildHandle in the form of a Unicode string. If the
841 driver specified by This has a user readable name in the language specified by
842 Language, then a pointer to the controller name is returned in ControllerName,
843 and EFI_SUCCESS is returned. If the driver specified by This is not currently
844 managing the controller specified by ControllerHandle and ChildHandle,
845 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
846 support the language specified by Language, then EFI_UNSUPPORTED is returned.
848 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
849 EFI_COMPONENT_NAME_PROTOCOL instance.
851 @param ControllerHandle[in] The handle of a controller that the driver
852 specified by This is managing. This handle
853 specifies the controller whose name is to be
856 @param ChildHandle[in] The handle of the child controller to retrieve
857 the name of. This is an optional parameter that
858 may be NULL. It will be NULL for device
859 drivers. It will also be NULL for a bus drivers
860 that wish to retrieve the name of the bus
861 controller. It will not be NULL for a bus
862 driver that wishes to retrieve the name of a
865 @param Language[in] A pointer to a Null-terminated ASCII string
866 array indicating the language. This is the
867 language of the driver name that the caller is
868 requesting, and it must match one of the
869 languages specified in SupportedLanguages. The
870 number of languages supported by a driver is up
871 to the driver writer. Language is specified in
872 RFC 4646 or ISO 639-2 language code format.
874 @param ControllerName[out] A pointer to the Unicode string to return.
875 This Unicode string is the name of the
876 controller specified by ControllerHandle and
877 ChildHandle in the language specified by
878 Language from the point of view of the driver
881 @retval EFI_SUCCESS The Unicode string for the user readable name in
882 the language specified by Language for the
883 driver specified by This was returned in
886 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
888 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
891 @retval EFI_INVALID_PARAMETER Language is NULL.
893 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
895 @retval EFI_UNSUPPORTED The driver specified by This is not currently
896 managing the controller specified by
897 ControllerHandle and ChildHandle.
899 @retval EFI_UNSUPPORTED The driver specified by This does not support
900 the language specified by Language.
905 ConSplitterSimplePointerComponentNameGetControllerName (
906 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
907 IN EFI_HANDLE ControllerHandle
,
908 IN EFI_HANDLE ChildHandle OPTIONAL
,
910 OUT CHAR16
**ControllerName
914 Retrieves a Unicode string that is the user readable name of the controller
915 that is being managed by an EFI Driver.
917 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
919 @param ControllerHandle The handle of a controller that the driver
920 specified by This is managing. This handle
921 specifies the controller whose name is to be
923 @param ChildHandle The handle of the child controller to retrieve the
924 name of. This is an optional parameter that may
925 be NULL. It will be NULL for device drivers. It
926 will also be NULL for a bus drivers that wish to
927 retrieve the name of the bus controller. It will
928 not be NULL for a bus driver that wishes to
929 retrieve the name of a child controller.
930 @param Language A pointer to RFC4646 language identifier. This is
931 the language of the controller name that that the
932 caller is requesting, and it must match one of the
933 languages specified in SupportedLanguages. The
934 number of languages supported by a driver is up to
936 @param ControllerName A pointer to the Unicode string to return. This
937 Unicode string is the name of the controller
938 specified by ControllerHandle and ChildHandle in
939 the language specified by Language from the point
940 of view of the driver specified by This.
942 @retval EFI_SUCCESS The Unicode string for the user readable name in
943 the language specified by Language for the driver
944 specified by This was returned in DriverName.
945 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
946 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
948 @retval EFI_INVALID_PARAMETER Language is NULL.
949 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
950 @retval EFI_UNSUPPORTED The driver specified by This is not currently
951 managing the controller specified by
952 ControllerHandle and ChildHandle.
953 @retval EFI_UNSUPPORTED The driver specified by This does not support the
954 language specified by Language.
959 ConSplitterAbsolutePointerComponentNameGetControllerName (
960 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
961 IN EFI_HANDLE ControllerHandle
,
962 IN EFI_HANDLE ChildHandle OPTIONAL
,
964 OUT CHAR16
**ControllerName
968 Retrieves a Unicode string that is the user readable name of the controller
969 that is being managed by a driver.
971 This function retrieves the user readable name of the controller specified by
972 ControllerHandle and ChildHandle in the form of a Unicode string. If the
973 driver specified by This has a user readable name in the language specified by
974 Language, then a pointer to the controller name is returned in ControllerName,
975 and EFI_SUCCESS is returned. If the driver specified by This is not currently
976 managing the controller specified by ControllerHandle and ChildHandle,
977 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
978 support the language specified by Language, then EFI_UNSUPPORTED is returned.
980 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
981 EFI_COMPONENT_NAME_PROTOCOL instance.
983 @param ControllerHandle[in] The handle of a controller that the driver
984 specified by This is managing. This handle
985 specifies the controller whose name is to be
988 @param ChildHandle[in] The handle of the child controller to retrieve
989 the name of. This is an optional parameter that
990 may be NULL. It will be NULL for device
991 drivers. It will also be NULL for a bus drivers
992 that wish to retrieve the name of the bus
993 controller. It will not be NULL for a bus
994 driver that wishes to retrieve the name of a
997 @param Language[in] A pointer to a Null-terminated ASCII string
998 array indicating the language. This is the
999 language of the driver name that the caller is
1000 requesting, and it must match one of the
1001 languages specified in SupportedLanguages. The
1002 number of languages supported by a driver is up
1003 to the driver writer. Language is specified in
1004 RFC 4646 or ISO 639-2 language code format.
1006 @param ControllerName[out] A pointer to the Unicode string to return.
1007 This Unicode string is the name of the
1008 controller specified by ControllerHandle and
1009 ChildHandle in the language specified by
1010 Language from the point of view of the driver
1013 @retval EFI_SUCCESS The Unicode string for the user readable name in
1014 the language specified by Language for the
1015 driver specified by This was returned in
1018 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1020 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1023 @retval EFI_INVALID_PARAMETER Language is NULL.
1025 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1027 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1028 managing the controller specified by
1029 ControllerHandle and ChildHandle.
1031 @retval EFI_UNSUPPORTED The driver specified by This does not support
1032 the language specified by Language.
1037 ConSplitterConOutComponentNameGetControllerName (
1038 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1039 IN EFI_HANDLE ControllerHandle
,
1040 IN EFI_HANDLE ChildHandle OPTIONAL
,
1042 OUT CHAR16
**ControllerName
1046 Retrieves a Unicode string that is the user readable name of the controller
1047 that is being managed by a driver.
1049 This function retrieves the user readable name of the controller specified by
1050 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1051 driver specified by This has a user readable name in the language specified by
1052 Language, then a pointer to the controller name is returned in ControllerName,
1053 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1054 managing the controller specified by ControllerHandle and ChildHandle,
1055 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1056 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1058 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1059 EFI_COMPONENT_NAME_PROTOCOL instance.
1061 @param ControllerHandle[in] The handle of a controller that the driver
1062 specified by This is managing. This handle
1063 specifies the controller whose name is to be
1066 @param ChildHandle[in] The handle of the child controller to retrieve
1067 the name of. This is an optional parameter that
1068 may be NULL. It will be NULL for device
1069 drivers. It will also be NULL for a bus drivers
1070 that wish to retrieve the name of the bus
1071 controller. It will not be NULL for a bus
1072 driver that wishes to retrieve the name of a
1075 @param Language[in] A pointer to a Null-terminated ASCII string
1076 array indicating the language. This is the
1077 language of the driver name that the caller is
1078 requesting, and it must match one of the
1079 languages specified in SupportedLanguages. The
1080 number of languages supported by a driver is up
1081 to the driver writer. Language is specified in
1082 RFC 4646 or ISO 639-2 language code format.
1084 @param ControllerName[out] A pointer to the Unicode string to return.
1085 This Unicode string is the name of the
1086 controller specified by ControllerHandle and
1087 ChildHandle in the language specified by
1088 Language from the point of view of the driver
1091 @retval EFI_SUCCESS The Unicode string for the user readable name in
1092 the language specified by Language for the
1093 driver specified by This was returned in
1096 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1098 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1101 @retval EFI_INVALID_PARAMETER Language is NULL.
1103 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1105 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1106 managing the controller specified by
1107 ControllerHandle and ChildHandle.
1109 @retval EFI_UNSUPPORTED The driver specified by This does not support
1110 the language specified by Language.
1115 ConSplitterStdErrComponentNameGetControllerName (
1116 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1117 IN EFI_HANDLE ControllerHandle
,
1118 IN EFI_HANDLE ChildHandle OPTIONAL
,
1120 OUT CHAR16
**ControllerName
1124 // TextIn Constructor/Destructor functions
1128 Add Text Input Device in Consplitter Text Input list.
1130 @param Private Text In Splitter pointer.
1131 @param TextIn Simple Text Input protocol pointer.
1133 @retval EFI_SUCCESS Text Input Device added successfully.
1134 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1138 ConSplitterTextInAddDevice (
1139 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1140 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1144 Remove Text Input Device from Consplitter Text Input list.
1146 @param Private Text In Splitter pointer.
1147 @param TextIn Simple Text protocol pointer.
1149 @retval EFI_SUCCESS Simple Text Device removed successfully.
1150 @retval EFI_NOT_FOUND No Simple Text Device found.
1154 ConSplitterTextInDeleteDevice (
1155 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1156 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1160 // SimplePointer Constuctor/Destructor functions
1164 Add Simple Pointer Device in Consplitter Simple Pointer list.
1166 @param Private Text In Splitter pointer.
1167 @param SimplePointer Simple Pointer protocol pointer.
1169 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1170 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1174 ConSplitterSimplePointerAddDevice (
1175 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1176 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1180 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1182 @param Private Text In Splitter pointer.
1183 @param SimplePointer Simple Pointer protocol pointer.
1185 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1186 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1190 ConSplitterSimplePointerDeleteDevice (
1191 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1192 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1196 // TextOut Constuctor/Destructor functions
1200 Add Text Output Device in Consplitter Text Output list.
1202 @param Private Text Out Splitter pointer.
1203 @param TextOut Simple Text Output protocol pointer.
1204 @param GraphicsOutput Graphics Output protocol pointer.
1205 @param UgaDraw UGA Draw protocol pointer.
1207 @retval EFI_SUCCESS Text Output Device added successfully.
1208 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1212 ConSplitterTextOutAddDevice (
1213 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1214 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1215 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1216 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1220 Remove Text Out Device in Consplitter Text Out list.
1222 @param Private Text Out Splitter pointer.
1223 @param TextOut Simple Text Output Pointer protocol pointer.
1225 @retval EFI_SUCCESS Text Out Device removed successfully.
1226 @retval EFI_NOT_FOUND No Text Out Device found.
1230 ConSplitterTextOutDeleteDevice (
1231 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1232 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1236 // TextIn I/O Functions
1240 Reset the input device and optionaly run diagnostics
1242 @param This Protocol instance pointer.
1243 @param ExtendedVerification Driver may perform diagnostics on reset.
1245 @retval EFI_SUCCESS The device was reset.
1246 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1252 ConSplitterTextInReset (
1253 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1254 IN BOOLEAN ExtendedVerification
1258 Reads the next keystroke from the input device. The WaitForKey Event can
1259 be used to test for existance of a keystroke via WaitForEvent () call.
1261 @param This Protocol instance pointer.
1262 @param Key Driver may perform diagnostics on reset.
1264 @retval EFI_SUCCESS The keystroke information was returned.
1265 @retval EFI_NOT_READY There was no keystroke data availiable.
1266 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1272 ConSplitterTextInReadKeyStroke (
1273 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1274 OUT EFI_INPUT_KEY
*Key
1278 Add Text Input Ex Device in Consplitter Text Input Ex list.
1280 @param Private Text In Splitter pointer.
1281 @param TextInEx Simple Text Input Ex Input protocol pointer.
1283 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1284 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1288 ConSplitterTextInExAddDevice (
1289 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1290 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1294 Remove Text Ex Device from Consplitter Text Input Ex list.
1296 @param Private Text In Splitter pointer.
1297 @param TextInEx Simple Text Ex protocol pointer.
1299 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1300 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1304 ConSplitterTextInExDeleteDevice (
1305 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1306 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1310 // Simple Text Input Ex protocol function prototypes
1314 Reset the input device and optionaly run diagnostics
1316 @param This Protocol instance pointer.
1317 @param ExtendedVerification Driver may perform diagnostics on reset.
1319 @retval EFI_SUCCESS The device was reset.
1320 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1326 ConSplitterTextInResetEx (
1327 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1328 IN BOOLEAN ExtendedVerification
1332 Reads the next keystroke from the input device. The WaitForKey Event can
1333 be used to test for existance of a keystroke via WaitForEvent () call.
1335 @param This Protocol instance pointer.
1336 @param KeyData A pointer to a buffer that is filled in with the
1337 keystroke state data for the key that was
1340 @retval EFI_SUCCESS The keystroke information was returned.
1341 @retval EFI_NOT_READY There was no keystroke data availiable.
1342 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1344 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1349 ConSplitterTextInReadKeyStrokeEx (
1350 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1351 OUT EFI_KEY_DATA
*KeyData
1355 Set certain state for the input device.
1357 @param This Protocol instance pointer.
1358 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1359 state for the input device.
1361 @retval EFI_SUCCESS The device state was set successfully.
1362 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1363 could not have the setting adjusted.
1364 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1366 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1371 ConSplitterTextInSetState (
1372 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1373 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1377 Register a notification function for a particular keystroke for the input device.
1379 @param This Protocol instance pointer.
1380 @param KeyData A pointer to a buffer that is filled in with
1381 the keystroke information for the key that was
1382 pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState
1383 and KeyData.KeyState.KeyShiftState are 0, then any incomplete
1384 keystroke will trigger a notification of the KeyNotificationFunction.
1385 @param KeyNotificationFunction Points to the function to be called when the key
1386 sequence is typed specified by KeyData. This notification function
1387 should be called at <=TPL_CALLBACK.
1388 @param NotifyHandle Points to the unique handle assigned to the
1389 registered notification.
1391 @retval EFI_SUCCESS The notification function was registered
1393 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1395 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1400 ConSplitterTextInRegisterKeyNotify (
1401 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1402 IN EFI_KEY_DATA
*KeyData
,
1403 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1404 OUT VOID
**NotifyHandle
1408 Remove a registered notification function from a particular keystroke.
1410 @param This Protocol instance pointer.
1411 @param NotificationHandle The handle of the notification function being
1414 @retval EFI_SUCCESS The notification function was unregistered
1416 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1417 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1422 ConSplitterTextInUnregisterKeyNotify (
1423 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1424 IN VOID
*NotificationHandle
1428 This event aggregates all the events of the ConIn devices in the spliter.
1430 If any events of physical ConIn devices are signaled, signal the ConIn
1431 spliter event. This will cause the calling code to call
1432 ConSplitterTextInReadKeyStroke ().
1434 @param Event The Event assoicated with callback.
1435 @param Context Context registered when Event was created.
1440 ConSplitterTextInWaitForKey (
1446 Reads the next keystroke from the input device. The WaitForKey Event can
1447 be used to test for existance of a keystroke via WaitForEvent () call.
1449 @param Private Protocol instance pointer.
1450 @param Key Driver may perform diagnostics on reset.
1452 @retval EFI_SUCCESS The keystroke information was returned.
1453 @retval EFI_NOT_READY There was no keystroke data availiable.
1454 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1460 ConSplitterTextInPrivateReadKeyStroke (
1461 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1462 OUT EFI_INPUT_KEY
*Key
1466 Reset the input device and optionaly run diagnostics
1468 @param This Protocol instance pointer.
1469 @param ExtendedVerification Driver may perform diagnostics on reset.
1471 @retval EFI_SUCCESS The device was reset.
1472 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1478 ConSplitterSimplePointerReset (
1479 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1480 IN BOOLEAN ExtendedVerification
1484 Reads the next keystroke from the input device. The WaitForKey Event can
1485 be used to test for existance of a keystroke via WaitForEvent () call.
1487 @param This A pointer to protocol instance.
1488 @param State A pointer to state information on the pointer device
1490 @retval EFI_SUCCESS The keystroke information was returned in State.
1491 @retval EFI_NOT_READY There was no keystroke data availiable.
1492 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1498 ConSplitterSimplePointerGetState (
1499 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1500 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1504 This event agregates all the events of the ConIn devices in the spliter.
1505 If any events of physical ConIn devices are signaled, signal the ConIn
1506 spliter event. This will cause the calling code to call
1507 ConSplitterTextInReadKeyStroke ().
1509 @param Event The Event assoicated with callback.
1510 @param Context Context registered when Event was created.
1515 ConSplitterSimplePointerWaitForInput (
1521 // TextOut I/O Functions
1525 Reset the text output device hardware and optionaly run diagnostics
1527 @param This Protocol instance pointer.
1528 @param ExtendedVerification Driver may perform more exhaustive verfication
1529 operation of the device during reset.
1531 @retval EFI_SUCCESS The text output device was reset.
1532 @retval EFI_DEVICE_ERROR The text output device is not functioning
1533 correctly and could not be reset.
1538 ConSplitterTextOutReset (
1539 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1540 IN BOOLEAN ExtendedVerification
1544 Write a Unicode string to the output device.
1546 @param This Protocol instance pointer.
1547 @param WString The NULL-terminated Unicode string to be
1548 displayed on the output device(s). All output
1549 devices must also support the Unicode drawing
1550 defined in this file.
1552 @retval EFI_SUCCESS The string was output to the device.
1553 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1555 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1557 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1558 characters in the Unicode string could not be
1559 rendered and were skipped.
1564 ConSplitterTextOutOutputString (
1565 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1570 Verifies that all characters in a Unicode string can be output to the
1573 @param This Protocol instance pointer.
1574 @param WString The NULL-terminated Unicode string to be
1575 examined for the output device(s).
1577 @retval EFI_SUCCESS The device(s) are capable of rendering the
1579 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1580 cannot be rendered by one or more of the output
1581 devices mapped by the EFI handle.
1586 ConSplitterTextOutTestString (
1587 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1592 Returns information for an available text mode that the output device(s)
1595 @param This Protocol instance pointer.
1596 @param ModeNumber The mode number to return information on.
1597 @param Columns Returns the columns of the text output device
1598 for the requested ModeNumber.
1599 @param Rows Returns the rows of the text output device
1600 for the requested ModeNumber.
1602 @retval EFI_SUCCESS The requested mode information was returned.
1603 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1605 @retval EFI_UNSUPPORTED The mode number was not valid.
1610 ConSplitterTextOutQueryMode (
1611 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1612 IN UINTN ModeNumber
,
1618 Sets the output device(s) to a specified mode.
1620 @param This Protocol instance pointer.
1621 @param ModeNumber The mode number to set.
1623 @retval EFI_SUCCESS The requested text mode was set.
1624 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1626 @retval EFI_UNSUPPORTED The mode number was not valid.
1631 ConSplitterTextOutSetMode (
1632 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1637 Sets the background and foreground colors for the OutputString () and
1638 ClearScreen () functions.
1640 @param This Protocol instance pointer.
1641 @param Attribute The attribute to set. Bits 0..3 are the
1642 foreground color, and bits 4..6 are the
1643 background color. All other bits are undefined
1644 and must be zero. The valid Attributes are
1645 defined in this file.
1647 @retval EFI_SUCCESS The attribute was set.
1648 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1650 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1655 ConSplitterTextOutSetAttribute (
1656 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1661 Clears the output device(s) display to the currently selected background
1664 @param This Protocol instance pointer.
1666 @retval EFI_SUCCESS The operation completed successfully.
1667 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1669 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1674 ConSplitterTextOutClearScreen (
1675 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1679 Sets the current coordinates of the cursor position
1681 @param This Protocol instance pointer.
1682 @param Column The column position to set the cursor to. Must be
1683 greater than or equal to zero and less than the
1684 number of columns by QueryMode ().
1685 @param Row The row position to set the cursor to. Must be
1686 greater than or equal to zero and less than the
1687 number of rows by QueryMode ().
1689 @retval EFI_SUCCESS The operation completed successfully.
1690 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1692 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1693 or the cursor position is invalid for the
1699 ConSplitterTextOutSetCursorPosition (
1700 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1706 Makes the cursor visible or invisible
1708 @param This Protocol instance pointer.
1709 @param Visible If TRUE, the cursor is set to be visible. If
1710 FALSE, the cursor is set to be invisible.
1712 @retval EFI_SUCCESS The operation completed successfully.
1713 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1714 the request, or the device does not support
1715 changing the cursor mode.
1716 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1721 ConSplitterTextOutEnableCursor (
1722 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1727 Take the passed in Buffer of size ElementSize and grow the buffer
1728 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1729 Copy the current data in Buffer to the new version of Buffer and
1730 free the old version of buffer.
1732 @param ElementSize Size of element in array.
1733 @param Count Current number of elements in array.
1734 @param Buffer Bigger version of passed in Buffer with all the
1737 @retval EFI_SUCCESS Buffer size has grown.
1738 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1742 ConSplitterGrowBuffer (
1743 IN UINTN ElementSize
,
1744 IN OUT UINTN
*Count
,
1745 IN OUT VOID
**Buffer
1749 Returns information for an available graphics mode that the graphics device
1750 and the set of active video output devices supports.
1752 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1753 @param ModeNumber The mode number to return information on.
1754 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1755 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1757 @retval EFI_SUCCESS Mode information returned.
1758 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1759 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1760 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1761 @retval EFI_OUT_OF_RESOURCES No resource available.
1766 ConSplitterGraphicsOutputQueryMode (
1767 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1768 IN UINT32 ModeNumber
,
1769 OUT UINTN
*SizeOfInfo
,
1770 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1774 Set the video device into the specified mode and clears the visible portions of
1775 the output display to black.
1777 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1778 @param ModeNumber Abstraction that defines the current video mode.
1780 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1781 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1782 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1783 @retval EFI_OUT_OF_RESOURCES No resource available.
1788 ConSplitterGraphicsOutputSetMode (
1789 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1790 IN UINT32 ModeNumber
1794 The following table defines actions for BltOperations.
1796 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1797 directly to every pixel of the video display rectangle
1798 (DestinationX, DestinationY)
1799 (DestinationX + Width, DestinationY + Height).
1800 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1801 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1802 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1803 the BltBuffer rectangle (DestinationX, DestinationY )
1804 (DestinationX + Width, DestinationY + Height). If DestinationX or
1805 DestinationY is not zero then Delta must be set to the length in bytes
1806 of a row in the BltBuffer.
1807 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1808 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1809 video display rectangle (DestinationX, DestinationY)
1810 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1811 not zero then Delta must be set to the length in bytes of a row in the
1813 EfiBltVideoToVideo - Copy from the video display rectangle
1814 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1815 to the video display rectangle (DestinationX, DestinationY)
1816 (DestinationX + Width, DestinationY + Height).
1817 The BltBuffer and Delta are not used in this mode.
1819 @param This Protocol instance pointer.
1820 @param BltBuffer Buffer containing data to blit into video buffer.
1821 This buffer has a size of
1822 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1823 @param BltOperation Operation to perform on BlitBuffer and video
1825 @param SourceX X coordinate of source for the BltBuffer.
1826 @param SourceY Y coordinate of source for the BltBuffer.
1827 @param DestinationX X coordinate of destination for the BltBuffer.
1828 @param DestinationY Y coordinate of destination for the BltBuffer.
1829 @param Width Width of rectangle in BltBuffer in pixels.
1830 @param Height Hight of rectangle in BltBuffer in pixels.
1831 @param Delta OPTIONAL.
1833 @retval EFI_SUCCESS The Blt operation completed.
1834 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1835 @retval EFI_DEVICE_ERROR A hardware error occurred writting to the video
1841 ConSplitterGraphicsOutputBlt (
1842 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1843 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer OPTIONAL
,
1844 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1847 IN UINTN DestinationX
,
1848 IN UINTN DestinationY
,
1851 IN UINTN Delta OPTIONAL
1855 Return the current video mode information.
1857 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1858 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1859 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1860 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1861 @param RefreshRate The refresh rate of the monitor in Hertz.
1863 @retval EFI_SUCCESS Mode information returned.
1864 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1865 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1870 ConSplitterUgaDrawGetMode (
1871 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1872 OUT UINT32
*HorizontalResolution
,
1873 OUT UINT32
*VerticalResolution
,
1874 OUT UINT32
*ColorDepth
,
1875 OUT UINT32
*RefreshRate
1879 Set the current video mode information.
1881 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1882 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1883 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1884 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1885 @param RefreshRate The refresh rate of the monitor in Hertz.
1887 @retval EFI_SUCCESS Mode information returned.
1888 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1889 @retval EFI_OUT_OF_RESOURCES Out of resources.
1894 ConSplitterUgaDrawSetMode (
1895 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1896 IN UINT32 HorizontalResolution
,
1897 IN UINT32 VerticalResolution
,
1898 IN UINT32 ColorDepth
,
1899 IN UINT32 RefreshRate
1903 Blt a rectangle of pixels on the graphics screen.
1905 The following table defines actions for BltOperations.
1908 Write data from the BltBuffer pixel (SourceX, SourceY)
1909 directly to every pixel of the video display rectangle
1910 (DestinationX, DestinationY)
1911 (DestinationX + Width, DestinationY + Height).
1912 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1913 EfiUgaVideoToBltBuffer:
1914 Read data from the video display rectangle
1915 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1916 the BltBuffer rectangle (DestinationX, DestinationY )
1917 (DestinationX + Width, DestinationY + Height). If DestinationX or
1918 DestinationY is not zero then Delta must be set to the length in bytes
1919 of a row in the BltBuffer.
1920 EfiUgaBltBufferToVideo:
1921 Write data from the BltBuffer rectangle
1922 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1923 video display rectangle (DestinationX, DestinationY)
1924 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1925 not zero then Delta must be set to the length in bytes of a row in the
1928 Copy from the video display rectangle
1929 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1930 to the video display rectangle (DestinationX, DestinationY)
1931 (DestinationX + Width, DestinationY + Height).
1932 The BltBuffer and Delta are not used in this mode.
1934 @param This Protocol instance pointer.
1935 @param BltBuffer Buffer containing data to blit into video buffer. This
1936 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1937 @param BltOperation Operation to perform on BlitBuffer and video memory
1938 @param SourceX X coordinate of source for the BltBuffer.
1939 @param SourceY Y coordinate of source for the BltBuffer.
1940 @param DestinationX X coordinate of destination for the BltBuffer.
1941 @param DestinationY Y coordinate of destination for the BltBuffer.
1942 @param Width Width of rectangle in BltBuffer in pixels.
1943 @param Height Hight of rectangle in BltBuffer in pixels.
1944 @param Delta OPTIONAL
1946 @retval EFI_SUCCESS The Blt operation completed.
1947 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1948 @retval EFI_DEVICE_ERROR A hardware error occurred writting to the video buffer.
1953 ConSplitterUgaDrawBlt (
1954 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1955 IN EFI_UGA_PIXEL
*BltBuffer OPTIONAL
,
1956 IN EFI_UGA_BLT_OPERATION BltOperation
,
1959 IN UINTN DestinationX
,
1960 IN UINTN DestinationY
,
1963 IN UINTN Delta OPTIONAL
1967 Sets the output device(s) to a specified mode.
1969 @param Private Text Out Splitter pointer.
1970 @param ModeNumber The mode number to set.
1975 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,