2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2009, 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_
20 #include <Protocol/DevicePath.h>
21 #include <Protocol/ComponentName.h>
22 #include <Protocol/DriverBinding.h>
23 #include <Protocol/SimplePointer.h>
24 #include <Protocol/AbsolutePointer.h>
25 #include <Protocol/SimpleTextOut.h>
26 #include <Protocol/SimpleTextIn.h>
27 #include <Protocol/SimpleTextInEx.h>
28 #include <Protocol/GraphicsOutput.h>
29 #include <Protocol/UgaDraw.h>
31 #include <Guid/ConsoleInDevice.h>
32 #include <Guid/StandardErrorDevice.h>
33 #include <Guid/ConsoleOutDevice.h>
35 #include <Library/PcdLib.h>
36 #include <Library/DebugLib.h>
37 #include <Library/UefiDriverEntryPoint.h>
38 #include <Library/UefiLib.h>
39 #include <Library/BaseLib.h>
40 #include <Library/BaseMemoryLib.h>
41 #include <Library/MemoryAllocationLib.h>
42 #include <Library/UefiBootServicesTableLib.h>
43 #include <Library/UefiRuntimeServicesTableLib.h>
47 // Driver Binding Externs
49 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
50 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
51 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
52 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
53 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
54 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
55 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
56 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
57 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
58 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
59 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
60 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
61 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
62 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
63 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
67 // These definitions were in the old Hii protocol, but are not in the new UEFI
68 // version. So they are defined locally.
70 #define UNICODE_NARROW_CHAR 0xFFF0
71 #define UNICODE_WIDE_CHAR 0xFFF1
75 // Private Data Structures
77 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
78 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
89 } TEXT_OUT_SPLITTER_QUERY_DATA
;
92 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
95 // Private data for Text In Ex Splitter Notify
97 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
99 EFI_HANDLE
*NotifyHandleList
;
100 EFI_HANDLE NotifyHandle
;
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
;
134 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
135 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
136 UINTN CurrentNumberOfPointers
;
137 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
138 UINTN PointerListCount
;
140 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
141 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
142 UINTN CurrentNumberOfAbsolutePointers
;
143 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
144 UINTN AbsolutePointerListCount
;
145 BOOLEAN AbsoluteInputEventSignalState
;
147 BOOLEAN KeyEventSignalState
;
148 BOOLEAN InputEventSignalState
;
149 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
151 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
153 TEXT_IN_SPLITTER_PRIVATE_DATA, \
155 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
158 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
160 TEXT_IN_SPLITTER_PRIVATE_DATA, \
162 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
164 #define TEXT_IN_EX_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_ABSOLUTE_POINTER_THIS(a) \
173 TEXT_IN_SPLITTER_PRIVATE_DATA, \
175 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
179 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
182 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
183 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
184 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
185 } TEXT_OUT_AND_GOP_DATA
;
188 // Private data for the Console Out splitter
192 EFI_HANDLE VirtualHandle
;
193 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
194 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
196 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
197 UINT32 UgaHorizontalResolution
;
198 UINT32 UgaVerticalResolution
;
199 UINT32 UgaColorDepth
;
200 UINT32 UgaRefreshRate
;
202 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
203 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
204 UINTN CurrentNumberOfGraphicsOutput
;
205 UINTN CurrentNumberOfUgaDraw
;
206 BOOLEAN HardwareNeedsStarting
;
208 UINTN CurrentNumberOfConsoles
;
209 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
210 UINTN TextOutListCount
;
211 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
212 UINTN TextOutQueryDataCount
;
213 INT32
*TextOutModeMap
;
215 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
217 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
219 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
221 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
224 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
226 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
228 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
231 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
233 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
235 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
238 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
240 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
242 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
246 // Function Prototypes
250 The user Entry Point for module ConSplitter. The user code starts with this function.
252 Installs driver module protocols and. Creates virtual device handles for ConIn,
253 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
254 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
255 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
257 @param[in] ImageHandle The firmware allocated handle for the EFI image.
258 @param[in] SystemTable A pointer to the EFI System Table.
260 @retval EFI_SUCCESS The entry point is executed successfully.
261 @retval other Some error occurs when executing this entry point.
266 ConSplitterDriverEntry (
267 IN EFI_HANDLE ImageHandle
,
268 IN EFI_SYSTEM_TABLE
*SystemTable
272 Construct console input devices' private data.
274 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
277 @retval EFI_OUT_OF_RESOURCES Out of resources.
278 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
279 @retval other Failed to construct private data.
283 ConSplitterTextInConstructor (
284 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
288 Construct console output devices' private data.
290 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
293 @retval EFI_OUT_OF_RESOURCES Out of resources.
294 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
298 ConSplitterTextOutConstructor (
299 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
304 Test to see if Console In Device could be supported on the Controller.
306 @param This Driver Binding protocol instance pointer.
307 @param ControllerHandle Handle of device to test.
308 @param RemainingDevicePath Optional parameter use to pick a specific child
311 @retval EFI_SUCCESS This driver supports this device.
312 @retval other This driver does not support this device.
317 ConSplitterConInDriverBindingSupported (
318 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
319 IN EFI_HANDLE ControllerHandle
,
320 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
324 Test to see if Simple Pointer protocol could be supported on the Controller.
326 @param This Driver Binding protocol instance pointer.
327 @param ControllerHandle Handle of device to test.
328 @param RemainingDevicePath Optional parameter use to pick a specific child
331 @retval EFI_SUCCESS This driver supports this device.
332 @retval other This driver does not support this device.
337 ConSplitterSimplePointerDriverBindingSupported (
338 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
339 IN EFI_HANDLE ControllerHandle
,
340 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
344 Test to see if Console Out Device could be supported on the Controller.
346 @param This Driver Binding protocol instance pointer.
347 @param ControllerHandle Handle of device to test.
348 @param RemainingDevicePath Optional parameter use to pick a specific child
351 @retval EFI_SUCCESS This driver supports this device.
352 @retval other This driver does not support this device.
357 ConSplitterConOutDriverBindingSupported (
358 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
359 IN EFI_HANDLE ControllerHandle
,
360 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
364 Test to see if Standard Error Device could be supported on the Controller.
366 @param This Driver Binding protocol instance pointer.
367 @param ControllerHandle Handle of device to test.
368 @param RemainingDevicePath Optional parameter use to pick a specific child
371 @retval EFI_SUCCESS This driver supports this device.
372 @retval other This driver does not support this device.
377 ConSplitterStdErrDriverBindingSupported (
378 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
379 IN EFI_HANDLE ControllerHandle
,
380 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
384 Start Console In Consplitter on device handle.
386 @param This Driver Binding protocol instance pointer.
387 @param ControllerHandle Handle of device to bind driver to.
388 @param RemainingDevicePath Optional parameter use to pick a specific child
391 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
392 @retval other Console In Consplitter does not support this device.
397 ConSplitterConInDriverBindingStart (
398 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
399 IN EFI_HANDLE ControllerHandle
,
400 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
404 Start Simple Pointer Consplitter on device handle.
406 @param This Driver Binding protocol instance pointer.
407 @param ControllerHandle Handle of device to bind driver to.
408 @param RemainingDevicePath Optional parameter use to pick a specific child
411 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
412 @retval other Simple Pointer Consplitter does not support this device.
417 ConSplitterSimplePointerDriverBindingStart (
418 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
419 IN EFI_HANDLE ControllerHandle
,
420 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
424 Start Console Out Consplitter on device handle.
426 @param This Driver Binding protocol instance pointer.
427 @param ControllerHandle Handle of device to bind driver to.
428 @param RemainingDevicePath Optional parameter use to pick a specific child
431 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
432 @retval other Console Out Consplitter does not support this device.
437 ConSplitterConOutDriverBindingStart (
438 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
439 IN EFI_HANDLE ControllerHandle
,
440 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
444 Start Standard Error Consplitter on device handle.
446 @param This Driver Binding protocol instance pointer.
447 @param ControllerHandle Handle of device to bind driver to.
448 @param RemainingDevicePath Optional parameter use to pick a specific child
451 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
452 @retval other Standard Error Consplitter does not support this device.
457 ConSplitterStdErrDriverBindingStart (
458 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
459 IN EFI_HANDLE ControllerHandle
,
460 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
464 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
466 @param This Driver Binding protocol instance pointer.
467 @param ControllerHandle Handle of device to stop driver on
468 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
469 children is zero stop the entire bus driver.
470 @param ChildHandleBuffer List of Child Handles to Stop.
472 @retval EFI_SUCCESS This driver is removed ControllerHandle
473 @retval other This driver was not removed from this device
478 ConSplitterConInDriverBindingStop (
479 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
480 IN EFI_HANDLE ControllerHandle
,
481 IN UINTN NumberOfChildren
,
482 IN EFI_HANDLE
*ChildHandleBuffer
486 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
487 Simple Pointer protocol.
489 @param This Driver Binding protocol instance pointer.
490 @param ControllerHandle Handle of device to stop driver on
491 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
492 children is zero stop the entire bus driver.
493 @param ChildHandleBuffer List of Child Handles to Stop.
495 @retval EFI_SUCCESS This driver is removed ControllerHandle
496 @retval other This driver was not removed from this device
501 ConSplitterSimplePointerDriverBindingStop (
502 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
503 IN EFI_HANDLE ControllerHandle
,
504 IN UINTN NumberOfChildren
,
505 IN EFI_HANDLE
*ChildHandleBuffer
509 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
511 @param This Driver Binding protocol instance pointer.
512 @param ControllerHandle Handle of device to stop driver on
513 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
514 children is zero stop the entire bus driver.
515 @param ChildHandleBuffer List of Child Handles to Stop.
517 @retval EFI_SUCCESS This driver is removed ControllerHandle
518 @retval other This driver was not removed from this device
523 ConSplitterConOutDriverBindingStop (
524 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
525 IN EFI_HANDLE ControllerHandle
,
526 IN UINTN NumberOfChildren
,
527 IN EFI_HANDLE
*ChildHandleBuffer
531 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
533 @param This Driver Binding protocol instance pointer.
534 @param ControllerHandle Handle of device to stop driver on
535 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
536 children is zero stop the entire bus driver.
537 @param ChildHandleBuffer List of Child Handles to Stop.
539 @retval EFI_SUCCESS This driver is removed ControllerHandle
540 @retval other This driver was not removed from this device
545 ConSplitterStdErrDriverBindingStop (
546 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
547 IN EFI_HANDLE ControllerHandle
,
548 IN UINTN NumberOfChildren
,
549 IN EFI_HANDLE
*ChildHandleBuffer
554 Test to see if Absolute Pointer protocol could be supported on the Controller.
556 @param This Driver Binding protocol instance pointer.
557 @param ControllerHandle Handle of device to test.
558 @param RemainingDevicePath Optional parameter use to pick a specific child
561 @retval EFI_SUCCESS This driver supports this device.
562 @retval other This driver does not support this device.
567 ConSplitterAbsolutePointerDriverBindingSupported (
568 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
569 IN EFI_HANDLE ControllerHandle
,
570 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
574 Start Absolute Pointer Consplitter on device handle.
576 @param This Driver Binding protocol instance pointer.
577 @param ControllerHandle Handle of device to bind driver to.
578 @param RemainingDevicePath Optional parameter use to pick a specific child
581 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
582 @retval other Absolute Pointer Consplitter does not support this device.
587 ConSplitterAbsolutePointerDriverBindingStart (
588 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
589 IN EFI_HANDLE ControllerHandle
,
590 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
594 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
595 Absolute Pointer protocol.
597 @param This Driver Binding protocol instance pointer.
598 @param ControllerHandle Handle of device to stop driver on
599 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
600 children is zero stop the entire bus driver.
601 @param ChildHandleBuffer List of Child Handles to Stop.
603 @retval EFI_SUCCESS This driver is removed ControllerHandle
604 @retval other This driver was not removed from this device
609 ConSplitterAbsolutePointerDriverBindingStop (
610 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
611 IN EFI_HANDLE ControllerHandle
,
612 IN UINTN NumberOfChildren
,
613 IN EFI_HANDLE
*ChildHandleBuffer
617 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
619 @param Private Text In Splitter pointer.
620 @param AbsolutePointer Absolute Pointer protocol pointer.
622 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
623 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
627 ConSplitterAbsolutePointerAddDevice (
628 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
629 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
633 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
635 @param Private Text In Splitter pointer.
636 @param AbsolutePointer Absolute Pointer protocol pointer.
638 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
639 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
643 ConSplitterAbsolutePointerDeleteDevice (
644 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
645 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
649 // Absolute Pointer protocol interfaces
654 Resets the pointer device hardware.
656 @param This Protocol instance pointer.
657 @param ExtendedVerification Driver may perform diagnostics on reset.
659 @retval EFI_SUCCESS The device was reset.
660 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
666 ConSplitterAbsolutePointerReset (
667 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
668 IN BOOLEAN ExtendedVerification
673 Retrieves the current state of a pointer device.
675 @param This Protocol instance pointer.
676 @param State A pointer to the state information on the
679 @retval EFI_SUCCESS The state of the pointer device was returned in
681 @retval EFI_NOT_READY The state of the pointer device has not changed
682 since the last call to GetState().
683 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
684 retrieve the pointer device's current state.
689 ConSplitterAbsolutePointerGetState (
690 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
691 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
695 This event agregates all the events of the pointer devices in the splitter.
697 If any events of physical pointer devices are signaled, signal the pointer
698 splitter event. This will cause the calling code to call
699 ConSplitterAbsolutePointerGetState ().
701 @param Event The Event assoicated with callback.
702 @param Context Context registered when Event was created.
707 ConSplitterAbsolutePointerWaitForInput (
713 Retrieves a Unicode string that is the user readable name of the driver.
715 This function retrieves the user readable name of a driver in the form of a
716 Unicode string. If the driver specified by This has a user readable name in
717 the language specified by Language, then a pointer to the driver name is
718 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
719 by This does not support the language specified by Language,
720 then EFI_UNSUPPORTED is returned.
722 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
723 EFI_COMPONENT_NAME_PROTOCOL instance.
725 @param Language[in] A pointer to a Null-terminated ASCII string
726 array indicating the language. This is the
727 language of the driver name that the caller is
728 requesting, and it must match one of the
729 languages specified in SupportedLanguages. The
730 number of languages supported by a driver is up
731 to the driver writer. Language is specified
732 in RFC 4646 or ISO 639-2 language code format.
734 @param DriverName[out] A pointer to the Unicode string to return.
735 This Unicode string is the name of the
736 driver specified by This in the language
737 specified by Language.
739 @retval EFI_SUCCESS The Unicode string for the Driver specified by
740 This and the language specified by Language was
741 returned in DriverName.
743 @retval EFI_INVALID_PARAMETER Language is NULL.
745 @retval EFI_INVALID_PARAMETER DriverName is NULL.
747 @retval EFI_UNSUPPORTED The driver specified by This does not support
748 the language specified by Language.
753 ConSplitterComponentNameGetDriverName (
754 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
756 OUT CHAR16
**DriverName
761 Retrieves a Unicode string that is the user readable name of the controller
762 that is being managed by a driver.
764 This function retrieves the user readable name of the controller specified by
765 ControllerHandle and ChildHandle in the form of a Unicode string. If the
766 driver specified by This has a user readable name in the language specified by
767 Language, then a pointer to the controller name is returned in ControllerName,
768 and EFI_SUCCESS is returned. If the driver specified by This is not currently
769 managing the controller specified by ControllerHandle and ChildHandle,
770 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
771 support the language specified by Language, then EFI_UNSUPPORTED is returned.
773 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
774 EFI_COMPONENT_NAME_PROTOCOL instance.
776 @param ControllerHandle[in] The handle of a controller that the driver
777 specified by This is managing. This handle
778 specifies the controller whose name is to be
781 @param ChildHandle[in] The handle of the child controller to retrieve
782 the name of. This is an optional parameter that
783 may be NULL. It will be NULL for device
784 drivers. It will also be NULL for a bus drivers
785 that wish to retrieve the name of the bus
786 controller. It will not be NULL for a bus
787 driver that wishes to retrieve the name of a
790 @param Language[in] A pointer to a Null-terminated ASCII string
791 array indicating the language. This is the
792 language of the driver name that the caller is
793 requesting, and it must match one of the
794 languages specified in SupportedLanguages. The
795 number of languages supported by a driver is up
796 to the driver writer. Language is specified in
797 RFC 4646 or ISO 639-2 language code format.
799 @param ControllerName[out] A pointer to the Unicode string to return.
800 This Unicode string is the name of the
801 controller specified by ControllerHandle and
802 ChildHandle in the language specified by
803 Language from the point of view of the driver
806 @retval EFI_SUCCESS The Unicode string for the user readable name in
807 the language specified by Language for the
808 driver specified by This was returned in
811 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
813 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
816 @retval EFI_INVALID_PARAMETER Language is NULL.
818 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
820 @retval EFI_UNSUPPORTED The driver specified by This is not currently
821 managing the controller specified by
822 ControllerHandle and ChildHandle.
824 @retval EFI_UNSUPPORTED The driver specified by This does not support
825 the language specified by Language.
830 ConSplitterConInComponentNameGetControllerName (
831 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
832 IN EFI_HANDLE ControllerHandle
,
833 IN EFI_HANDLE ChildHandle OPTIONAL
,
835 OUT CHAR16
**ControllerName
840 Retrieves a Unicode string that is the user readable name of the controller
841 that is being managed by a driver.
843 This function retrieves the user readable name of the controller specified by
844 ControllerHandle and ChildHandle in the form of a Unicode string. If the
845 driver specified by This has a user readable name in the language specified by
846 Language, then a pointer to the controller name is returned in ControllerName,
847 and EFI_SUCCESS is returned. If the driver specified by This is not currently
848 managing the controller specified by ControllerHandle and ChildHandle,
849 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
850 support the language specified by Language, then EFI_UNSUPPORTED is returned.
852 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
853 EFI_COMPONENT_NAME_PROTOCOL instance.
855 @param ControllerHandle[in] The handle of a controller that the driver
856 specified by This is managing. This handle
857 specifies the controller whose name is to be
860 @param ChildHandle[in] The handle of the child controller to retrieve
861 the name of. This is an optional parameter that
862 may be NULL. It will be NULL for device
863 drivers. It will also be NULL for a bus drivers
864 that wish to retrieve the name of the bus
865 controller. It will not be NULL for a bus
866 driver that wishes to retrieve the name of a
869 @param Language[in] A pointer to a Null-terminated ASCII string
870 array indicating the language. This is the
871 language of the driver name that the caller is
872 requesting, and it must match one of the
873 languages specified in SupportedLanguages. The
874 number of languages supported by a driver is up
875 to the driver writer. Language is specified in
876 RFC 4646 or ISO 639-2 language code format.
878 @param ControllerName[out] A pointer to the Unicode string to return.
879 This Unicode string is the name of the
880 controller specified by ControllerHandle and
881 ChildHandle in the language specified by
882 Language from the point of view of the driver
885 @retval EFI_SUCCESS The Unicode string for the user readable name in
886 the language specified by Language for the
887 driver specified by This was returned in
890 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
892 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
895 @retval EFI_INVALID_PARAMETER Language is NULL.
897 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
899 @retval EFI_UNSUPPORTED The driver specified by This is not currently
900 managing the controller specified by
901 ControllerHandle and ChildHandle.
903 @retval EFI_UNSUPPORTED The driver specified by This does not support
904 the language specified by Language.
909 ConSplitterSimplePointerComponentNameGetControllerName (
910 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
911 IN EFI_HANDLE ControllerHandle
,
912 IN EFI_HANDLE ChildHandle OPTIONAL
,
914 OUT CHAR16
**ControllerName
918 Retrieves a Unicode string that is the user readable name of the controller
919 that is being managed by an EFI Driver.
921 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
923 @param ControllerHandle The handle of a controller that the driver
924 specified by This is managing. This handle
925 specifies the controller whose name is to be
927 @param ChildHandle The handle of the child controller to retrieve the
928 name of. This is an optional parameter that may
929 be NULL. It will be NULL for device drivers. It
930 will also be NULL for a bus drivers that wish to
931 retrieve the name of the bus controller. It will
932 not be NULL for a bus driver that wishes to
933 retrieve the name of a child controller.
934 @param Language A pointer to RFC4646 language identifier. This is
935 the language of the controller name that that the
936 caller is requesting, and it must match one of the
937 languages specified in SupportedLanguages. The
938 number of languages supported by a driver is up to
940 @param ControllerName A pointer to the Unicode string to return. This
941 Unicode string is the name of the controller
942 specified by ControllerHandle and ChildHandle in
943 the language specified by Language from the point
944 of view of the driver specified by This.
946 @retval EFI_SUCCESS The Unicode string for the user readable name in
947 the language specified by Language for the driver
948 specified by This was returned in DriverName.
949 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
950 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
952 @retval EFI_INVALID_PARAMETER Language is NULL.
953 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
954 @retval EFI_UNSUPPORTED The driver specified by This is not currently
955 managing the controller specified by
956 ControllerHandle and ChildHandle.
957 @retval EFI_UNSUPPORTED The driver specified by This does not support the
958 language specified by Language.
963 ConSplitterAbsolutePointerComponentNameGetControllerName (
964 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
965 IN EFI_HANDLE ControllerHandle
,
966 IN EFI_HANDLE ChildHandle OPTIONAL
,
968 OUT CHAR16
**ControllerName
972 Retrieves a Unicode string that is the user readable name of the controller
973 that is being managed by a driver.
975 This function retrieves the user readable name of the controller specified by
976 ControllerHandle and ChildHandle in the form of a Unicode string. If the
977 driver specified by This has a user readable name in the language specified by
978 Language, then a pointer to the controller name is returned in ControllerName,
979 and EFI_SUCCESS is returned. If the driver specified by This is not currently
980 managing the controller specified by ControllerHandle and ChildHandle,
981 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
982 support the language specified by Language, then EFI_UNSUPPORTED is returned.
984 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
985 EFI_COMPONENT_NAME_PROTOCOL instance.
987 @param ControllerHandle[in] The handle of a controller that the driver
988 specified by This is managing. This handle
989 specifies the controller whose name is to be
992 @param ChildHandle[in] The handle of the child controller to retrieve
993 the name of. This is an optional parameter that
994 may be NULL. It will be NULL for device
995 drivers. It will also be NULL for a bus drivers
996 that wish to retrieve the name of the bus
997 controller. It will not be NULL for a bus
998 driver that wishes to retrieve the name of a
1001 @param Language[in] A pointer to a Null-terminated ASCII string
1002 array indicating the language. This is the
1003 language of the driver name that the caller is
1004 requesting, and it must match one of the
1005 languages specified in SupportedLanguages. The
1006 number of languages supported by a driver is up
1007 to the driver writer. Language is specified in
1008 RFC 4646 or ISO 639-2 language code format.
1010 @param ControllerName[out] A pointer to the Unicode string to return.
1011 This Unicode string is the name of the
1012 controller specified by ControllerHandle and
1013 ChildHandle in the language specified by
1014 Language from the point of view of the driver
1017 @retval EFI_SUCCESS The Unicode string for the user readable name in
1018 the language specified by Language for the
1019 driver specified by This was returned in
1022 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
1024 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1027 @retval EFI_INVALID_PARAMETER Language is NULL.
1029 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1031 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1032 managing the controller specified by
1033 ControllerHandle and ChildHandle.
1035 @retval EFI_UNSUPPORTED The driver specified by This does not support
1036 the language specified by Language.
1041 ConSplitterConOutComponentNameGetControllerName (
1042 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1043 IN EFI_HANDLE ControllerHandle
,
1044 IN EFI_HANDLE ChildHandle OPTIONAL
,
1046 OUT CHAR16
**ControllerName
1051 Retrieves a Unicode string that is the user readable name of the controller
1052 that is being managed by a driver.
1054 This function retrieves the user readable name of the controller specified by
1055 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1056 driver specified by This has a user readable name in the language specified by
1057 Language, then a pointer to the controller name is returned in ControllerName,
1058 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1059 managing the controller specified by ControllerHandle and ChildHandle,
1060 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1061 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1063 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1064 EFI_COMPONENT_NAME_PROTOCOL instance.
1066 @param ControllerHandle[in] The handle of a controller that the driver
1067 specified by This is managing. This handle
1068 specifies the controller whose name is to be
1071 @param ChildHandle[in] The handle of the child controller to retrieve
1072 the name of. This is an optional parameter that
1073 may be NULL. It will be NULL for device
1074 drivers. It will also be NULL for a bus drivers
1075 that wish to retrieve the name of the bus
1076 controller. It will not be NULL for a bus
1077 driver that wishes to retrieve the name of a
1080 @param Language[in] A pointer to a Null-terminated ASCII string
1081 array indicating the language. This is the
1082 language of the driver name that the caller is
1083 requesting, and it must match one of the
1084 languages specified in SupportedLanguages. The
1085 number of languages supported by a driver is up
1086 to the driver writer. Language is specified in
1087 RFC 4646 or ISO 639-2 language code format.
1089 @param ControllerName[out] A pointer to the Unicode string to return.
1090 This Unicode string is the name of the
1091 controller specified by ControllerHandle and
1092 ChildHandle in the language specified by
1093 Language from the point of view of the driver
1096 @retval EFI_SUCCESS The Unicode string for the user readable name in
1097 the language specified by Language for the
1098 driver specified by This was returned in
1101 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
1103 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1106 @retval EFI_INVALID_PARAMETER Language is NULL.
1108 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1110 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1111 managing the controller specified by
1112 ControllerHandle and ChildHandle.
1114 @retval EFI_UNSUPPORTED The driver specified by This does not support
1115 the language specified by Language.
1120 ConSplitterStdErrComponentNameGetControllerName (
1121 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1122 IN EFI_HANDLE ControllerHandle
,
1123 IN EFI_HANDLE ChildHandle OPTIONAL
,
1125 OUT CHAR16
**ControllerName
1130 // TextIn Constructor/Destructor functions
1134 Add Text Input Device in Consplitter Text Input list.
1136 @param Private Text In Splitter pointer.
1137 @param TextIn Simple Text Input protocol pointer.
1139 @retval EFI_SUCCESS Text Input Device added successfully.
1140 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1144 ConSplitterTextInAddDevice (
1145 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1146 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1150 Remove Text Input Device from Consplitter Text Input list.
1152 @param Private Text In Splitter pointer.
1153 @param TextIn Simple Text protocol pointer.
1155 @retval EFI_SUCCESS Simple Text Device removed successfully.
1156 @retval EFI_NOT_FOUND No Simple Text Device found.
1160 ConSplitterTextInDeleteDevice (
1161 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1162 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1166 // SimplePointer Constuctor/Destructor functions
1170 Add Simple Pointer Device in Consplitter Simple Pointer list.
1172 @param Private Text In Splitter pointer.
1173 @param SimplePointer Simple Pointer protocol pointer.
1175 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1176 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1180 ConSplitterSimplePointerAddDevice (
1181 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1182 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1186 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1188 @param Private Text In Splitter pointer.
1189 @param SimplePointer Simple Pointer protocol pointer.
1191 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1192 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1196 ConSplitterSimplePointerDeleteDevice (
1197 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1198 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1202 // TextOut Constuctor/Destructor functions
1206 Add Text Output Device in Consplitter Text Output list.
1208 @param Private Text Out Splitter pointer.
1209 @param TextOut Simple Text Output protocol pointer.
1210 @param GraphicsOutput Graphics Output protocol pointer.
1211 @param UgaDraw UGA Draw protocol pointer.
1213 @retval EFI_SUCCESS Text Output Device added successfully.
1214 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1218 ConSplitterTextOutAddDevice (
1219 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1220 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1221 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1222 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1226 Remove Text Out Device in Consplitter Text Out list.
1228 @param Private Text Out Splitter pointer.
1229 @param TextOut Simple Text Output Pointer protocol pointer.
1231 @retval EFI_SUCCESS Text Out Device removed successfully.
1232 @retval EFI_NOT_FOUND No Text Out Device found.
1236 ConSplitterTextOutDeleteDevice (
1237 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1238 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1242 // TextIn I/O Functions
1246 Reset the input device and optionaly run diagnostics
1248 @param This Protocol instance pointer.
1249 @param ExtendedVerification Driver may perform diagnostics on reset.
1251 @retval EFI_SUCCESS The device was reset.
1252 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1258 ConSplitterTextInReset (
1259 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1260 IN BOOLEAN ExtendedVerification
1264 Reads the next keystroke from the input device. The WaitForKey Event can
1265 be used to test for existance of a keystroke via WaitForEvent () call.
1267 @param This Protocol instance pointer.
1268 @param Key Driver may perform diagnostics on reset.
1270 @retval EFI_SUCCESS The keystroke information was returned.
1271 @retval EFI_NOT_READY There was no keystroke data availiable.
1272 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1278 ConSplitterTextInReadKeyStroke (
1279 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1280 OUT EFI_INPUT_KEY
*Key
1284 Add Text Input Ex Device in Consplitter Text Input Ex list.
1286 @param Private Text In Splitter pointer.
1287 @param TextInEx Simple Text Input Ex Input protocol pointer.
1289 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1290 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1294 ConSplitterTextInExAddDevice (
1295 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1296 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1300 Remove Text Ex Device from Consplitter Text Input Ex list.
1302 @param Private Text In Splitter pointer.
1303 @param TextInEx Simple Text Ex protocol pointer.
1305 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1306 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1310 ConSplitterTextInExDeleteDevice (
1311 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1312 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1316 // Simple Text Input Ex protocol function prototypes
1320 Reset the input device and optionaly run diagnostics
1322 @param This Protocol instance pointer.
1323 @param ExtendedVerification Driver may perform diagnostics on reset.
1325 @retval EFI_SUCCESS The device was reset.
1326 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1332 ConSplitterTextInResetEx (
1333 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1334 IN BOOLEAN ExtendedVerification
1339 Reads the next keystroke from the input device. The WaitForKey Event can
1340 be used to test for existance of a keystroke via WaitForEvent () call.
1342 @param This Protocol instance pointer.
1343 @param KeyData A pointer to a buffer that is filled in with the
1344 keystroke state data for the key that was
1347 @retval EFI_SUCCESS The keystroke information was returned.
1348 @retval EFI_NOT_READY There was no keystroke data availiable.
1349 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1351 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1356 ConSplitterTextInReadKeyStrokeEx (
1357 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1358 OUT EFI_KEY_DATA
*KeyData
1363 Set certain state for the input device.
1365 @param This Protocol instance pointer.
1366 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1367 state for the input device.
1369 @retval EFI_SUCCESS The device state was set successfully.
1370 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1371 could not have the setting adjusted.
1372 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1374 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1379 ConSplitterTextInSetState (
1380 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1381 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1386 Register a notification function for a particular keystroke for the input device.
1388 @param This Protocol instance pointer.
1389 @param KeyData A pointer to a buffer that is filled in with the
1390 keystroke information data for the key that was
1392 @param KeyNotificationFunction Points to the function to be called when the key
1393 sequence is typed specified by KeyData.
1394 @param NotifyHandle Points to the unique handle assigned to the
1395 registered notification.
1397 @retval EFI_SUCCESS The notification function was registered
1399 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1401 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1406 ConSplitterTextInRegisterKeyNotify (
1407 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1408 IN EFI_KEY_DATA
*KeyData
,
1409 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1410 OUT EFI_HANDLE
*NotifyHandle
1415 Remove a registered notification function from a particular keystroke.
1417 @param This Protocol instance pointer.
1418 @param NotificationHandle The handle of the notification function being
1421 @retval EFI_SUCCESS The notification function was unregistered
1423 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1424 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1429 ConSplitterTextInUnregisterKeyNotify (
1430 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1431 IN EFI_HANDLE NotificationHandle
1435 This event aggregates all the events of the ConIn devices in the spliter.
1437 If any events of physical ConIn devices are signaled, signal the ConIn
1438 spliter event. This will cause the calling code to call
1439 ConSplitterTextInReadKeyStroke ().
1441 @param Event The Event assoicated with callback.
1442 @param Context Context registered when Event was created.
1447 ConSplitterTextInWaitForKey (
1454 Reads the next keystroke from the input device. The WaitForKey Event can
1455 be used to test for existance of a keystroke via WaitForEvent () call.
1457 @param Private Protocol instance pointer.
1458 @param Key Driver may perform diagnostics on reset.
1460 @retval EFI_SUCCESS The keystroke information was returned.
1461 @retval EFI_NOT_READY There was no keystroke data availiable.
1462 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1468 ConSplitterTextInPrivateReadKeyStroke (
1469 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1470 OUT EFI_INPUT_KEY
*Key
1474 Reset the input device and optionaly run diagnostics
1476 @param This Protocol instance pointer.
1477 @param ExtendedVerification Driver may perform diagnostics on reset.
1479 @retval EFI_SUCCESS The device was reset.
1480 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1486 ConSplitterSimplePointerReset (
1487 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1488 IN BOOLEAN ExtendedVerification
1492 Reads the next keystroke from the input device. The WaitForKey Event can
1493 be used to test for existance of a keystroke via WaitForEvent () call.
1495 @param This A pointer to protocol instance.
1496 @param State A pointer to state information on the pointer device
1498 @retval EFI_SUCCESS The keystroke information was returned in State.
1499 @retval EFI_NOT_READY There was no keystroke data availiable.
1500 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1506 ConSplitterSimplePointerGetState (
1507 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1508 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1512 This event agregates all the events of the ConIn devices in the spliter.
1513 If any events of physical ConIn devices are signaled, signal the ConIn
1514 spliter event. This will cause the calling code to call
1515 ConSplitterTextInReadKeyStroke ().
1517 @param Event The Event assoicated with callback.
1518 @param Context Context registered when Event was created.
1523 ConSplitterSimplePointerWaitForInput (
1529 // TextOut I/O Functions
1533 Reset the text output device hardware and optionaly run diagnostics
1535 @param This Protocol instance pointer.
1536 @param ExtendedVerification Driver may perform more exhaustive verfication
1537 operation of the device during reset.
1539 @retval EFI_SUCCESS The text output device was reset.
1540 @retval EFI_DEVICE_ERROR The text output device is not functioning
1541 correctly and could not be reset.
1546 ConSplitterTextOutReset (
1547 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1548 IN BOOLEAN ExtendedVerification
1552 Write a Unicode string to the output device.
1554 @param This Protocol instance pointer.
1555 @param WString The NULL-terminated Unicode string to be
1556 displayed on the output device(s). All output
1557 devices must also support the Unicode drawing
1558 defined in this file.
1560 @retval EFI_SUCCESS The string was output to the device.
1561 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1563 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1565 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1566 characters in the Unicode string could not be
1567 rendered and were skipped.
1572 ConSplitterTextOutOutputString (
1573 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1578 Verifies that all characters in a Unicode string can be output to the
1581 @param This Protocol instance pointer.
1582 @param WString The NULL-terminated Unicode string to be
1583 examined for the output device(s).
1585 @retval EFI_SUCCESS The device(s) are capable of rendering the
1587 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1588 cannot be rendered by one or more of the output
1589 devices mapped by the EFI handle.
1594 ConSplitterTextOutTestString (
1595 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1600 Returns information for an available text mode that the output device(s)
1603 @param This Protocol instance pointer.
1604 @param ModeNumber The mode number to return information on.
1605 @param Columns Returns the columns of the text output device
1606 for the requested ModeNumber.
1607 @param Rows Returns the rows of the text output device
1608 for the requested ModeNumber.
1610 @retval EFI_SUCCESS The requested mode information was returned.
1611 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1613 @retval EFI_UNSUPPORTED The mode number was not valid.
1618 ConSplitterTextOutQueryMode (
1619 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1620 IN UINTN ModeNumber
,
1626 Sets the output device(s) to a specified mode.
1628 @param This Protocol instance pointer.
1629 @param ModeNumber The mode number to set.
1631 @retval EFI_SUCCESS The requested text mode was set.
1632 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1634 @retval EFI_UNSUPPORTED The mode number was not valid.
1639 ConSplitterTextOutSetMode (
1640 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1645 Sets the background and foreground colors for the OutputString () and
1646 ClearScreen () functions.
1648 @param This Protocol instance pointer.
1649 @param Attribute The attribute to set. Bits 0..3 are the
1650 foreground color, and bits 4..6 are the
1651 background color. All other bits are undefined
1652 and must be zero. The valid Attributes are
1653 defined in this file.
1655 @retval EFI_SUCCESS The attribute was set.
1656 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1658 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1663 ConSplitterTextOutSetAttribute (
1664 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1669 Clears the output device(s) display to the currently selected background
1672 @param This Protocol instance pointer.
1674 @retval EFI_SUCCESS The operation completed successfully.
1675 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1677 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1682 ConSplitterTextOutClearScreen (
1683 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1687 Sets the current coordinates of the cursor position
1689 @param This Protocol instance pointer.
1690 @param Column The column position to set the cursor to. Must be
1691 greater than or equal to zero and less than the
1692 number of columns by QueryMode ().
1693 @param Row The row position to set the cursor to. Must be
1694 greater than or equal to zero and less than the
1695 number of rows by QueryMode ().
1697 @retval EFI_SUCCESS The operation completed successfully.
1698 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1700 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1701 or the cursor position is invalid for the
1707 ConSplitterTextOutSetCursorPosition (
1708 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1715 Makes the cursor visible or invisible
1717 @param This Protocol instance pointer.
1718 @param Visible If TRUE, the cursor is set to be visible. If
1719 FALSE, the cursor is set to be invisible.
1721 @retval EFI_SUCCESS The operation completed successfully.
1722 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1723 the request, or the device does not support
1724 changing the cursor mode.
1725 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1730 ConSplitterTextOutEnableCursor (
1731 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1736 Take the passed in Buffer of size SizeOfCount and grow the buffer
1737 by MAX (CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT, MaxGrow) * SizeOfCount
1738 bytes. Copy the current data in Buffer to the new version of Buffer
1739 and free the old version of buffer.
1741 @param SizeOfCount Size of element in array.
1742 @param Count Current number of elements in array.
1743 @param Buffer Bigger version of passed in Buffer with all the
1746 @retval EFI_SUCCESS Buffer size has grown.
1747 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1751 ConSplitterGrowBuffer (
1752 IN UINTN SizeOfCount
,
1753 IN OUT UINTN
*Count
,
1754 IN OUT VOID
**Buffer
1758 Returns information for an available graphics mode that the graphics device
1759 and the set of active video output devices supports.
1761 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1762 @param ModeNumber The mode number to return information on.
1763 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1764 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1766 @retval EFI_SUCCESS Mode information returned.
1767 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1768 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1769 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1770 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1771 @retval EFI_OUT_OF_RESOURCES No resource available.
1776 ConSplitterGraphicsOutputQueryMode (
1777 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1778 IN UINT32 ModeNumber
,
1779 OUT UINTN
*SizeOfInfo
,
1780 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1784 Set the video device into the specified mode and clears the visible portions of
1785 the output display to black.
1787 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1788 @param ModeNumber Abstraction that defines the current video mode.
1790 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1791 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1792 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1793 @retval EFI_OUT_OF_RESOURCES No resource available.
1798 ConSplitterGraphicsOutputSetMode (
1799 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1800 IN UINT32 ModeNumber
1804 The following table defines actions for BltOperations.
1806 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1807 directly to every pixel of the video display rectangle
1808 (DestinationX, DestinationY)
1809 (DestinationX + Width, DestinationY + Height).
1810 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1811 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1812 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1813 the BltBuffer rectangle (DestinationX, DestinationY )
1814 (DestinationX + Width, DestinationY + Height). If DestinationX or
1815 DestinationY is not zero then Delta must be set to the length in bytes
1816 of a row in the BltBuffer.
1817 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1818 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1819 video display rectangle (DestinationX, DestinationY)
1820 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1821 not zero then Delta must be set to the length in bytes of a row in the
1823 EfiBltVideoToVideo - Copy from the video display rectangle
1824 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1825 to the video display rectangle (DestinationX, DestinationY)
1826 (DestinationX + Width, DestinationY + Height).
1827 The BltBuffer and Delta are not used in this mode.
1829 @param This Protocol instance pointer.
1830 @param BltBuffer Buffer containing data to blit into video buffer.
1831 This buffer has a size of
1832 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1833 @param BltOperation Operation to perform on BlitBuffer and video
1835 @param SourceX X coordinate of source for the BltBuffer.
1836 @param SourceY Y coordinate of source for the BltBuffer.
1837 @param DestinationX X coordinate of destination for the BltBuffer.
1838 @param DestinationY Y coordinate of destination for the BltBuffer.
1839 @param Width Width of rectangle in BltBuffer in pixels.
1840 @param Height Hight of rectangle in BltBuffer in pixels.
1841 @param Delta OPTIONAL.
1843 @retval EFI_SUCCESS The Blt operation completed.
1844 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1845 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1851 ConSplitterGraphicsOutputBlt (
1852 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1853 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1854 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1857 IN UINTN DestinationX
,
1858 IN UINTN DestinationY
,
1861 IN UINTN Delta OPTIONAL
1866 Return the current video mode information.
1868 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1869 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1870 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1871 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1872 @param RefreshRate The refresh rate of the monitor in Hertz.
1874 @retval EFI_SUCCESS Mode information returned.
1875 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1876 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1881 ConSplitterUgaDrawGetMode (
1882 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1883 OUT UINT32
*HorizontalResolution
,
1884 OUT UINT32
*VerticalResolution
,
1885 OUT UINT32
*ColorDepth
,
1886 OUT UINT32
*RefreshRate
1890 Set the current video mode information.
1892 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1893 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1894 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1895 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1896 @param RefreshRate The refresh rate of the monitor in Hertz.
1898 @retval EFI_SUCCESS Mode information returned.
1899 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1900 @retval EFI_OUT_OF_RESOURCES Out of resources.
1905 ConSplitterUgaDrawSetMode (
1906 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1907 IN UINT32 HorizontalResolution
,
1908 IN UINT32 VerticalResolution
,
1909 IN UINT32 ColorDepth
,
1910 IN UINT32 RefreshRate
1914 Blt a rectangle of pixels on the graphics screen.
1916 The following table defines actions for BltOperations.
1919 Write data from the BltBuffer pixel (SourceX, SourceY)
1920 directly to every pixel of the video display rectangle
1921 (DestinationX, DestinationY)
1922 (DestinationX + Width, DestinationY + Height).
1923 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1924 EfiUgaVideoToBltBuffer:
1925 Read data from the video display rectangle
1926 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1927 the BltBuffer rectangle (DestinationX, DestinationY )
1928 (DestinationX + Width, DestinationY + Height). If DestinationX or
1929 DestinationY is not zero then Delta must be set to the length in bytes
1930 of a row in the BltBuffer.
1931 EfiUgaBltBufferToVideo:
1932 Write data from the BltBuffer rectangle
1933 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1934 video display rectangle (DestinationX, DestinationY)
1935 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1936 not zero then Delta must be set to the length in bytes of a row in the
1939 Copy from the video display rectangle
1940 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1941 to the video display rectangle (DestinationX, DestinationY)
1942 (DestinationX + Width, DestinationY + Height).
1943 The BltBuffer and Delta are not used in this mode.
1945 @param This Protocol instance pointer.
1946 @param BltBuffer Buffer containing data to blit into video buffer. This
1947 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1948 @param BltOperation Operation to perform on BlitBuffer and video memory
1949 @param SourceX X coordinate of source for the BltBuffer.
1950 @param SourceY Y coordinate of source for the BltBuffer.
1951 @param DestinationX X coordinate of destination for the BltBuffer.
1952 @param DestinationY Y coordinate of destination for the BltBuffer.
1953 @param Width Width of rectangle in BltBuffer in pixels.
1954 @param Height Hight of rectangle in BltBuffer in pixels.
1955 @param Delta OPTIONAL
1957 @retval EFI_SUCCESS The Blt operation completed.
1958 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1959 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1964 ConSplitterUgaDrawBlt (
1965 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1966 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1967 IN EFI_UGA_BLT_OPERATION BltOperation
,
1970 IN UINTN DestinationX
,
1971 IN UINTN DestinationY
,
1974 IN UINTN Delta OPTIONAL
1978 Sets the output device(s) to a specified mode.
1980 @param Private Text Out Splitter pointer.
1981 @param ModeNumber The mode number to set.
1986 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,