2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _CON_SPLITTER_H_
16 #define _CON_SPLITTER_H_
21 #include <Protocol/DevicePath.h>
22 #include <Protocol/ComponentName.h>
23 #include <Protocol/DriverBinding.h>
24 #include <Protocol/SimplePointer.h>
25 #include <Protocol/AbsolutePointer.h>
26 #include <Protocol/SimpleTextOut.h>
27 #include <Protocol/SimpleTextIn.h>
28 #include <Protocol/SimpleTextInEx.h>
29 #include <Protocol/GraphicsOutput.h>
30 #include <Protocol/UgaDraw.h>
32 #include <Guid/ConsoleInDevice.h>
33 #include <Guid/StandardErrorDevice.h>
34 #include <Guid/ConsoleOutDevice.h>
35 #include <Guid/ConnectConInEvent.h>
37 #include <Library/PcdLib.h>
38 #include <Library/DebugLib.h>
39 #include <Library/UefiDriverEntryPoint.h>
40 #include <Library/UefiLib.h>
41 #include <Library/BaseLib.h>
42 #include <Library/BaseMemoryLib.h>
43 #include <Library/MemoryAllocationLib.h>
44 #include <Library/UefiBootServicesTableLib.h>
45 #include <Library/UefiRuntimeServicesTableLib.h>
48 // Driver Binding Externs
50 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
56 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
57 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
58 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
59 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
60 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
61 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
62 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
63 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
64 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
68 // These definitions were in the old Hii protocol, but are not in the new UEFI
69 // version. So they are defined locally.
71 #define UNICODE_NARROW_CHAR 0xFFF0
72 #define UNICODE_WIDE_CHAR 0xFFF1
76 // Private Data Structures
78 #define CONSOLE_SPLITTER_ALLOC_UNIT 32
89 } TEXT_OUT_SPLITTER_QUERY_DATA
;
91 #define KEY_STATE_VALID_EXPOSED (EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED)
93 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
96 // Private data for Text In Ex Splitter Notify
98 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
100 VOID
**NotifyHandleList
;
101 EFI_KEY_DATA KeyData
;
102 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
103 LIST_ENTRY NotifyEntry
;
104 } TEXT_IN_EX_SPLITTER_NOTIFY
;
106 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
108 TEXT_IN_EX_SPLITTER_NOTIFY, \
110 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
113 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
116 // Private data for the Console In splitter
120 EFI_HANDLE VirtualHandle
;
122 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
123 UINTN CurrentNumberOfConsoles
;
124 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
125 UINTN TextInListCount
;
127 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
128 UINTN CurrentNumberOfExConsoles
;
129 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
130 UINTN TextInExListCount
;
131 LIST_ENTRY NotifyList
;
132 EFI_KEY_DATA
*KeyQueue
;
133 UINTN CurrentNumberOfKeys
;
135 // It will be initialized and synced between console input devices
136 // for toggle state sync.
138 EFI_KEY_TOGGLE_STATE PhysicalKeyToggleState
;
140 // It will be initialized and used to record if virtual KeyState
141 // has been required to be exposed.
143 BOOLEAN VirtualKeyStateExported
;
146 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
147 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
148 UINTN CurrentNumberOfPointers
;
149 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
150 UINTN PointerListCount
;
152 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
153 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
154 UINTN CurrentNumberOfAbsolutePointers
;
155 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
156 UINTN AbsolutePointerListCount
;
157 BOOLEAN AbsoluteInputEventSignalState
;
159 BOOLEAN KeyEventSignalState
;
160 BOOLEAN InputEventSignalState
;
161 EFI_EVENT ConnectConInEvent
;
162 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
164 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
166 TEXT_IN_SPLITTER_PRIVATE_DATA, \
168 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
171 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
173 TEXT_IN_SPLITTER_PRIVATE_DATA, \
175 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
177 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
179 TEXT_IN_SPLITTER_PRIVATE_DATA, \
181 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
184 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
186 TEXT_IN_SPLITTER_PRIVATE_DATA, \
188 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
192 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
195 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
196 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
197 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
198 } TEXT_OUT_AND_GOP_DATA
;
201 // Private data for the Console Out splitter
205 EFI_HANDLE VirtualHandle
;
206 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
207 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
209 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
210 UINT32 UgaHorizontalResolution
;
211 UINT32 UgaVerticalResolution
;
212 UINT32 UgaColorDepth
;
213 UINT32 UgaRefreshRate
;
215 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
216 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
217 UINTN CurrentNumberOfGraphicsOutput
;
218 UINTN CurrentNumberOfUgaDraw
;
220 UINTN CurrentNumberOfConsoles
;
221 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
222 UINTN TextOutListCount
;
223 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
224 UINTN TextOutQueryDataCount
;
225 INT32
*TextOutModeMap
;
227 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
229 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
231 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
233 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
236 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
238 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
240 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
243 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
245 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
247 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
250 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
252 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
254 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
258 // Function Prototypes
262 The user Entry Point for module ConSplitter. The user code starts with this function.
264 Installs driver module protocols and. Creates virtual device handles for ConIn,
265 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
266 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
267 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
269 @param[in] ImageHandle The firmware allocated handle for the EFI image.
270 @param[in] SystemTable A pointer to the EFI System Table.
272 @retval EFI_SUCCESS The entry point is executed successfully.
273 @retval other Some error occurs when executing this entry point.
278 ConSplitterDriverEntry (
279 IN EFI_HANDLE ImageHandle
,
280 IN EFI_SYSTEM_TABLE
*SystemTable
284 Construct console input devices' private data.
286 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
289 @retval EFI_OUT_OF_RESOURCES Out of resources.
290 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
291 @retval other Failed to construct private data.
295 ConSplitterTextInConstructor (
296 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
300 Construct console output devices' private data.
302 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
305 @retval EFI_OUT_OF_RESOURCES Out of resources.
306 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
310 ConSplitterTextOutConstructor (
311 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
316 Test to see if Console In Device could be supported on the Controller.
318 @param This Driver Binding protocol instance pointer.
319 @param ControllerHandle Handle of device to test.
320 @param RemainingDevicePath Optional parameter use to pick a specific child
323 @retval EFI_SUCCESS This driver supports this device.
324 @retval other This driver does not support this device.
329 ConSplitterConInDriverBindingSupported (
330 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
331 IN EFI_HANDLE ControllerHandle
,
332 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
336 Test to see if Simple Pointer protocol could be supported on the Controller.
338 @param This Driver Binding protocol instance pointer.
339 @param ControllerHandle Handle of device to test.
340 @param RemainingDevicePath Optional parameter use to pick a specific child
343 @retval EFI_SUCCESS This driver supports this device.
344 @retval other This driver does not support this device.
349 ConSplitterSimplePointerDriverBindingSupported (
350 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
351 IN EFI_HANDLE ControllerHandle
,
352 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
356 Test to see if Console Out Device could be supported on the Controller.
358 @param This Driver Binding protocol instance pointer.
359 @param ControllerHandle Handle of device to test.
360 @param RemainingDevicePath Optional parameter use to pick a specific child
363 @retval EFI_SUCCESS This driver supports this device.
364 @retval other This driver does not support this device.
369 ConSplitterConOutDriverBindingSupported (
370 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
371 IN EFI_HANDLE ControllerHandle
,
372 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
376 Test to see if Standard Error Device could be supported on the Controller.
378 @param This Driver Binding protocol instance pointer.
379 @param ControllerHandle Handle of device to test.
380 @param RemainingDevicePath Optional parameter use to pick a specific child
383 @retval EFI_SUCCESS This driver supports this device.
384 @retval other This driver does not support this device.
389 ConSplitterStdErrDriverBindingSupported (
390 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
391 IN EFI_HANDLE ControllerHandle
,
392 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
396 Start Console In Consplitter on device handle.
398 @param This Driver Binding protocol instance pointer.
399 @param ControllerHandle Handle of device to bind driver to.
400 @param RemainingDevicePath Optional parameter use to pick a specific child
403 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
404 @retval other Console In Consplitter does not support this device.
409 ConSplitterConInDriverBindingStart (
410 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
411 IN EFI_HANDLE ControllerHandle
,
412 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
416 Start Simple Pointer Consplitter on device handle.
418 @param This Driver Binding protocol instance pointer.
419 @param ControllerHandle Handle of device to bind driver to.
420 @param RemainingDevicePath Optional parameter use to pick a specific child
423 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
424 @retval other Simple Pointer Consplitter does not support this device.
429 ConSplitterSimplePointerDriverBindingStart (
430 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
431 IN EFI_HANDLE ControllerHandle
,
432 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
436 Start Console Out Consplitter on device handle.
438 @param This Driver Binding protocol instance pointer.
439 @param ControllerHandle Handle of device to bind driver to.
440 @param RemainingDevicePath Optional parameter use to pick a specific child
443 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
444 @retval other Console Out Consplitter does not support this device.
449 ConSplitterConOutDriverBindingStart (
450 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
451 IN EFI_HANDLE ControllerHandle
,
452 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
456 Start Standard Error Consplitter on device handle.
458 @param This Driver Binding protocol instance pointer.
459 @param ControllerHandle Handle of device to bind driver to.
460 @param RemainingDevicePath Optional parameter use to pick a specific child
463 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
464 @retval other Standard Error Consplitter does not support this device.
469 ConSplitterStdErrDriverBindingStart (
470 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
471 IN EFI_HANDLE ControllerHandle
,
472 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
476 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
478 @param This Driver Binding protocol instance pointer.
479 @param ControllerHandle Handle of device to stop driver on
480 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
481 children is zero stop the entire bus driver.
482 @param ChildHandleBuffer List of Child Handles to Stop.
484 @retval EFI_SUCCESS This driver is removed ControllerHandle
485 @retval other This driver was not removed from this device
490 ConSplitterConInDriverBindingStop (
491 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
492 IN EFI_HANDLE ControllerHandle
,
493 IN UINTN NumberOfChildren
,
494 IN EFI_HANDLE
*ChildHandleBuffer
498 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
499 Simple Pointer protocol.
501 @param This Driver Binding protocol instance pointer.
502 @param ControllerHandle Handle of device to stop driver on
503 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
504 children is zero stop the entire bus driver.
505 @param ChildHandleBuffer List of Child Handles to Stop.
507 @retval EFI_SUCCESS This driver is removed ControllerHandle
508 @retval other This driver was not removed from this device
513 ConSplitterSimplePointerDriverBindingStop (
514 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
515 IN EFI_HANDLE ControllerHandle
,
516 IN UINTN NumberOfChildren
,
517 IN EFI_HANDLE
*ChildHandleBuffer
521 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
523 @param This Driver Binding protocol instance pointer.
524 @param ControllerHandle Handle of device to stop driver on
525 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
526 children is zero stop the entire bus driver.
527 @param ChildHandleBuffer List of Child Handles to Stop.
529 @retval EFI_SUCCESS This driver is removed ControllerHandle
530 @retval other This driver was not removed from this device
535 ConSplitterConOutDriverBindingStop (
536 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
537 IN EFI_HANDLE ControllerHandle
,
538 IN UINTN NumberOfChildren
,
539 IN EFI_HANDLE
*ChildHandleBuffer
543 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
545 @param This Driver Binding protocol instance pointer.
546 @param ControllerHandle Handle of device to stop driver on
547 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
548 children is zero stop the entire bus driver.
549 @param ChildHandleBuffer List of Child Handles to Stop.
551 @retval EFI_SUCCESS This driver is removed ControllerHandle
552 @retval other This driver was not removed from this device
557 ConSplitterStdErrDriverBindingStop (
558 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
559 IN EFI_HANDLE ControllerHandle
,
560 IN UINTN NumberOfChildren
,
561 IN EFI_HANDLE
*ChildHandleBuffer
566 Test to see if Absolute Pointer protocol could be supported on the Controller.
568 @param This Driver Binding protocol instance pointer.
569 @param ControllerHandle Handle of device to test.
570 @param RemainingDevicePath Optional parameter use to pick a specific child
573 @retval EFI_SUCCESS This driver supports this device.
574 @retval other This driver does not support this device.
579 ConSplitterAbsolutePointerDriverBindingSupported (
580 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
581 IN EFI_HANDLE ControllerHandle
,
582 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
586 Start Absolute Pointer Consplitter on device handle.
588 @param This Driver Binding protocol instance pointer.
589 @param ControllerHandle Handle of device to bind driver to.
590 @param RemainingDevicePath Optional parameter use to pick a specific child
593 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
594 @retval other Absolute Pointer Consplitter does not support this device.
599 ConSplitterAbsolutePointerDriverBindingStart (
600 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
601 IN EFI_HANDLE ControllerHandle
,
602 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
606 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
607 Absolute Pointer protocol.
609 @param This Driver Binding protocol instance pointer.
610 @param ControllerHandle Handle of device to stop driver on
611 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
612 children is zero stop the entire bus driver.
613 @param ChildHandleBuffer List of Child Handles to Stop.
615 @retval EFI_SUCCESS This driver is removed ControllerHandle
616 @retval other This driver was not removed from this device
621 ConSplitterAbsolutePointerDriverBindingStop (
622 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
623 IN EFI_HANDLE ControllerHandle
,
624 IN UINTN NumberOfChildren
,
625 IN EFI_HANDLE
*ChildHandleBuffer
629 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
631 @param Private Text In Splitter pointer.
632 @param AbsolutePointer Absolute Pointer protocol pointer.
634 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
635 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
639 ConSplitterAbsolutePointerAddDevice (
640 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
641 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
645 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
647 @param Private Text In Splitter pointer.
648 @param AbsolutePointer Absolute Pointer protocol pointer.
650 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
651 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
655 ConSplitterAbsolutePointerDeleteDevice (
656 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
657 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
661 // Absolute Pointer protocol interfaces
666 Resets the pointer device hardware.
668 @param This Protocol instance pointer.
669 @param ExtendedVerification Driver may perform diagnostics on reset.
671 @retval EFI_SUCCESS The device was reset.
672 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
678 ConSplitterAbsolutePointerReset (
679 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
680 IN BOOLEAN ExtendedVerification
685 Retrieves the current state of a pointer device.
687 @param This Protocol instance pointer.
688 @param State A pointer to the state information on the
691 @retval EFI_SUCCESS The state of the pointer device was returned in
693 @retval EFI_NOT_READY The state of the pointer device has not changed
694 since the last call to GetState().
695 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
696 retrieve the pointer device's current state.
701 ConSplitterAbsolutePointerGetState (
702 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
703 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
707 This event agregates all the events of the pointer devices in the splitter.
709 If any events of physical pointer devices are signaled, signal the pointer
710 splitter event. This will cause the calling code to call
711 ConSplitterAbsolutePointerGetState ().
713 @param Event The Event assoicated with callback.
714 @param Context Context registered when Event was created.
719 ConSplitterAbsolutePointerWaitForInput (
725 Retrieves a Unicode string that is the user readable name of the driver.
727 This function retrieves the user readable name of a driver in the form of a
728 Unicode string. If the driver specified by This has a user readable name in
729 the language specified by Language, then a pointer to the driver name is
730 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
731 by This does not support the language specified by Language,
732 then EFI_UNSUPPORTED is returned.
734 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
735 EFI_COMPONENT_NAME_PROTOCOL instance.
737 @param Language[in] A pointer to a Null-terminated ASCII string
738 array indicating the language. This is the
739 language of the driver name that the caller is
740 requesting, and it must match one of the
741 languages specified in SupportedLanguages. The
742 number of languages supported by a driver is up
743 to the driver writer. Language is specified
744 in RFC 4646 or ISO 639-2 language code format.
746 @param DriverName[out] A pointer to the Unicode string to return.
747 This Unicode string is the name of the
748 driver specified by This in the language
749 specified by Language.
751 @retval EFI_SUCCESS The Unicode string for the Driver specified by
752 This and the language specified by Language was
753 returned in DriverName.
755 @retval EFI_INVALID_PARAMETER Language is NULL.
757 @retval EFI_INVALID_PARAMETER DriverName is NULL.
759 @retval EFI_UNSUPPORTED The driver specified by This does not support
760 the language specified by Language.
765 ConSplitterComponentNameGetDriverName (
766 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
768 OUT CHAR16
**DriverName
773 Retrieves a Unicode string that is the user readable name of the controller
774 that is being managed by a driver.
776 This function retrieves the user readable name of the controller specified by
777 ControllerHandle and ChildHandle in the form of a Unicode string. If the
778 driver specified by This has a user readable name in the language specified by
779 Language, then a pointer to the controller name is returned in ControllerName,
780 and EFI_SUCCESS is returned. If the driver specified by This is not currently
781 managing the controller specified by ControllerHandle and ChildHandle,
782 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
783 support the language specified by Language, then EFI_UNSUPPORTED is returned.
785 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
786 EFI_COMPONENT_NAME_PROTOCOL instance.
788 @param ControllerHandle[in] The handle of a controller that the driver
789 specified by This is managing. This handle
790 specifies the controller whose name is to be
793 @param ChildHandle[in] The handle of the child controller to retrieve
794 the name of. This is an optional parameter that
795 may be NULL. It will be NULL for device
796 drivers. It will also be NULL for a bus drivers
797 that wish to retrieve the name of the bus
798 controller. It will not be NULL for a bus
799 driver that wishes to retrieve the name of a
802 @param Language[in] A pointer to a Null-terminated ASCII string
803 array indicating the language. This is the
804 language of the driver name that the caller is
805 requesting, and it must match one of the
806 languages specified in SupportedLanguages. The
807 number of languages supported by a driver is up
808 to the driver writer. Language is specified in
809 RFC 4646 or ISO 639-2 language code format.
811 @param ControllerName[out] A pointer to the Unicode string to return.
812 This Unicode string is the name of the
813 controller specified by ControllerHandle and
814 ChildHandle in the language specified by
815 Language from the point of view of the driver
818 @retval EFI_SUCCESS The Unicode string for the user readable name in
819 the language specified by Language for the
820 driver specified by This was returned in
823 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
825 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
828 @retval EFI_INVALID_PARAMETER Language is NULL.
830 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
832 @retval EFI_UNSUPPORTED The driver specified by This is not currently
833 managing the controller specified by
834 ControllerHandle and ChildHandle.
836 @retval EFI_UNSUPPORTED The driver specified by This does not support
837 the language specified by Language.
842 ConSplitterConInComponentNameGetControllerName (
843 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
844 IN EFI_HANDLE ControllerHandle
,
845 IN EFI_HANDLE ChildHandle OPTIONAL
,
847 OUT CHAR16
**ControllerName
852 Retrieves a Unicode string that is the user readable name of the controller
853 that is being managed by a driver.
855 This function retrieves the user readable name of the controller specified by
856 ControllerHandle and ChildHandle in the form of a Unicode string. If the
857 driver specified by This has a user readable name in the language specified by
858 Language, then a pointer to the controller name is returned in ControllerName,
859 and EFI_SUCCESS is returned. If the driver specified by This is not currently
860 managing the controller specified by ControllerHandle and ChildHandle,
861 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
862 support the language specified by Language, then EFI_UNSUPPORTED is returned.
864 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
865 EFI_COMPONENT_NAME_PROTOCOL instance.
867 @param ControllerHandle[in] The handle of a controller that the driver
868 specified by This is managing. This handle
869 specifies the controller whose name is to be
872 @param ChildHandle[in] The handle of the child controller to retrieve
873 the name of. This is an optional parameter that
874 may be NULL. It will be NULL for device
875 drivers. It will also be NULL for a bus drivers
876 that wish to retrieve the name of the bus
877 controller. It will not be NULL for a bus
878 driver that wishes to retrieve the name of a
881 @param Language[in] A pointer to a Null-terminated ASCII string
882 array indicating the language. This is the
883 language of the driver name that the caller is
884 requesting, and it must match one of the
885 languages specified in SupportedLanguages. The
886 number of languages supported by a driver is up
887 to the driver writer. Language is specified in
888 RFC 4646 or ISO 639-2 language code format.
890 @param ControllerName[out] A pointer to the Unicode string to return.
891 This Unicode string is the name of the
892 controller specified by ControllerHandle and
893 ChildHandle in the language specified by
894 Language from the point of view of the driver
897 @retval EFI_SUCCESS The Unicode string for the user readable name in
898 the language specified by Language for the
899 driver specified by This was returned in
902 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
904 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
907 @retval EFI_INVALID_PARAMETER Language is NULL.
909 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
911 @retval EFI_UNSUPPORTED The driver specified by This is not currently
912 managing the controller specified by
913 ControllerHandle and ChildHandle.
915 @retval EFI_UNSUPPORTED The driver specified by This does not support
916 the language specified by Language.
921 ConSplitterSimplePointerComponentNameGetControllerName (
922 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
923 IN EFI_HANDLE ControllerHandle
,
924 IN EFI_HANDLE ChildHandle OPTIONAL
,
926 OUT CHAR16
**ControllerName
930 Retrieves a Unicode string that is the user readable name of the controller
931 that is being managed by an EFI Driver.
933 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
935 @param ControllerHandle The handle of a controller that the driver
936 specified by This is managing. This handle
937 specifies the controller whose name is to be
939 @param ChildHandle The handle of the child controller to retrieve the
940 name of. This is an optional parameter that may
941 be NULL. It will be NULL for device drivers. It
942 will also be NULL for a bus drivers that wish to
943 retrieve the name of the bus controller. It will
944 not be NULL for a bus driver that wishes to
945 retrieve the name of a child controller.
946 @param Language A pointer to RFC4646 language identifier. This is
947 the language of the controller name that that the
948 caller is requesting, and it must match one of the
949 languages specified in SupportedLanguages. The
950 number of languages supported by a driver is up to
952 @param ControllerName A pointer to the Unicode string to return. This
953 Unicode string is the name of the controller
954 specified by ControllerHandle and ChildHandle in
955 the language specified by Language from the point
956 of view of the driver specified by This.
958 @retval EFI_SUCCESS The Unicode string for the user readable name in
959 the language specified by Language for the driver
960 specified by This was returned in DriverName.
961 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
962 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
964 @retval EFI_INVALID_PARAMETER Language is NULL.
965 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
966 @retval EFI_UNSUPPORTED The driver specified by This is not currently
967 managing the controller specified by
968 ControllerHandle and ChildHandle.
969 @retval EFI_UNSUPPORTED The driver specified by This does not support the
970 language specified by Language.
975 ConSplitterAbsolutePointerComponentNameGetControllerName (
976 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
977 IN EFI_HANDLE ControllerHandle
,
978 IN EFI_HANDLE ChildHandle OPTIONAL
,
980 OUT CHAR16
**ControllerName
984 Retrieves a Unicode string that is the user readable name of the controller
985 that is being managed by a driver.
987 This function retrieves the user readable name of the controller specified by
988 ControllerHandle and ChildHandle in the form of a Unicode string. If the
989 driver specified by This has a user readable name in the language specified by
990 Language, then a pointer to the controller name is returned in ControllerName,
991 and EFI_SUCCESS is returned. If the driver specified by This is not currently
992 managing the controller specified by ControllerHandle and ChildHandle,
993 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
994 support the language specified by Language, then EFI_UNSUPPORTED is returned.
996 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
997 EFI_COMPONENT_NAME_PROTOCOL instance.
999 @param ControllerHandle[in] The handle of a controller that the driver
1000 specified by This is managing. This handle
1001 specifies the controller whose name is to be
1004 @param ChildHandle[in] The handle of the child controller to retrieve
1005 the name of. This is an optional parameter that
1006 may be NULL. It will be NULL for device
1007 drivers. It will also be NULL for a bus drivers
1008 that wish to retrieve the name of the bus
1009 controller. It will not be NULL for a bus
1010 driver that wishes to retrieve the name of a
1013 @param Language[in] A pointer to a Null-terminated ASCII string
1014 array indicating the language. This is the
1015 language of the driver name that the caller is
1016 requesting, and it must match one of the
1017 languages specified in SupportedLanguages. The
1018 number of languages supported by a driver is up
1019 to the driver writer. Language is specified in
1020 RFC 4646 or ISO 639-2 language code format.
1022 @param ControllerName[out] A pointer to the Unicode string to return.
1023 This Unicode string is the name of the
1024 controller specified by ControllerHandle and
1025 ChildHandle in the language specified by
1026 Language from the point of view of the driver
1029 @retval EFI_SUCCESS The Unicode string for the user readable name in
1030 the language specified by Language for the
1031 driver specified by This was returned in
1034 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1036 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1039 @retval EFI_INVALID_PARAMETER Language is NULL.
1041 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1043 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1044 managing the controller specified by
1045 ControllerHandle and ChildHandle.
1047 @retval EFI_UNSUPPORTED The driver specified by This does not support
1048 the language specified by Language.
1053 ConSplitterConOutComponentNameGetControllerName (
1054 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1055 IN EFI_HANDLE ControllerHandle
,
1056 IN EFI_HANDLE ChildHandle OPTIONAL
,
1058 OUT CHAR16
**ControllerName
1063 Retrieves a Unicode string that is the user readable name of the controller
1064 that is being managed by a driver.
1066 This function retrieves the user readable name of the controller specified by
1067 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1068 driver specified by This has a user readable name in the language specified by
1069 Language, then a pointer to the controller name is returned in ControllerName,
1070 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1071 managing the controller specified by ControllerHandle and ChildHandle,
1072 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1073 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1075 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1076 EFI_COMPONENT_NAME_PROTOCOL instance.
1078 @param ControllerHandle[in] The handle of a controller that the driver
1079 specified by This is managing. This handle
1080 specifies the controller whose name is to be
1083 @param ChildHandle[in] The handle of the child controller to retrieve
1084 the name of. This is an optional parameter that
1085 may be NULL. It will be NULL for device
1086 drivers. It will also be NULL for a bus drivers
1087 that wish to retrieve the name of the bus
1088 controller. It will not be NULL for a bus
1089 driver that wishes to retrieve the name of a
1092 @param Language[in] A pointer to a Null-terminated ASCII string
1093 array indicating the language. This is the
1094 language of the driver name that the caller is
1095 requesting, and it must match one of the
1096 languages specified in SupportedLanguages. The
1097 number of languages supported by a driver is up
1098 to the driver writer. Language is specified in
1099 RFC 4646 or ISO 639-2 language code format.
1101 @param ControllerName[out] A pointer to the Unicode string to return.
1102 This Unicode string is the name of the
1103 controller specified by ControllerHandle and
1104 ChildHandle in the language specified by
1105 Language from the point of view of the driver
1108 @retval EFI_SUCCESS The Unicode string for the user readable name in
1109 the language specified by Language for the
1110 driver specified by This was returned in
1113 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1115 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1118 @retval EFI_INVALID_PARAMETER Language is NULL.
1120 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1122 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1123 managing the controller specified by
1124 ControllerHandle and ChildHandle.
1126 @retval EFI_UNSUPPORTED The driver specified by This does not support
1127 the language specified by Language.
1132 ConSplitterStdErrComponentNameGetControllerName (
1133 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1134 IN EFI_HANDLE ControllerHandle
,
1135 IN EFI_HANDLE ChildHandle OPTIONAL
,
1137 OUT CHAR16
**ControllerName
1142 // TextIn Constructor/Destructor functions
1146 Add Text Input Device in Consplitter Text Input list.
1148 @param Private Text In Splitter pointer.
1149 @param TextIn Simple Text Input protocol pointer.
1151 @retval EFI_SUCCESS Text Input Device added successfully.
1152 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1156 ConSplitterTextInAddDevice (
1157 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1158 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1162 Remove Text Input Device from Consplitter Text Input list.
1164 @param Private Text In Splitter pointer.
1165 @param TextIn Simple Text protocol pointer.
1167 @retval EFI_SUCCESS Simple Text Device removed successfully.
1168 @retval EFI_NOT_FOUND No Simple Text Device found.
1172 ConSplitterTextInDeleteDevice (
1173 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1174 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1178 // SimplePointer Constuctor/Destructor functions
1182 Add Simple Pointer Device in Consplitter Simple Pointer list.
1184 @param Private Text In Splitter pointer.
1185 @param SimplePointer Simple Pointer protocol pointer.
1187 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1188 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1192 ConSplitterSimplePointerAddDevice (
1193 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1194 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1198 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1200 @param Private Text In Splitter pointer.
1201 @param SimplePointer Simple Pointer protocol pointer.
1203 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1204 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1208 ConSplitterSimplePointerDeleteDevice (
1209 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1210 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1214 // TextOut Constuctor/Destructor functions
1218 Add Text Output Device in Consplitter Text Output list.
1220 @param Private Text Out Splitter pointer.
1221 @param TextOut Simple Text Output protocol pointer.
1222 @param GraphicsOutput Graphics Output protocol pointer.
1223 @param UgaDraw UGA Draw protocol pointer.
1225 @retval EFI_SUCCESS Text Output Device added successfully.
1226 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1230 ConSplitterTextOutAddDevice (
1231 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1232 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1233 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1234 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1238 Remove Text Out Device in Consplitter Text Out list.
1240 @param Private Text Out Splitter pointer.
1241 @param TextOut Simple Text Output Pointer protocol pointer.
1243 @retval EFI_SUCCESS Text Out Device removed successfully.
1244 @retval EFI_NOT_FOUND No Text Out Device found.
1248 ConSplitterTextOutDeleteDevice (
1249 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1250 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1254 // TextIn I/O Functions
1258 Reset the input device and optionaly run diagnostics
1260 @param This Protocol instance pointer.
1261 @param ExtendedVerification Driver may perform diagnostics on reset.
1263 @retval EFI_SUCCESS The device was reset.
1264 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1270 ConSplitterTextInReset (
1271 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1272 IN BOOLEAN ExtendedVerification
1276 Reads the next keystroke from the input device. The WaitForKey Event can
1277 be used to test for existance of a keystroke via WaitForEvent () call.
1279 @param This Protocol instance pointer.
1280 @param Key Driver may perform diagnostics on reset.
1282 @retval EFI_SUCCESS The keystroke information was returned.
1283 @retval EFI_NOT_READY There was no keystroke data availiable.
1284 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1290 ConSplitterTextInReadKeyStroke (
1291 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1292 OUT EFI_INPUT_KEY
*Key
1296 Add Text Input Ex Device in Consplitter Text Input Ex list.
1298 @param Private Text In Splitter pointer.
1299 @param TextInEx Simple Text Input Ex Input protocol pointer.
1301 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1302 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1306 ConSplitterTextInExAddDevice (
1307 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1308 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1312 Remove Text Ex Device from Consplitter Text Input Ex list.
1314 @param Private Text In Splitter pointer.
1315 @param TextInEx Simple Text Ex protocol pointer.
1317 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1318 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1322 ConSplitterTextInExDeleteDevice (
1323 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1324 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1328 // Simple Text Input Ex protocol function prototypes
1332 Reset the input device and optionaly run diagnostics
1334 @param This Protocol instance pointer.
1335 @param ExtendedVerification Driver may perform diagnostics on reset.
1337 @retval EFI_SUCCESS The device was reset.
1338 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1344 ConSplitterTextInResetEx (
1345 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1346 IN BOOLEAN ExtendedVerification
1351 Reads the next keystroke from the input device. The WaitForKey Event can
1352 be used to test for existance of a keystroke via WaitForEvent () call.
1354 @param This Protocol instance pointer.
1355 @param KeyData A pointer to a buffer that is filled in with the
1356 keystroke state data for the key that was
1359 @retval EFI_SUCCESS The keystroke information was returned.
1360 @retval EFI_NOT_READY There was no keystroke data availiable.
1361 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1363 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1368 ConSplitterTextInReadKeyStrokeEx (
1369 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1370 OUT EFI_KEY_DATA
*KeyData
1375 Set certain state for the input device.
1377 @param This Protocol instance pointer.
1378 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1379 state for the input device.
1381 @retval EFI_SUCCESS The device state was set successfully.
1382 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1383 could not have the setting adjusted.
1384 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1386 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1391 ConSplitterTextInSetState (
1392 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1393 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1398 Register a notification function for a particular keystroke for the input device.
1400 @param This Protocol instance pointer.
1401 @param KeyData A pointer to a buffer that is filled in with
1402 the keystroke information for the key that was
1403 pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState
1404 and KeyData.KeyState.KeyShiftState are 0, then any incomplete
1405 keystroke will trigger a notification of the KeyNotificationFunction.
1406 @param KeyNotificationFunction Points to the function to be called when the key
1407 sequence is typed specified by KeyData. This notification function
1408 should be called at <=TPL_CALLBACK.
1409 @param NotifyHandle Points to the unique handle assigned to the
1410 registered notification.
1412 @retval EFI_SUCCESS The notification function was registered
1414 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1416 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1421 ConSplitterTextInRegisterKeyNotify (
1422 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1423 IN EFI_KEY_DATA
*KeyData
,
1424 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1425 OUT VOID
**NotifyHandle
1430 Remove a registered notification function from a particular keystroke.
1432 @param This Protocol instance pointer.
1433 @param NotificationHandle The handle of the notification function being
1436 @retval EFI_SUCCESS The notification function was unregistered
1438 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1439 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1444 ConSplitterTextInUnregisterKeyNotify (
1445 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1446 IN VOID
*NotificationHandle
1450 This event aggregates all the events of the ConIn devices in the spliter.
1452 If any events of physical ConIn devices are signaled, signal the ConIn
1453 spliter event. This will cause the calling code to call
1454 ConSplitterTextInReadKeyStroke ().
1456 @param Event The Event assoicated with callback.
1457 @param Context Context registered when Event was created.
1462 ConSplitterTextInWaitForKey (
1469 Reads the next keystroke from the input device. The WaitForKey Event can
1470 be used to test for existance of a keystroke via WaitForEvent () call.
1472 @param Private Protocol instance pointer.
1473 @param Key Driver may perform diagnostics on reset.
1475 @retval EFI_SUCCESS The keystroke information was returned.
1476 @retval EFI_NOT_READY There was no keystroke data availiable.
1477 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1483 ConSplitterTextInPrivateReadKeyStroke (
1484 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1485 OUT EFI_INPUT_KEY
*Key
1489 Reset the input device and optionaly run diagnostics
1491 @param This Protocol instance pointer.
1492 @param ExtendedVerification Driver may perform diagnostics on reset.
1494 @retval EFI_SUCCESS The device was reset.
1495 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1501 ConSplitterSimplePointerReset (
1502 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1503 IN BOOLEAN ExtendedVerification
1507 Reads the next keystroke from the input device. The WaitForKey Event can
1508 be used to test for existance of a keystroke via WaitForEvent () call.
1510 @param This A pointer to protocol instance.
1511 @param State A pointer to state information on the pointer device
1513 @retval EFI_SUCCESS The keystroke information was returned in State.
1514 @retval EFI_NOT_READY There was no keystroke data availiable.
1515 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1521 ConSplitterSimplePointerGetState (
1522 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1523 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1527 This event agregates all the events of the ConIn devices in the spliter.
1528 If any events of physical ConIn devices are signaled, signal the ConIn
1529 spliter event. This will cause the calling code to call
1530 ConSplitterTextInReadKeyStroke ().
1532 @param Event The Event assoicated with callback.
1533 @param Context Context registered when Event was created.
1538 ConSplitterSimplePointerWaitForInput (
1544 // TextOut I/O Functions
1548 Reset the text output device hardware and optionaly run diagnostics
1550 @param This Protocol instance pointer.
1551 @param ExtendedVerification Driver may perform more exhaustive verfication
1552 operation of the device during reset.
1554 @retval EFI_SUCCESS The text output device was reset.
1555 @retval EFI_DEVICE_ERROR The text output device is not functioning
1556 correctly and could not be reset.
1561 ConSplitterTextOutReset (
1562 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1563 IN BOOLEAN ExtendedVerification
1567 Write a Unicode string to the output device.
1569 @param This Protocol instance pointer.
1570 @param WString The NULL-terminated Unicode string to be
1571 displayed on the output device(s). All output
1572 devices must also support the Unicode drawing
1573 defined in this file.
1575 @retval EFI_SUCCESS The string was output to the device.
1576 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1578 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1580 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1581 characters in the Unicode string could not be
1582 rendered and were skipped.
1587 ConSplitterTextOutOutputString (
1588 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1593 Verifies that all characters in a Unicode string can be output to the
1596 @param This Protocol instance pointer.
1597 @param WString The NULL-terminated Unicode string to be
1598 examined for the output device(s).
1600 @retval EFI_SUCCESS The device(s) are capable of rendering the
1602 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1603 cannot be rendered by one or more of the output
1604 devices mapped by the EFI handle.
1609 ConSplitterTextOutTestString (
1610 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1615 Returns information for an available text mode that the output device(s)
1618 @param This Protocol instance pointer.
1619 @param ModeNumber The mode number to return information on.
1620 @param Columns Returns the columns of the text output device
1621 for the requested ModeNumber.
1622 @param Rows Returns the rows of the text output device
1623 for the requested ModeNumber.
1625 @retval EFI_SUCCESS The requested mode information was returned.
1626 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1628 @retval EFI_UNSUPPORTED The mode number was not valid.
1633 ConSplitterTextOutQueryMode (
1634 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1635 IN UINTN ModeNumber
,
1641 Sets the output device(s) to a specified mode.
1643 @param This Protocol instance pointer.
1644 @param ModeNumber The mode number to set.
1646 @retval EFI_SUCCESS The requested text mode was set.
1647 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1649 @retval EFI_UNSUPPORTED The mode number was not valid.
1654 ConSplitterTextOutSetMode (
1655 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1660 Sets the background and foreground colors for the OutputString () and
1661 ClearScreen () functions.
1663 @param This Protocol instance pointer.
1664 @param Attribute The attribute to set. Bits 0..3 are the
1665 foreground color, and bits 4..6 are the
1666 background color. All other bits are undefined
1667 and must be zero. The valid Attributes are
1668 defined in this file.
1670 @retval EFI_SUCCESS The attribute was set.
1671 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1673 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1678 ConSplitterTextOutSetAttribute (
1679 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1684 Clears the output device(s) display to the currently selected background
1687 @param This Protocol instance pointer.
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.
1697 ConSplitterTextOutClearScreen (
1698 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1702 Sets the current coordinates of the cursor position
1704 @param This Protocol instance pointer.
1705 @param Column The column position to set the cursor to. Must be
1706 greater than or equal to zero and less than the
1707 number of columns by QueryMode ().
1708 @param Row The row position to set the cursor to. Must be
1709 greater than or equal to zero and less than the
1710 number of rows by QueryMode ().
1712 @retval EFI_SUCCESS The operation completed successfully.
1713 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1715 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1716 or the cursor position is invalid for the
1722 ConSplitterTextOutSetCursorPosition (
1723 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1730 Makes the cursor visible or invisible
1732 @param This Protocol instance pointer.
1733 @param Visible If TRUE, the cursor is set to be visible. If
1734 FALSE, the cursor is set to be invisible.
1736 @retval EFI_SUCCESS The operation completed successfully.
1737 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1738 the request, or the device does not support
1739 changing the cursor mode.
1740 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1745 ConSplitterTextOutEnableCursor (
1746 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1751 Take the passed in Buffer of size ElementSize and grow the buffer
1752 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1753 Copy the current data in Buffer to the new version of Buffer and
1754 free the old version of buffer.
1756 @param ElementSize Size of element in array.
1757 @param Count Current number of elements in array.
1758 @param Buffer Bigger version of passed in Buffer with all the
1761 @retval EFI_SUCCESS Buffer size has grown.
1762 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1766 ConSplitterGrowBuffer (
1767 IN UINTN ElementSize
,
1768 IN OUT UINTN
*Count
,
1769 IN OUT VOID
**Buffer
1773 Returns information for an available graphics mode that the graphics device
1774 and the set of active video output devices supports.
1776 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1777 @param ModeNumber The mode number to return information on.
1778 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1779 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1781 @retval EFI_SUCCESS Mode information returned.
1782 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1783 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1784 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1785 @retval EFI_OUT_OF_RESOURCES No resource available.
1790 ConSplitterGraphicsOutputQueryMode (
1791 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1792 IN UINT32 ModeNumber
,
1793 OUT UINTN
*SizeOfInfo
,
1794 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1798 Set the video device into the specified mode and clears the visible portions of
1799 the output display to black.
1801 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1802 @param ModeNumber Abstraction that defines the current video mode.
1804 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1805 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1806 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1807 @retval EFI_OUT_OF_RESOURCES No resource available.
1812 ConSplitterGraphicsOutputSetMode (
1813 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1814 IN UINT32 ModeNumber
1818 The following table defines actions for BltOperations.
1820 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1821 directly to every pixel of the video display rectangle
1822 (DestinationX, DestinationY)
1823 (DestinationX + Width, DestinationY + Height).
1824 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1825 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1826 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1827 the BltBuffer rectangle (DestinationX, DestinationY )
1828 (DestinationX + Width, DestinationY + Height). If DestinationX or
1829 DestinationY is not zero then Delta must be set to the length in bytes
1830 of a row in the BltBuffer.
1831 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1832 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1833 video display rectangle (DestinationX, DestinationY)
1834 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1835 not zero then Delta must be set to the length in bytes of a row in the
1837 EfiBltVideoToVideo - Copy from the video display rectangle
1838 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1839 to the video display rectangle (DestinationX, DestinationY)
1840 (DestinationX + Width, DestinationY + Height).
1841 The BltBuffer and Delta are not used in this mode.
1843 @param This Protocol instance pointer.
1844 @param BltBuffer Buffer containing data to blit into video buffer.
1845 This buffer has a size of
1846 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1847 @param BltOperation Operation to perform on BlitBuffer and video
1849 @param SourceX X coordinate of source for the BltBuffer.
1850 @param SourceY Y coordinate of source for the BltBuffer.
1851 @param DestinationX X coordinate of destination for the BltBuffer.
1852 @param DestinationY Y coordinate of destination for the BltBuffer.
1853 @param Width Width of rectangle in BltBuffer in pixels.
1854 @param Height Hight of rectangle in BltBuffer in pixels.
1855 @param Delta OPTIONAL.
1857 @retval EFI_SUCCESS The Blt operation completed.
1858 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1859 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1865 ConSplitterGraphicsOutputBlt (
1866 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1867 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1868 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1871 IN UINTN DestinationX
,
1872 IN UINTN DestinationY
,
1875 IN UINTN Delta OPTIONAL
1880 Return the current video mode information.
1882 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1883 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1884 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1885 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1886 @param RefreshRate The refresh rate of the monitor in Hertz.
1888 @retval EFI_SUCCESS Mode information returned.
1889 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1890 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1895 ConSplitterUgaDrawGetMode (
1896 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1897 OUT UINT32
*HorizontalResolution
,
1898 OUT UINT32
*VerticalResolution
,
1899 OUT UINT32
*ColorDepth
,
1900 OUT UINT32
*RefreshRate
1904 Set the current video mode information.
1906 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1907 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1908 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1909 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1910 @param RefreshRate The refresh rate of the monitor in Hertz.
1912 @retval EFI_SUCCESS Mode information returned.
1913 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1914 @retval EFI_OUT_OF_RESOURCES Out of resources.
1919 ConSplitterUgaDrawSetMode (
1920 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1921 IN UINT32 HorizontalResolution
,
1922 IN UINT32 VerticalResolution
,
1923 IN UINT32 ColorDepth
,
1924 IN UINT32 RefreshRate
1928 Blt a rectangle of pixels on the graphics screen.
1930 The following table defines actions for BltOperations.
1933 Write data from the BltBuffer pixel (SourceX, SourceY)
1934 directly to every pixel of the video display rectangle
1935 (DestinationX, DestinationY)
1936 (DestinationX + Width, DestinationY + Height).
1937 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1938 EfiUgaVideoToBltBuffer:
1939 Read data from the video display rectangle
1940 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1941 the BltBuffer rectangle (DestinationX, DestinationY )
1942 (DestinationX + Width, DestinationY + Height). If DestinationX or
1943 DestinationY is not zero then Delta must be set to the length in bytes
1944 of a row in the BltBuffer.
1945 EfiUgaBltBufferToVideo:
1946 Write data from the BltBuffer rectangle
1947 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1948 video display rectangle (DestinationX, DestinationY)
1949 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1950 not zero then Delta must be set to the length in bytes of a row in the
1953 Copy from the video display rectangle
1954 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1955 to the video display rectangle (DestinationX, DestinationY)
1956 (DestinationX + Width, DestinationY + Height).
1957 The BltBuffer and Delta are not used in this mode.
1959 @param This Protocol instance pointer.
1960 @param BltBuffer Buffer containing data to blit into video buffer. This
1961 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1962 @param BltOperation Operation to perform on BlitBuffer and video memory
1963 @param SourceX X coordinate of source for the BltBuffer.
1964 @param SourceY Y coordinate of source for the BltBuffer.
1965 @param DestinationX X coordinate of destination for the BltBuffer.
1966 @param DestinationY Y coordinate of destination for the BltBuffer.
1967 @param Width Width of rectangle in BltBuffer in pixels.
1968 @param Height Hight of rectangle in BltBuffer in pixels.
1969 @param Delta OPTIONAL
1971 @retval EFI_SUCCESS The Blt operation completed.
1972 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1973 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1978 ConSplitterUgaDrawBlt (
1979 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1980 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1981 IN EFI_UGA_BLT_OPERATION BltOperation
,
1984 IN UINTN DestinationX
,
1985 IN UINTN DestinationY
,
1988 IN UINTN Delta OPTIONAL
1992 Sets the output device(s) to a specified mode.
1994 @param Private Text Out Splitter pointer.
1995 @param ModeNumber The mode number to set.
2000 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,