2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2016, 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
;
133 // It will be initialized and synced between console input devices
134 // for toggle state sync.
136 EFI_KEY_TOGGLE_STATE PhysicalKeyToggleState
;
138 // It will be initialized and used to record if virtual KeyState
139 // has been required to be exposed.
141 BOOLEAN VirtualKeyStateExported
;
144 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
145 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
146 UINTN CurrentNumberOfPointers
;
147 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
148 UINTN PointerListCount
;
150 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
151 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
152 UINTN CurrentNumberOfAbsolutePointers
;
153 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
154 UINTN AbsolutePointerListCount
;
155 BOOLEAN AbsoluteInputEventSignalState
;
157 BOOLEAN KeyEventSignalState
;
158 BOOLEAN InputEventSignalState
;
159 EFI_EVENT ConnectConInEvent
;
160 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
162 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
164 TEXT_IN_SPLITTER_PRIVATE_DATA, \
166 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
169 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
171 TEXT_IN_SPLITTER_PRIVATE_DATA, \
173 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
175 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
177 TEXT_IN_SPLITTER_PRIVATE_DATA, \
179 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
182 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
184 TEXT_IN_SPLITTER_PRIVATE_DATA, \
186 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
190 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
193 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
194 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
195 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
196 } TEXT_OUT_AND_GOP_DATA
;
199 // Private data for the Console Out splitter
203 EFI_HANDLE VirtualHandle
;
204 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
205 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
207 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
208 UINT32 UgaHorizontalResolution
;
209 UINT32 UgaVerticalResolution
;
210 UINT32 UgaColorDepth
;
211 UINT32 UgaRefreshRate
;
213 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
214 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
215 UINTN CurrentNumberOfGraphicsOutput
;
216 UINTN CurrentNumberOfUgaDraw
;
218 UINTN CurrentNumberOfConsoles
;
219 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
220 UINTN TextOutListCount
;
221 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
222 UINTN TextOutQueryDataCount
;
223 INT32
*TextOutModeMap
;
225 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
227 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
229 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
231 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
234 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
236 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
238 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
241 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
243 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
245 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
248 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
250 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
252 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
256 // Function Prototypes
260 The user Entry Point for module ConSplitter. The user code starts with this function.
262 Installs driver module protocols and. Creates virtual device handles for ConIn,
263 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
264 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
265 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
267 @param[in] ImageHandle The firmware allocated handle for the EFI image.
268 @param[in] SystemTable A pointer to the EFI System Table.
270 @retval EFI_SUCCESS The entry point is executed successfully.
271 @retval other Some error occurs when executing this entry point.
276 ConSplitterDriverEntry (
277 IN EFI_HANDLE ImageHandle
,
278 IN EFI_SYSTEM_TABLE
*SystemTable
282 Construct console input devices' private data.
284 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
287 @retval EFI_OUT_OF_RESOURCES Out of resources.
288 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
289 @retval other Failed to construct private data.
293 ConSplitterTextInConstructor (
294 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
298 Construct console output devices' private data.
300 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
303 @retval EFI_OUT_OF_RESOURCES Out of resources.
304 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
308 ConSplitterTextOutConstructor (
309 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
314 Test to see if Console In Device could be supported on the Controller.
316 @param This Driver Binding protocol instance pointer.
317 @param ControllerHandle Handle of device to test.
318 @param RemainingDevicePath Optional parameter use to pick a specific child
321 @retval EFI_SUCCESS This driver supports this device.
322 @retval other This driver does not support this device.
327 ConSplitterConInDriverBindingSupported (
328 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
329 IN EFI_HANDLE ControllerHandle
,
330 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
334 Test to see if Simple Pointer protocol could be supported on the Controller.
336 @param This Driver Binding protocol instance pointer.
337 @param ControllerHandle Handle of device to test.
338 @param RemainingDevicePath Optional parameter use to pick a specific child
341 @retval EFI_SUCCESS This driver supports this device.
342 @retval other This driver does not support this device.
347 ConSplitterSimplePointerDriverBindingSupported (
348 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
349 IN EFI_HANDLE ControllerHandle
,
350 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
354 Test to see if Console Out Device could be supported on the Controller.
356 @param This Driver Binding protocol instance pointer.
357 @param ControllerHandle Handle of device to test.
358 @param RemainingDevicePath Optional parameter use to pick a specific child
361 @retval EFI_SUCCESS This driver supports this device.
362 @retval other This driver does not support this device.
367 ConSplitterConOutDriverBindingSupported (
368 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
369 IN EFI_HANDLE ControllerHandle
,
370 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
374 Test to see if Standard Error Device could be supported on the Controller.
376 @param This Driver Binding protocol instance pointer.
377 @param ControllerHandle Handle of device to test.
378 @param RemainingDevicePath Optional parameter use to pick a specific child
381 @retval EFI_SUCCESS This driver supports this device.
382 @retval other This driver does not support this device.
387 ConSplitterStdErrDriverBindingSupported (
388 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
389 IN EFI_HANDLE ControllerHandle
,
390 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
394 Start Console In Consplitter on device handle.
396 @param This Driver Binding protocol instance pointer.
397 @param ControllerHandle Handle of device to bind driver to.
398 @param RemainingDevicePath Optional parameter use to pick a specific child
401 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
402 @retval other Console In Consplitter does not support this device.
407 ConSplitterConInDriverBindingStart (
408 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
409 IN EFI_HANDLE ControllerHandle
,
410 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
414 Start Simple Pointer Consplitter on device handle.
416 @param This Driver Binding protocol instance pointer.
417 @param ControllerHandle Handle of device to bind driver to.
418 @param RemainingDevicePath Optional parameter use to pick a specific child
421 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
422 @retval other Simple Pointer Consplitter does not support this device.
427 ConSplitterSimplePointerDriverBindingStart (
428 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
429 IN EFI_HANDLE ControllerHandle
,
430 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
434 Start Console Out Consplitter on device handle.
436 @param This Driver Binding protocol instance pointer.
437 @param ControllerHandle Handle of device to bind driver to.
438 @param RemainingDevicePath Optional parameter use to pick a specific child
441 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
442 @retval other Console Out Consplitter does not support this device.
447 ConSplitterConOutDriverBindingStart (
448 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
449 IN EFI_HANDLE ControllerHandle
,
450 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
454 Start Standard Error Consplitter on device handle.
456 @param This Driver Binding protocol instance pointer.
457 @param ControllerHandle Handle of device to bind driver to.
458 @param RemainingDevicePath Optional parameter use to pick a specific child
461 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
462 @retval other Standard Error Consplitter does not support this device.
467 ConSplitterStdErrDriverBindingStart (
468 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
469 IN EFI_HANDLE ControllerHandle
,
470 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
474 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
476 @param This Driver Binding protocol instance pointer.
477 @param ControllerHandle Handle of device to stop driver on
478 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
479 children is zero stop the entire bus driver.
480 @param ChildHandleBuffer List of Child Handles to Stop.
482 @retval EFI_SUCCESS This driver is removed ControllerHandle
483 @retval other This driver was not removed from this device
488 ConSplitterConInDriverBindingStop (
489 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
490 IN EFI_HANDLE ControllerHandle
,
491 IN UINTN NumberOfChildren
,
492 IN EFI_HANDLE
*ChildHandleBuffer
496 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
497 Simple Pointer protocol.
499 @param This Driver Binding protocol instance pointer.
500 @param ControllerHandle Handle of device to stop driver on
501 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
502 children is zero stop the entire bus driver.
503 @param ChildHandleBuffer List of Child Handles to Stop.
505 @retval EFI_SUCCESS This driver is removed ControllerHandle
506 @retval other This driver was not removed from this device
511 ConSplitterSimplePointerDriverBindingStop (
512 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
513 IN EFI_HANDLE ControllerHandle
,
514 IN UINTN NumberOfChildren
,
515 IN EFI_HANDLE
*ChildHandleBuffer
519 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
521 @param This Driver Binding protocol instance pointer.
522 @param ControllerHandle Handle of device to stop driver on
523 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
524 children is zero stop the entire bus driver.
525 @param ChildHandleBuffer List of Child Handles to Stop.
527 @retval EFI_SUCCESS This driver is removed ControllerHandle
528 @retval other This driver was not removed from this device
533 ConSplitterConOutDriverBindingStop (
534 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
535 IN EFI_HANDLE ControllerHandle
,
536 IN UINTN NumberOfChildren
,
537 IN EFI_HANDLE
*ChildHandleBuffer
541 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
543 @param This Driver Binding protocol instance pointer.
544 @param ControllerHandle Handle of device to stop driver on
545 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
546 children is zero stop the entire bus driver.
547 @param ChildHandleBuffer List of Child Handles to Stop.
549 @retval EFI_SUCCESS This driver is removed ControllerHandle
550 @retval other This driver was not removed from this device
555 ConSplitterStdErrDriverBindingStop (
556 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
557 IN EFI_HANDLE ControllerHandle
,
558 IN UINTN NumberOfChildren
,
559 IN EFI_HANDLE
*ChildHandleBuffer
564 Test to see if Absolute Pointer protocol could be supported on the Controller.
566 @param This Driver Binding protocol instance pointer.
567 @param ControllerHandle Handle of device to test.
568 @param RemainingDevicePath Optional parameter use to pick a specific child
571 @retval EFI_SUCCESS This driver supports this device.
572 @retval other This driver does not support this device.
577 ConSplitterAbsolutePointerDriverBindingSupported (
578 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
579 IN EFI_HANDLE ControllerHandle
,
580 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
584 Start Absolute Pointer Consplitter on device handle.
586 @param This Driver Binding protocol instance pointer.
587 @param ControllerHandle Handle of device to bind driver to.
588 @param RemainingDevicePath Optional parameter use to pick a specific child
591 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
592 @retval other Absolute Pointer Consplitter does not support this device.
597 ConSplitterAbsolutePointerDriverBindingStart (
598 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
599 IN EFI_HANDLE ControllerHandle
,
600 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
604 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
605 Absolute Pointer protocol.
607 @param This Driver Binding protocol instance pointer.
608 @param ControllerHandle Handle of device to stop driver on
609 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
610 children is zero stop the entire bus driver.
611 @param ChildHandleBuffer List of Child Handles to Stop.
613 @retval EFI_SUCCESS This driver is removed ControllerHandle
614 @retval other This driver was not removed from this device
619 ConSplitterAbsolutePointerDriverBindingStop (
620 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
621 IN EFI_HANDLE ControllerHandle
,
622 IN UINTN NumberOfChildren
,
623 IN EFI_HANDLE
*ChildHandleBuffer
627 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
629 @param Private Text In Splitter pointer.
630 @param AbsolutePointer Absolute Pointer protocol pointer.
632 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
633 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
637 ConSplitterAbsolutePointerAddDevice (
638 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
639 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
643 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
645 @param Private Text In Splitter pointer.
646 @param AbsolutePointer Absolute Pointer protocol pointer.
648 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
649 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
653 ConSplitterAbsolutePointerDeleteDevice (
654 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
655 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
659 // Absolute Pointer protocol interfaces
664 Resets the pointer device hardware.
666 @param This Protocol instance pointer.
667 @param ExtendedVerification Driver may perform diagnostics on reset.
669 @retval EFI_SUCCESS The device was reset.
670 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
676 ConSplitterAbsolutePointerReset (
677 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
678 IN BOOLEAN ExtendedVerification
683 Retrieves the current state of a pointer device.
685 @param This Protocol instance pointer.
686 @param State A pointer to the state information on the
689 @retval EFI_SUCCESS The state of the pointer device was returned in
691 @retval EFI_NOT_READY The state of the pointer device has not changed
692 since the last call to GetState().
693 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
694 retrieve the pointer device's current state.
699 ConSplitterAbsolutePointerGetState (
700 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
701 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
705 This event agregates all the events of the pointer devices in the splitter.
707 If any events of physical pointer devices are signaled, signal the pointer
708 splitter event. This will cause the calling code to call
709 ConSplitterAbsolutePointerGetState ().
711 @param Event The Event assoicated with callback.
712 @param Context Context registered when Event was created.
717 ConSplitterAbsolutePointerWaitForInput (
723 Retrieves a Unicode string that is the user readable name of the driver.
725 This function retrieves the user readable name of a driver in the form of a
726 Unicode string. If the driver specified by This has a user readable name in
727 the language specified by Language, then a pointer to the driver name is
728 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
729 by This does not support the language specified by Language,
730 then EFI_UNSUPPORTED is returned.
732 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
733 EFI_COMPONENT_NAME_PROTOCOL instance.
735 @param Language[in] A pointer to a Null-terminated ASCII string
736 array indicating the language. This is the
737 language of the driver name that the caller is
738 requesting, and it must match one of the
739 languages specified in SupportedLanguages. The
740 number of languages supported by a driver is up
741 to the driver writer. Language is specified
742 in RFC 4646 or ISO 639-2 language code format.
744 @param DriverName[out] A pointer to the Unicode string to return.
745 This Unicode string is the name of the
746 driver specified by This in the language
747 specified by Language.
749 @retval EFI_SUCCESS The Unicode string for the Driver specified by
750 This and the language specified by Language was
751 returned in DriverName.
753 @retval EFI_INVALID_PARAMETER Language is NULL.
755 @retval EFI_INVALID_PARAMETER DriverName is NULL.
757 @retval EFI_UNSUPPORTED The driver specified by This does not support
758 the language specified by Language.
763 ConSplitterComponentNameGetDriverName (
764 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
766 OUT CHAR16
**DriverName
771 Retrieves a Unicode string that is the user readable name of the controller
772 that is being managed by a driver.
774 This function retrieves the user readable name of the controller specified by
775 ControllerHandle and ChildHandle in the form of a Unicode string. If the
776 driver specified by This has a user readable name in the language specified by
777 Language, then a pointer to the controller name is returned in ControllerName,
778 and EFI_SUCCESS is returned. If the driver specified by This is not currently
779 managing the controller specified by ControllerHandle and ChildHandle,
780 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
781 support the language specified by Language, then EFI_UNSUPPORTED is returned.
783 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
784 EFI_COMPONENT_NAME_PROTOCOL instance.
786 @param ControllerHandle[in] The handle of a controller that the driver
787 specified by This is managing. This handle
788 specifies the controller whose name is to be
791 @param ChildHandle[in] The handle of the child controller to retrieve
792 the name of. This is an optional parameter that
793 may be NULL. It will be NULL for device
794 drivers. It will also be NULL for a bus drivers
795 that wish to retrieve the name of the bus
796 controller. It will not be NULL for a bus
797 driver that wishes to retrieve the name of a
800 @param Language[in] A pointer to a Null-terminated ASCII string
801 array indicating the language. This is the
802 language of the driver name that the caller is
803 requesting, and it must match one of the
804 languages specified in SupportedLanguages. The
805 number of languages supported by a driver is up
806 to the driver writer. Language is specified in
807 RFC 4646 or ISO 639-2 language code format.
809 @param ControllerName[out] A pointer to the Unicode string to return.
810 This Unicode string is the name of the
811 controller specified by ControllerHandle and
812 ChildHandle in the language specified by
813 Language from the point of view of the driver
816 @retval EFI_SUCCESS The Unicode string for the user readable name in
817 the language specified by Language for the
818 driver specified by This was returned in
821 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
823 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
826 @retval EFI_INVALID_PARAMETER Language is NULL.
828 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
830 @retval EFI_UNSUPPORTED The driver specified by This is not currently
831 managing the controller specified by
832 ControllerHandle and ChildHandle.
834 @retval EFI_UNSUPPORTED The driver specified by This does not support
835 the language specified by Language.
840 ConSplitterConInComponentNameGetControllerName (
841 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
842 IN EFI_HANDLE ControllerHandle
,
843 IN EFI_HANDLE ChildHandle OPTIONAL
,
845 OUT CHAR16
**ControllerName
850 Retrieves a Unicode string that is the user readable name of the controller
851 that is being managed by a driver.
853 This function retrieves the user readable name of the controller specified by
854 ControllerHandle and ChildHandle in the form of a Unicode string. If the
855 driver specified by This has a user readable name in the language specified by
856 Language, then a pointer to the controller name is returned in ControllerName,
857 and EFI_SUCCESS is returned. If the driver specified by This is not currently
858 managing the controller specified by ControllerHandle and ChildHandle,
859 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
860 support the language specified by Language, then EFI_UNSUPPORTED is returned.
862 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
863 EFI_COMPONENT_NAME_PROTOCOL instance.
865 @param ControllerHandle[in] The handle of a controller that the driver
866 specified by This is managing. This handle
867 specifies the controller whose name is to be
870 @param ChildHandle[in] The handle of the child controller to retrieve
871 the name of. This is an optional parameter that
872 may be NULL. It will be NULL for device
873 drivers. It will also be NULL for a bus drivers
874 that wish to retrieve the name of the bus
875 controller. It will not be NULL for a bus
876 driver that wishes to retrieve the name of a
879 @param Language[in] A pointer to a Null-terminated ASCII string
880 array indicating the language. This is the
881 language of the driver name that the caller is
882 requesting, and it must match one of the
883 languages specified in SupportedLanguages. The
884 number of languages supported by a driver is up
885 to the driver writer. Language is specified in
886 RFC 4646 or ISO 639-2 language code format.
888 @param ControllerName[out] A pointer to the Unicode string to return.
889 This Unicode string is the name of the
890 controller specified by ControllerHandle and
891 ChildHandle in the language specified by
892 Language from the point of view of the driver
895 @retval EFI_SUCCESS The Unicode string for the user readable name in
896 the language specified by Language for the
897 driver specified by This was returned in
900 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
902 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
905 @retval EFI_INVALID_PARAMETER Language is NULL.
907 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
909 @retval EFI_UNSUPPORTED The driver specified by This is not currently
910 managing the controller specified by
911 ControllerHandle and ChildHandle.
913 @retval EFI_UNSUPPORTED The driver specified by This does not support
914 the language specified by Language.
919 ConSplitterSimplePointerComponentNameGetControllerName (
920 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
921 IN EFI_HANDLE ControllerHandle
,
922 IN EFI_HANDLE ChildHandle OPTIONAL
,
924 OUT CHAR16
**ControllerName
928 Retrieves a Unicode string that is the user readable name of the controller
929 that is being managed by an EFI Driver.
931 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
933 @param ControllerHandle The handle of a controller that the driver
934 specified by This is managing. This handle
935 specifies the controller whose name is to be
937 @param ChildHandle The handle of the child controller to retrieve the
938 name of. This is an optional parameter that may
939 be NULL. It will be NULL for device drivers. It
940 will also be NULL for a bus drivers that wish to
941 retrieve the name of the bus controller. It will
942 not be NULL for a bus driver that wishes to
943 retrieve the name of a child controller.
944 @param Language A pointer to RFC4646 language identifier. This is
945 the language of the controller name that that the
946 caller is requesting, and it must match one of the
947 languages specified in SupportedLanguages. The
948 number of languages supported by a driver is up to
950 @param ControllerName A pointer to the Unicode string to return. This
951 Unicode string is the name of the controller
952 specified by ControllerHandle and ChildHandle in
953 the language specified by Language from the point
954 of view of the driver specified by This.
956 @retval EFI_SUCCESS The Unicode string for the user readable name in
957 the language specified by Language for the driver
958 specified by This was returned in DriverName.
959 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
960 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
962 @retval EFI_INVALID_PARAMETER Language is NULL.
963 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
964 @retval EFI_UNSUPPORTED The driver specified by This is not currently
965 managing the controller specified by
966 ControllerHandle and ChildHandle.
967 @retval EFI_UNSUPPORTED The driver specified by This does not support the
968 language specified by Language.
973 ConSplitterAbsolutePointerComponentNameGetControllerName (
974 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
975 IN EFI_HANDLE ControllerHandle
,
976 IN EFI_HANDLE ChildHandle OPTIONAL
,
978 OUT CHAR16
**ControllerName
982 Retrieves a Unicode string that is the user readable name of the controller
983 that is being managed by a driver.
985 This function retrieves the user readable name of the controller specified by
986 ControllerHandle and ChildHandle in the form of a Unicode string. If the
987 driver specified by This has a user readable name in the language specified by
988 Language, then a pointer to the controller name is returned in ControllerName,
989 and EFI_SUCCESS is returned. If the driver specified by This is not currently
990 managing the controller specified by ControllerHandle and ChildHandle,
991 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
992 support the language specified by Language, then EFI_UNSUPPORTED is returned.
994 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
995 EFI_COMPONENT_NAME_PROTOCOL instance.
997 @param ControllerHandle[in] The handle of a controller that the driver
998 specified by This is managing. This handle
999 specifies the controller whose name is to be
1002 @param ChildHandle[in] The handle of the child controller to retrieve
1003 the name of. This is an optional parameter that
1004 may be NULL. It will be NULL for device
1005 drivers. It will also be NULL for a bus drivers
1006 that wish to retrieve the name of the bus
1007 controller. It will not be NULL for a bus
1008 driver that wishes to retrieve the name of a
1011 @param Language[in] A pointer to a Null-terminated ASCII string
1012 array indicating the language. This is the
1013 language of the driver name that the caller is
1014 requesting, and it must match one of the
1015 languages specified in SupportedLanguages. The
1016 number of languages supported by a driver is up
1017 to the driver writer. Language is specified in
1018 RFC 4646 or ISO 639-2 language code format.
1020 @param ControllerName[out] A pointer to the Unicode string to return.
1021 This Unicode string is the name of the
1022 controller specified by ControllerHandle and
1023 ChildHandle in the language specified by
1024 Language from the point of view of the driver
1027 @retval EFI_SUCCESS The Unicode string for the user readable name in
1028 the language specified by Language for the
1029 driver specified by This was returned in
1032 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1034 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1037 @retval EFI_INVALID_PARAMETER Language is NULL.
1039 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1041 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1042 managing the controller specified by
1043 ControllerHandle and ChildHandle.
1045 @retval EFI_UNSUPPORTED The driver specified by This does not support
1046 the language specified by Language.
1051 ConSplitterConOutComponentNameGetControllerName (
1052 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1053 IN EFI_HANDLE ControllerHandle
,
1054 IN EFI_HANDLE ChildHandle OPTIONAL
,
1056 OUT CHAR16
**ControllerName
1061 Retrieves a Unicode string that is the user readable name of the controller
1062 that is being managed by a driver.
1064 This function retrieves the user readable name of the controller specified by
1065 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1066 driver specified by This has a user readable name in the language specified by
1067 Language, then a pointer to the controller name is returned in ControllerName,
1068 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1069 managing the controller specified by ControllerHandle and ChildHandle,
1070 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1071 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1073 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1074 EFI_COMPONENT_NAME_PROTOCOL instance.
1076 @param ControllerHandle[in] The handle of a controller that the driver
1077 specified by This is managing. This handle
1078 specifies the controller whose name is to be
1081 @param ChildHandle[in] The handle of the child controller to retrieve
1082 the name of. This is an optional parameter that
1083 may be NULL. It will be NULL for device
1084 drivers. It will also be NULL for a bus drivers
1085 that wish to retrieve the name of the bus
1086 controller. It will not be NULL for a bus
1087 driver that wishes to retrieve the name of a
1090 @param Language[in] A pointer to a Null-terminated ASCII string
1091 array indicating the language. This is the
1092 language of the driver name that the caller is
1093 requesting, and it must match one of the
1094 languages specified in SupportedLanguages. The
1095 number of languages supported by a driver is up
1096 to the driver writer. Language is specified in
1097 RFC 4646 or ISO 639-2 language code format.
1099 @param ControllerName[out] A pointer to the Unicode string to return.
1100 This Unicode string is the name of the
1101 controller specified by ControllerHandle and
1102 ChildHandle in the language specified by
1103 Language from the point of view of the driver
1106 @retval EFI_SUCCESS The Unicode string for the user readable name in
1107 the language specified by Language for the
1108 driver specified by This was returned in
1111 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1113 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1116 @retval EFI_INVALID_PARAMETER Language is NULL.
1118 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1120 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1121 managing the controller specified by
1122 ControllerHandle and ChildHandle.
1124 @retval EFI_UNSUPPORTED The driver specified by This does not support
1125 the language specified by Language.
1130 ConSplitterStdErrComponentNameGetControllerName (
1131 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1132 IN EFI_HANDLE ControllerHandle
,
1133 IN EFI_HANDLE ChildHandle OPTIONAL
,
1135 OUT CHAR16
**ControllerName
1140 // TextIn Constructor/Destructor functions
1144 Add Text Input Device in Consplitter Text Input list.
1146 @param Private Text In Splitter pointer.
1147 @param TextIn Simple Text Input protocol pointer.
1149 @retval EFI_SUCCESS Text Input Device added successfully.
1150 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1154 ConSplitterTextInAddDevice (
1155 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1156 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1160 Remove Text Input Device from Consplitter Text Input list.
1162 @param Private Text In Splitter pointer.
1163 @param TextIn Simple Text protocol pointer.
1165 @retval EFI_SUCCESS Simple Text Device removed successfully.
1166 @retval EFI_NOT_FOUND No Simple Text Device found.
1170 ConSplitterTextInDeleteDevice (
1171 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1172 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1176 // SimplePointer Constuctor/Destructor functions
1180 Add Simple Pointer Device in 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 added successfully.
1186 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1190 ConSplitterSimplePointerAddDevice (
1191 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1192 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1196 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1198 @param Private Text In Splitter pointer.
1199 @param SimplePointer Simple Pointer protocol pointer.
1201 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1202 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1206 ConSplitterSimplePointerDeleteDevice (
1207 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1208 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1212 // TextOut Constuctor/Destructor functions
1216 Add Text Output Device in Consplitter Text Output list.
1218 @param Private Text Out Splitter pointer.
1219 @param TextOut Simple Text Output protocol pointer.
1220 @param GraphicsOutput Graphics Output protocol pointer.
1221 @param UgaDraw UGA Draw protocol pointer.
1223 @retval EFI_SUCCESS Text Output Device added successfully.
1224 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1228 ConSplitterTextOutAddDevice (
1229 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1230 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1231 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1232 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1236 Remove Text Out Device in Consplitter Text Out list.
1238 @param Private Text Out Splitter pointer.
1239 @param TextOut Simple Text Output Pointer protocol pointer.
1241 @retval EFI_SUCCESS Text Out Device removed successfully.
1242 @retval EFI_NOT_FOUND No Text Out Device found.
1246 ConSplitterTextOutDeleteDevice (
1247 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1248 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1252 // TextIn I/O Functions
1256 Reset the input device and optionaly run diagnostics
1258 @param This Protocol instance pointer.
1259 @param ExtendedVerification Driver may perform diagnostics on reset.
1261 @retval EFI_SUCCESS The device was reset.
1262 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1268 ConSplitterTextInReset (
1269 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1270 IN BOOLEAN ExtendedVerification
1274 Reads the next keystroke from the input device. The WaitForKey Event can
1275 be used to test for existance of a keystroke via WaitForEvent () call.
1277 @param This Protocol instance pointer.
1278 @param Key Driver may perform diagnostics on reset.
1280 @retval EFI_SUCCESS The keystroke information was returned.
1281 @retval EFI_NOT_READY There was no keystroke data availiable.
1282 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1288 ConSplitterTextInReadKeyStroke (
1289 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1290 OUT EFI_INPUT_KEY
*Key
1294 Add Text Input Ex Device in Consplitter Text Input Ex list.
1296 @param Private Text In Splitter pointer.
1297 @param TextInEx Simple Text Input Ex Input protocol pointer.
1299 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1300 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1304 ConSplitterTextInExAddDevice (
1305 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1306 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1310 Remove Text Ex Device from Consplitter Text Input Ex list.
1312 @param Private Text In Splitter pointer.
1313 @param TextInEx Simple Text Ex protocol pointer.
1315 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1316 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1320 ConSplitterTextInExDeleteDevice (
1321 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1322 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1326 // Simple Text Input Ex protocol function prototypes
1330 Reset the input device and optionaly run diagnostics
1332 @param This Protocol instance pointer.
1333 @param ExtendedVerification Driver may perform diagnostics on reset.
1335 @retval EFI_SUCCESS The device was reset.
1336 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1342 ConSplitterTextInResetEx (
1343 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1344 IN BOOLEAN ExtendedVerification
1349 Reads the next keystroke from the input device. The WaitForKey Event can
1350 be used to test for existance of a keystroke via WaitForEvent () call.
1352 @param This Protocol instance pointer.
1353 @param KeyData A pointer to a buffer that is filled in with the
1354 keystroke state data for the key that was
1357 @retval EFI_SUCCESS The keystroke information was returned.
1358 @retval EFI_NOT_READY There was no keystroke data availiable.
1359 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1361 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1366 ConSplitterTextInReadKeyStrokeEx (
1367 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1368 OUT EFI_KEY_DATA
*KeyData
1373 Set certain state for the input device.
1375 @param This Protocol instance pointer.
1376 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1377 state for the input device.
1379 @retval EFI_SUCCESS The device state was set successfully.
1380 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1381 could not have the setting adjusted.
1382 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1384 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1389 ConSplitterTextInSetState (
1390 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1391 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1396 Register a notification function for a particular keystroke for the input device.
1398 @param This Protocol instance pointer.
1399 @param KeyData A pointer to a buffer that is filled in with the
1400 keystroke information data for the key that was
1402 @param KeyNotificationFunction Points to the function to be called when the key
1403 sequence is typed specified by KeyData.
1404 @param NotifyHandle Points to the unique handle assigned to the
1405 registered notification.
1407 @retval EFI_SUCCESS The notification function was registered
1409 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1411 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1416 ConSplitterTextInRegisterKeyNotify (
1417 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1418 IN EFI_KEY_DATA
*KeyData
,
1419 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1420 OUT VOID
**NotifyHandle
1425 Remove a registered notification function from a particular keystroke.
1427 @param This Protocol instance pointer.
1428 @param NotificationHandle The handle of the notification function being
1431 @retval EFI_SUCCESS The notification function was unregistered
1433 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1434 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1439 ConSplitterTextInUnregisterKeyNotify (
1440 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1441 IN VOID
*NotificationHandle
1445 This event aggregates all the events of the ConIn devices in the spliter.
1447 If any events of physical ConIn devices are signaled, signal the ConIn
1448 spliter event. This will cause the calling code to call
1449 ConSplitterTextInReadKeyStroke ().
1451 @param Event The Event assoicated with callback.
1452 @param Context Context registered when Event was created.
1457 ConSplitterTextInWaitForKey (
1464 Reads the next keystroke from the input device. The WaitForKey Event can
1465 be used to test for existance of a keystroke via WaitForEvent () call.
1467 @param Private Protocol instance pointer.
1468 @param Key Driver may perform diagnostics on reset.
1470 @retval EFI_SUCCESS The keystroke information was returned.
1471 @retval EFI_NOT_READY There was no keystroke data availiable.
1472 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1478 ConSplitterTextInPrivateReadKeyStroke (
1479 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1480 OUT EFI_INPUT_KEY
*Key
1484 Reset the input device and optionaly run diagnostics
1486 @param This Protocol instance pointer.
1487 @param ExtendedVerification Driver may perform diagnostics on reset.
1489 @retval EFI_SUCCESS The device was reset.
1490 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1496 ConSplitterSimplePointerReset (
1497 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1498 IN BOOLEAN ExtendedVerification
1502 Reads the next keystroke from the input device. The WaitForKey Event can
1503 be used to test for existance of a keystroke via WaitForEvent () call.
1505 @param This A pointer to protocol instance.
1506 @param State A pointer to state information on the pointer device
1508 @retval EFI_SUCCESS The keystroke information was returned in State.
1509 @retval EFI_NOT_READY There was no keystroke data availiable.
1510 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1516 ConSplitterSimplePointerGetState (
1517 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1518 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1522 This event agregates all the events of the ConIn devices in the spliter.
1523 If any events of physical ConIn devices are signaled, signal the ConIn
1524 spliter event. This will cause the calling code to call
1525 ConSplitterTextInReadKeyStroke ().
1527 @param Event The Event assoicated with callback.
1528 @param Context Context registered when Event was created.
1533 ConSplitterSimplePointerWaitForInput (
1539 // TextOut I/O Functions
1543 Reset the text output device hardware and optionaly run diagnostics
1545 @param This Protocol instance pointer.
1546 @param ExtendedVerification Driver may perform more exhaustive verfication
1547 operation of the device during reset.
1549 @retval EFI_SUCCESS The text output device was reset.
1550 @retval EFI_DEVICE_ERROR The text output device is not functioning
1551 correctly and could not be reset.
1556 ConSplitterTextOutReset (
1557 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1558 IN BOOLEAN ExtendedVerification
1562 Write a Unicode string to the output device.
1564 @param This Protocol instance pointer.
1565 @param WString The NULL-terminated Unicode string to be
1566 displayed on the output device(s). All output
1567 devices must also support the Unicode drawing
1568 defined in this file.
1570 @retval EFI_SUCCESS The string was output to the device.
1571 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1573 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1575 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1576 characters in the Unicode string could not be
1577 rendered and were skipped.
1582 ConSplitterTextOutOutputString (
1583 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1588 Verifies that all characters in a Unicode string can be output to the
1591 @param This Protocol instance pointer.
1592 @param WString The NULL-terminated Unicode string to be
1593 examined for the output device(s).
1595 @retval EFI_SUCCESS The device(s) are capable of rendering the
1597 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1598 cannot be rendered by one or more of the output
1599 devices mapped by the EFI handle.
1604 ConSplitterTextOutTestString (
1605 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1610 Returns information for an available text mode that the output device(s)
1613 @param This Protocol instance pointer.
1614 @param ModeNumber The mode number to return information on.
1615 @param Columns Returns the columns of the text output device
1616 for the requested ModeNumber.
1617 @param Rows Returns the rows of the text output device
1618 for the requested ModeNumber.
1620 @retval EFI_SUCCESS The requested mode information was returned.
1621 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1623 @retval EFI_UNSUPPORTED The mode number was not valid.
1628 ConSplitterTextOutQueryMode (
1629 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1630 IN UINTN ModeNumber
,
1636 Sets the output device(s) to a specified mode.
1638 @param This Protocol instance pointer.
1639 @param ModeNumber The mode number to set.
1641 @retval EFI_SUCCESS The requested text mode was set.
1642 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1644 @retval EFI_UNSUPPORTED The mode number was not valid.
1649 ConSplitterTextOutSetMode (
1650 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1655 Sets the background and foreground colors for the OutputString () and
1656 ClearScreen () functions.
1658 @param This Protocol instance pointer.
1659 @param Attribute The attribute to set. Bits 0..3 are the
1660 foreground color, and bits 4..6 are the
1661 background color. All other bits are undefined
1662 and must be zero. The valid Attributes are
1663 defined in this file.
1665 @retval EFI_SUCCESS The attribute was set.
1666 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1668 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1673 ConSplitterTextOutSetAttribute (
1674 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1679 Clears the output device(s) display to the currently selected background
1682 @param This Protocol instance pointer.
1684 @retval EFI_SUCCESS The operation completed successfully.
1685 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1687 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1692 ConSplitterTextOutClearScreen (
1693 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1697 Sets the current coordinates of the cursor position
1699 @param This Protocol instance pointer.
1700 @param Column The column position to set the cursor to. Must be
1701 greater than or equal to zero and less than the
1702 number of columns by QueryMode ().
1703 @param Row The row position to set the cursor to. Must be
1704 greater than or equal to zero and less than the
1705 number of rows by QueryMode ().
1707 @retval EFI_SUCCESS The operation completed successfully.
1708 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1710 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1711 or the cursor position is invalid for the
1717 ConSplitterTextOutSetCursorPosition (
1718 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1725 Makes the cursor visible or invisible
1727 @param This Protocol instance pointer.
1728 @param Visible If TRUE, the cursor is set to be visible. If
1729 FALSE, the cursor is set to be invisible.
1731 @retval EFI_SUCCESS The operation completed successfully.
1732 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1733 the request, or the device does not support
1734 changing the cursor mode.
1735 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1740 ConSplitterTextOutEnableCursor (
1741 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1746 Take the passed in Buffer of size ElementSize and grow the buffer
1747 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1748 Copy the current data in Buffer to the new version of Buffer and
1749 free the old version of buffer.
1751 @param ElementSize Size of element in array.
1752 @param Count Current number of elements in array.
1753 @param Buffer Bigger version of passed in Buffer with all the
1756 @retval EFI_SUCCESS Buffer size has grown.
1757 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1761 ConSplitterGrowBuffer (
1762 IN UINTN ElementSize
,
1763 IN OUT UINTN
*Count
,
1764 IN OUT VOID
**Buffer
1768 Returns information for an available graphics mode that the graphics device
1769 and the set of active video output devices supports.
1771 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1772 @param ModeNumber The mode number to return information on.
1773 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1774 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1776 @retval EFI_SUCCESS Mode information returned.
1777 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1778 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1779 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1780 @retval EFI_OUT_OF_RESOURCES No resource available.
1785 ConSplitterGraphicsOutputQueryMode (
1786 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1787 IN UINT32 ModeNumber
,
1788 OUT UINTN
*SizeOfInfo
,
1789 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1793 Set the video device into the specified mode and clears the visible portions of
1794 the output display to black.
1796 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1797 @param ModeNumber Abstraction that defines the current video mode.
1799 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1800 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1801 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1802 @retval EFI_OUT_OF_RESOURCES No resource available.
1807 ConSplitterGraphicsOutputSetMode (
1808 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1809 IN UINT32 ModeNumber
1813 The following table defines actions for BltOperations.
1815 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1816 directly to every pixel of the video display rectangle
1817 (DestinationX, DestinationY)
1818 (DestinationX + Width, DestinationY + Height).
1819 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1820 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1821 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1822 the BltBuffer rectangle (DestinationX, DestinationY )
1823 (DestinationX + Width, DestinationY + Height). If DestinationX or
1824 DestinationY is not zero then Delta must be set to the length in bytes
1825 of a row in the BltBuffer.
1826 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1827 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1828 video display rectangle (DestinationX, DestinationY)
1829 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1830 not zero then Delta must be set to the length in bytes of a row in the
1832 EfiBltVideoToVideo - Copy from the video display rectangle
1833 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1834 to the video display rectangle (DestinationX, DestinationY)
1835 (DestinationX + Width, DestinationY + Height).
1836 The BltBuffer and Delta are not used in this mode.
1838 @param This Protocol instance pointer.
1839 @param BltBuffer Buffer containing data to blit into video buffer.
1840 This buffer has a size of
1841 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1842 @param BltOperation Operation to perform on BlitBuffer and video
1844 @param SourceX X coordinate of source for the BltBuffer.
1845 @param SourceY Y coordinate of source for the BltBuffer.
1846 @param DestinationX X coordinate of destination for the BltBuffer.
1847 @param DestinationY Y coordinate of destination for the BltBuffer.
1848 @param Width Width of rectangle in BltBuffer in pixels.
1849 @param Height Hight of rectangle in BltBuffer in pixels.
1850 @param Delta OPTIONAL.
1852 @retval EFI_SUCCESS The Blt operation completed.
1853 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1854 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1860 ConSplitterGraphicsOutputBlt (
1861 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1862 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1863 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1866 IN UINTN DestinationX
,
1867 IN UINTN DestinationY
,
1870 IN UINTN Delta OPTIONAL
1875 Return the current video mode information.
1877 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1878 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1879 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1880 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1881 @param RefreshRate The refresh rate of the monitor in Hertz.
1883 @retval EFI_SUCCESS Mode information returned.
1884 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1885 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1890 ConSplitterUgaDrawGetMode (
1891 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1892 OUT UINT32
*HorizontalResolution
,
1893 OUT UINT32
*VerticalResolution
,
1894 OUT UINT32
*ColorDepth
,
1895 OUT UINT32
*RefreshRate
1899 Set the current video mode information.
1901 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1902 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1903 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1904 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1905 @param RefreshRate The refresh rate of the monitor in Hertz.
1907 @retval EFI_SUCCESS Mode information returned.
1908 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1909 @retval EFI_OUT_OF_RESOURCES Out of resources.
1914 ConSplitterUgaDrawSetMode (
1915 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1916 IN UINT32 HorizontalResolution
,
1917 IN UINT32 VerticalResolution
,
1918 IN UINT32 ColorDepth
,
1919 IN UINT32 RefreshRate
1923 Blt a rectangle of pixels on the graphics screen.
1925 The following table defines actions for BltOperations.
1928 Write data from the BltBuffer pixel (SourceX, SourceY)
1929 directly to every pixel of the video display rectangle
1930 (DestinationX, DestinationY)
1931 (DestinationX + Width, DestinationY + Height).
1932 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1933 EfiUgaVideoToBltBuffer:
1934 Read data from the video display rectangle
1935 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1936 the BltBuffer rectangle (DestinationX, DestinationY )
1937 (DestinationX + Width, DestinationY + Height). If DestinationX or
1938 DestinationY is not zero then Delta must be set to the length in bytes
1939 of a row in the BltBuffer.
1940 EfiUgaBltBufferToVideo:
1941 Write data from the BltBuffer rectangle
1942 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1943 video display rectangle (DestinationX, DestinationY)
1944 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1945 not zero then Delta must be set to the length in bytes of a row in the
1948 Copy from the video display rectangle
1949 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1950 to the video display rectangle (DestinationX, DestinationY)
1951 (DestinationX + Width, DestinationY + Height).
1952 The BltBuffer and Delta are not used in this mode.
1954 @param This Protocol instance pointer.
1955 @param BltBuffer Buffer containing data to blit into video buffer. This
1956 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1957 @param BltOperation Operation to perform on BlitBuffer and video memory
1958 @param SourceX X coordinate of source for the BltBuffer.
1959 @param SourceY Y coordinate of source for the BltBuffer.
1960 @param DestinationX X coordinate of destination for the BltBuffer.
1961 @param DestinationY Y coordinate of destination for the BltBuffer.
1962 @param Width Width of rectangle in BltBuffer in pixels.
1963 @param Height Hight of rectangle in BltBuffer in pixels.
1964 @param Delta OPTIONAL
1966 @retval EFI_SUCCESS The Blt operation completed.
1967 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1968 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1973 ConSplitterUgaDrawBlt (
1974 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1975 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1976 IN EFI_UGA_BLT_OPERATION BltOperation
,
1979 IN UINTN DestinationX
,
1980 IN UINTN DestinationY
,
1983 IN UINTN Delta OPTIONAL
1987 Sets the output device(s) to a specified mode.
1989 @param Private Text Out Splitter pointer.
1990 @param ModeNumber The mode number to set.
1995 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
2000 An empty function to pass error checking of CreateEventEx ().
2002 @param Event Event whose notification function is being invoked.
2003 @param Context Pointer to the notification function's context,
2004 which is implementation-dependent.
2009 ConSplitterEmptyCallbackFunction (