2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2012, 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_ALLOC_UNIT 32
88 } TEXT_OUT_SPLITTER_QUERY_DATA
;
91 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
94 // Private data for Text In Ex Splitter Notify
96 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
98 EFI_HANDLE
*NotifyHandleList
;
99 EFI_HANDLE NotifyHandle
;
100 EFI_KEY_DATA KeyData
;
101 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
102 LIST_ENTRY NotifyEntry
;
103 } TEXT_IN_EX_SPLITTER_NOTIFY
;
105 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
107 TEXT_IN_EX_SPLITTER_NOTIFY, \
109 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
112 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
115 // Private data for the Console In splitter
119 EFI_HANDLE VirtualHandle
;
121 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
122 UINTN CurrentNumberOfConsoles
;
123 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
124 UINTN TextInListCount
;
126 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
127 UINTN CurrentNumberOfExConsoles
;
128 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
129 UINTN TextInExListCount
;
130 LIST_ENTRY NotifyList
;
133 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
134 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
135 UINTN CurrentNumberOfPointers
;
136 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
137 UINTN PointerListCount
;
139 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
140 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
141 UINTN CurrentNumberOfAbsolutePointers
;
142 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
143 UINTN AbsolutePointerListCount
;
144 BOOLEAN AbsoluteInputEventSignalState
;
146 BOOLEAN KeyEventSignalState
;
147 BOOLEAN InputEventSignalState
;
148 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
150 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
152 TEXT_IN_SPLITTER_PRIVATE_DATA, \
154 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
157 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
159 TEXT_IN_SPLITTER_PRIVATE_DATA, \
161 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
163 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
165 TEXT_IN_SPLITTER_PRIVATE_DATA, \
167 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
170 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
172 TEXT_IN_SPLITTER_PRIVATE_DATA, \
174 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
178 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
181 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
182 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
183 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
184 } TEXT_OUT_AND_GOP_DATA
;
187 // Private data for the Console Out splitter
191 EFI_HANDLE VirtualHandle
;
192 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
193 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
195 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
196 UINT32 UgaHorizontalResolution
;
197 UINT32 UgaVerticalResolution
;
198 UINT32 UgaColorDepth
;
199 UINT32 UgaRefreshRate
;
201 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
202 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
203 UINTN CurrentNumberOfGraphicsOutput
;
204 UINTN CurrentNumberOfUgaDraw
;
206 UINTN CurrentNumberOfConsoles
;
207 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
208 UINTN TextOutListCount
;
209 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
210 UINTN TextOutQueryDataCount
;
211 INT32
*TextOutModeMap
;
213 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
215 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
217 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
219 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
222 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
224 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
226 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
229 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
231 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
233 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
236 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
238 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
240 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
244 // Function Prototypes
248 The user Entry Point for module ConSplitter. The user code starts with this function.
250 Installs driver module protocols and. Creates virtual device handles for ConIn,
251 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
252 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
253 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
255 @param[in] ImageHandle The firmware allocated handle for the EFI image.
256 @param[in] SystemTable A pointer to the EFI System Table.
258 @retval EFI_SUCCESS The entry point is executed successfully.
259 @retval other Some error occurs when executing this entry point.
264 ConSplitterDriverEntry (
265 IN EFI_HANDLE ImageHandle
,
266 IN EFI_SYSTEM_TABLE
*SystemTable
270 Construct console input devices' private data.
272 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
275 @retval EFI_OUT_OF_RESOURCES Out of resources.
276 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
277 @retval other Failed to construct private data.
281 ConSplitterTextInConstructor (
282 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
286 Construct console output devices' private data.
288 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
291 @retval EFI_OUT_OF_RESOURCES Out of resources.
292 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
296 ConSplitterTextOutConstructor (
297 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
302 Test to see if Console In Device could be supported on the Controller.
304 @param This Driver Binding protocol instance pointer.
305 @param ControllerHandle Handle of device to test.
306 @param RemainingDevicePath Optional parameter use to pick a specific child
309 @retval EFI_SUCCESS This driver supports this device.
310 @retval other This driver does not support this device.
315 ConSplitterConInDriverBindingSupported (
316 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
317 IN EFI_HANDLE ControllerHandle
,
318 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
322 Test to see if Simple Pointer protocol could be supported on the Controller.
324 @param This Driver Binding protocol instance pointer.
325 @param ControllerHandle Handle of device to test.
326 @param RemainingDevicePath Optional parameter use to pick a specific child
329 @retval EFI_SUCCESS This driver supports this device.
330 @retval other This driver does not support this device.
335 ConSplitterSimplePointerDriverBindingSupported (
336 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
337 IN EFI_HANDLE ControllerHandle
,
338 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
342 Test to see if Console Out Device could be supported on the Controller.
344 @param This Driver Binding protocol instance pointer.
345 @param ControllerHandle Handle of device to test.
346 @param RemainingDevicePath Optional parameter use to pick a specific child
349 @retval EFI_SUCCESS This driver supports this device.
350 @retval other This driver does not support this device.
355 ConSplitterConOutDriverBindingSupported (
356 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
357 IN EFI_HANDLE ControllerHandle
,
358 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
362 Test to see if Standard Error Device could be supported on the Controller.
364 @param This Driver Binding protocol instance pointer.
365 @param ControllerHandle Handle of device to test.
366 @param RemainingDevicePath Optional parameter use to pick a specific child
369 @retval EFI_SUCCESS This driver supports this device.
370 @retval other This driver does not support this device.
375 ConSplitterStdErrDriverBindingSupported (
376 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
377 IN EFI_HANDLE ControllerHandle
,
378 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
382 Start Console In Consplitter on device handle.
384 @param This Driver Binding protocol instance pointer.
385 @param ControllerHandle Handle of device to bind driver to.
386 @param RemainingDevicePath Optional parameter use to pick a specific child
389 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
390 @retval other Console In Consplitter does not support this device.
395 ConSplitterConInDriverBindingStart (
396 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
397 IN EFI_HANDLE ControllerHandle
,
398 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
402 Start Simple Pointer Consplitter on device handle.
404 @param This Driver Binding protocol instance pointer.
405 @param ControllerHandle Handle of device to bind driver to.
406 @param RemainingDevicePath Optional parameter use to pick a specific child
409 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
410 @retval other Simple Pointer Consplitter does not support this device.
415 ConSplitterSimplePointerDriverBindingStart (
416 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
417 IN EFI_HANDLE ControllerHandle
,
418 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
422 Start Console Out Consplitter on device handle.
424 @param This Driver Binding protocol instance pointer.
425 @param ControllerHandle Handle of device to bind driver to.
426 @param RemainingDevicePath Optional parameter use to pick a specific child
429 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
430 @retval other Console Out Consplitter does not support this device.
435 ConSplitterConOutDriverBindingStart (
436 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
437 IN EFI_HANDLE ControllerHandle
,
438 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
442 Start Standard Error Consplitter on device handle.
444 @param This Driver Binding protocol instance pointer.
445 @param ControllerHandle Handle of device to bind driver to.
446 @param RemainingDevicePath Optional parameter use to pick a specific child
449 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
450 @retval other Standard Error Consplitter does not support this device.
455 ConSplitterStdErrDriverBindingStart (
456 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
457 IN EFI_HANDLE ControllerHandle
,
458 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
462 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
464 @param This Driver Binding protocol instance pointer.
465 @param ControllerHandle Handle of device to stop driver on
466 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
467 children is zero stop the entire bus driver.
468 @param ChildHandleBuffer List of Child Handles to Stop.
470 @retval EFI_SUCCESS This driver is removed ControllerHandle
471 @retval other This driver was not removed from this device
476 ConSplitterConInDriverBindingStop (
477 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
478 IN EFI_HANDLE ControllerHandle
,
479 IN UINTN NumberOfChildren
,
480 IN EFI_HANDLE
*ChildHandleBuffer
484 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
485 Simple Pointer protocol.
487 @param This Driver Binding protocol instance pointer.
488 @param ControllerHandle Handle of device to stop driver on
489 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
490 children is zero stop the entire bus driver.
491 @param ChildHandleBuffer List of Child Handles to Stop.
493 @retval EFI_SUCCESS This driver is removed ControllerHandle
494 @retval other This driver was not removed from this device
499 ConSplitterSimplePointerDriverBindingStop (
500 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
501 IN EFI_HANDLE ControllerHandle
,
502 IN UINTN NumberOfChildren
,
503 IN EFI_HANDLE
*ChildHandleBuffer
507 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
509 @param This Driver Binding protocol instance pointer.
510 @param ControllerHandle Handle of device to stop driver on
511 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
512 children is zero stop the entire bus driver.
513 @param ChildHandleBuffer List of Child Handles to Stop.
515 @retval EFI_SUCCESS This driver is removed ControllerHandle
516 @retval other This driver was not removed from this device
521 ConSplitterConOutDriverBindingStop (
522 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
523 IN EFI_HANDLE ControllerHandle
,
524 IN UINTN NumberOfChildren
,
525 IN EFI_HANDLE
*ChildHandleBuffer
529 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
531 @param This Driver Binding protocol instance pointer.
532 @param ControllerHandle Handle of device to stop driver on
533 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
534 children is zero stop the entire bus driver.
535 @param ChildHandleBuffer List of Child Handles to Stop.
537 @retval EFI_SUCCESS This driver is removed ControllerHandle
538 @retval other This driver was not removed from this device
543 ConSplitterStdErrDriverBindingStop (
544 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
545 IN EFI_HANDLE ControllerHandle
,
546 IN UINTN NumberOfChildren
,
547 IN EFI_HANDLE
*ChildHandleBuffer
552 Test to see if Absolute Pointer protocol could be supported on the Controller.
554 @param This Driver Binding protocol instance pointer.
555 @param ControllerHandle Handle of device to test.
556 @param RemainingDevicePath Optional parameter use to pick a specific child
559 @retval EFI_SUCCESS This driver supports this device.
560 @retval other This driver does not support this device.
565 ConSplitterAbsolutePointerDriverBindingSupported (
566 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
567 IN EFI_HANDLE ControllerHandle
,
568 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
572 Start Absolute Pointer Consplitter on device handle.
574 @param This Driver Binding protocol instance pointer.
575 @param ControllerHandle Handle of device to bind driver to.
576 @param RemainingDevicePath Optional parameter use to pick a specific child
579 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
580 @retval other Absolute Pointer Consplitter does not support this device.
585 ConSplitterAbsolutePointerDriverBindingStart (
586 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
587 IN EFI_HANDLE ControllerHandle
,
588 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
592 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
593 Absolute Pointer protocol.
595 @param This Driver Binding protocol instance pointer.
596 @param ControllerHandle Handle of device to stop driver on
597 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
598 children is zero stop the entire bus driver.
599 @param ChildHandleBuffer List of Child Handles to Stop.
601 @retval EFI_SUCCESS This driver is removed ControllerHandle
602 @retval other This driver was not removed from this device
607 ConSplitterAbsolutePointerDriverBindingStop (
608 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
609 IN EFI_HANDLE ControllerHandle
,
610 IN UINTN NumberOfChildren
,
611 IN EFI_HANDLE
*ChildHandleBuffer
615 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
617 @param Private Text In Splitter pointer.
618 @param AbsolutePointer Absolute Pointer protocol pointer.
620 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
621 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
625 ConSplitterAbsolutePointerAddDevice (
626 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
627 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
631 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
633 @param Private Text In Splitter pointer.
634 @param AbsolutePointer Absolute Pointer protocol pointer.
636 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
637 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
641 ConSplitterAbsolutePointerDeleteDevice (
642 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
643 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
647 // Absolute Pointer protocol interfaces
652 Resets the pointer device hardware.
654 @param This Protocol instance pointer.
655 @param ExtendedVerification Driver may perform diagnostics on reset.
657 @retval EFI_SUCCESS The device was reset.
658 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
664 ConSplitterAbsolutePointerReset (
665 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
666 IN BOOLEAN ExtendedVerification
671 Retrieves the current state of a pointer device.
673 @param This Protocol instance pointer.
674 @param State A pointer to the state information on the
677 @retval EFI_SUCCESS The state of the pointer device was returned in
679 @retval EFI_NOT_READY The state of the pointer device has not changed
680 since the last call to GetState().
681 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
682 retrieve the pointer device's current state.
687 ConSplitterAbsolutePointerGetState (
688 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
689 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
693 This event agregates all the events of the pointer devices in the splitter.
695 If any events of physical pointer devices are signaled, signal the pointer
696 splitter event. This will cause the calling code to call
697 ConSplitterAbsolutePointerGetState ().
699 @param Event The Event assoicated with callback.
700 @param Context Context registered when Event was created.
705 ConSplitterAbsolutePointerWaitForInput (
711 Retrieves a Unicode string that is the user readable name of the driver.
713 This function retrieves the user readable name of a driver in the form of a
714 Unicode string. If the driver specified by This has a user readable name in
715 the language specified by Language, then a pointer to the driver name is
716 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
717 by This does not support the language specified by Language,
718 then EFI_UNSUPPORTED is returned.
720 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
721 EFI_COMPONENT_NAME_PROTOCOL instance.
723 @param Language[in] A pointer to a Null-terminated ASCII string
724 array indicating the language. This is the
725 language of the driver name that the caller is
726 requesting, and it must match one of the
727 languages specified in SupportedLanguages. The
728 number of languages supported by a driver is up
729 to the driver writer. Language is specified
730 in RFC 4646 or ISO 639-2 language code format.
732 @param DriverName[out] A pointer to the Unicode string to return.
733 This Unicode string is the name of the
734 driver specified by This in the language
735 specified by Language.
737 @retval EFI_SUCCESS The Unicode string for the Driver specified by
738 This and the language specified by Language was
739 returned in DriverName.
741 @retval EFI_INVALID_PARAMETER Language is NULL.
743 @retval EFI_INVALID_PARAMETER DriverName is NULL.
745 @retval EFI_UNSUPPORTED The driver specified by This does not support
746 the language specified by Language.
751 ConSplitterComponentNameGetDriverName (
752 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
754 OUT CHAR16
**DriverName
759 Retrieves a Unicode string that is the user readable name of the controller
760 that is being managed by a driver.
762 This function retrieves the user readable name of the controller specified by
763 ControllerHandle and ChildHandle in the form of a Unicode string. If the
764 driver specified by This has a user readable name in the language specified by
765 Language, then a pointer to the controller name is returned in ControllerName,
766 and EFI_SUCCESS is returned. If the driver specified by This is not currently
767 managing the controller specified by ControllerHandle and ChildHandle,
768 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
769 support the language specified by Language, then EFI_UNSUPPORTED is returned.
771 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
772 EFI_COMPONENT_NAME_PROTOCOL instance.
774 @param ControllerHandle[in] The handle of a controller that the driver
775 specified by This is managing. This handle
776 specifies the controller whose name is to be
779 @param ChildHandle[in] The handle of the child controller to retrieve
780 the name of. This is an optional parameter that
781 may be NULL. It will be NULL for device
782 drivers. It will also be NULL for a bus drivers
783 that wish to retrieve the name of the bus
784 controller. It will not be NULL for a bus
785 driver that wishes to retrieve the name of a
788 @param Language[in] A pointer to a Null-terminated ASCII string
789 array indicating the language. This is the
790 language of the driver name that the caller is
791 requesting, and it must match one of the
792 languages specified in SupportedLanguages. The
793 number of languages supported by a driver is up
794 to the driver writer. Language is specified in
795 RFC 4646 or ISO 639-2 language code format.
797 @param ControllerName[out] A pointer to the Unicode string to return.
798 This Unicode string is the name of the
799 controller specified by ControllerHandle and
800 ChildHandle in the language specified by
801 Language from the point of view of the driver
804 @retval EFI_SUCCESS The Unicode string for the user readable name in
805 the language specified by Language for the
806 driver specified by This was returned in
809 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
811 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
814 @retval EFI_INVALID_PARAMETER Language is NULL.
816 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
818 @retval EFI_UNSUPPORTED The driver specified by This is not currently
819 managing the controller specified by
820 ControllerHandle and ChildHandle.
822 @retval EFI_UNSUPPORTED The driver specified by This does not support
823 the language specified by Language.
828 ConSplitterConInComponentNameGetControllerName (
829 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
830 IN EFI_HANDLE ControllerHandle
,
831 IN EFI_HANDLE ChildHandle OPTIONAL
,
833 OUT CHAR16
**ControllerName
838 Retrieves a Unicode string that is the user readable name of the controller
839 that is being managed by a driver.
841 This function retrieves the user readable name of the controller specified by
842 ControllerHandle and ChildHandle in the form of a Unicode string. If the
843 driver specified by This has a user readable name in the language specified by
844 Language, then a pointer to the controller name is returned in ControllerName,
845 and EFI_SUCCESS is returned. If the driver specified by This is not currently
846 managing the controller specified by ControllerHandle and ChildHandle,
847 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
848 support the language specified by Language, then EFI_UNSUPPORTED is returned.
850 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
851 EFI_COMPONENT_NAME_PROTOCOL instance.
853 @param ControllerHandle[in] The handle of a controller that the driver
854 specified by This is managing. This handle
855 specifies the controller whose name is to be
858 @param ChildHandle[in] The handle of the child controller to retrieve
859 the name of. This is an optional parameter that
860 may be NULL. It will be NULL for device
861 drivers. It will also be NULL for a bus drivers
862 that wish to retrieve the name of the bus
863 controller. It will not be NULL for a bus
864 driver that wishes to retrieve the name of a
867 @param Language[in] A pointer to a Null-terminated ASCII string
868 array indicating the language. This is the
869 language of the driver name that the caller is
870 requesting, and it must match one of the
871 languages specified in SupportedLanguages. The
872 number of languages supported by a driver is up
873 to the driver writer. Language is specified in
874 RFC 4646 or ISO 639-2 language code format.
876 @param ControllerName[out] A pointer to the Unicode string to return.
877 This Unicode string is the name of the
878 controller specified by ControllerHandle and
879 ChildHandle in the language specified by
880 Language from the point of view of the driver
883 @retval EFI_SUCCESS The Unicode string for the user readable name in
884 the language specified by Language for the
885 driver specified by This was returned in
888 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
890 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
893 @retval EFI_INVALID_PARAMETER Language is NULL.
895 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
897 @retval EFI_UNSUPPORTED The driver specified by This is not currently
898 managing the controller specified by
899 ControllerHandle and ChildHandle.
901 @retval EFI_UNSUPPORTED The driver specified by This does not support
902 the language specified by Language.
907 ConSplitterSimplePointerComponentNameGetControllerName (
908 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
909 IN EFI_HANDLE ControllerHandle
,
910 IN EFI_HANDLE ChildHandle OPTIONAL
,
912 OUT CHAR16
**ControllerName
916 Retrieves a Unicode string that is the user readable name of the controller
917 that is being managed by an EFI Driver.
919 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
921 @param ControllerHandle The handle of a controller that the driver
922 specified by This is managing. This handle
923 specifies the controller whose name is to be
925 @param ChildHandle The handle of the child controller to retrieve the
926 name of. This is an optional parameter that may
927 be NULL. It will be NULL for device drivers. It
928 will also be NULL for a bus drivers that wish to
929 retrieve the name of the bus controller. It will
930 not be NULL for a bus driver that wishes to
931 retrieve the name of a child controller.
932 @param Language A pointer to RFC4646 language identifier. This is
933 the language of the controller name that that the
934 caller is requesting, and it must match one of the
935 languages specified in SupportedLanguages. The
936 number of languages supported by a driver is up to
938 @param ControllerName A pointer to the Unicode string to return. This
939 Unicode string is the name of the controller
940 specified by ControllerHandle and ChildHandle in
941 the language specified by Language from the point
942 of view of the driver specified by This.
944 @retval EFI_SUCCESS The Unicode string for the user readable name in
945 the language specified by Language for the driver
946 specified by This was returned in DriverName.
947 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
948 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
950 @retval EFI_INVALID_PARAMETER Language is NULL.
951 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
952 @retval EFI_UNSUPPORTED The driver specified by This is not currently
953 managing the controller specified by
954 ControllerHandle and ChildHandle.
955 @retval EFI_UNSUPPORTED The driver specified by This does not support the
956 language specified by Language.
961 ConSplitterAbsolutePointerComponentNameGetControllerName (
962 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
963 IN EFI_HANDLE ControllerHandle
,
964 IN EFI_HANDLE ChildHandle OPTIONAL
,
966 OUT CHAR16
**ControllerName
970 Retrieves a Unicode string that is the user readable name of the controller
971 that is being managed by a driver.
973 This function retrieves the user readable name of the controller specified by
974 ControllerHandle and ChildHandle in the form of a Unicode string. If the
975 driver specified by This has a user readable name in the language specified by
976 Language, then a pointer to the controller name is returned in ControllerName,
977 and EFI_SUCCESS is returned. If the driver specified by This is not currently
978 managing the controller specified by ControllerHandle and ChildHandle,
979 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
980 support the language specified by Language, then EFI_UNSUPPORTED is returned.
982 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
983 EFI_COMPONENT_NAME_PROTOCOL instance.
985 @param ControllerHandle[in] The handle of a controller that the driver
986 specified by This is managing. This handle
987 specifies the controller whose name is to be
990 @param ChildHandle[in] The handle of the child controller to retrieve
991 the name of. This is an optional parameter that
992 may be NULL. It will be NULL for device
993 drivers. It will also be NULL for a bus drivers
994 that wish to retrieve the name of the bus
995 controller. It will not be NULL for a bus
996 driver that wishes to retrieve the name of a
999 @param Language[in] A pointer to a Null-terminated ASCII string
1000 array indicating the language. This is the
1001 language of the driver name that the caller is
1002 requesting, and it must match one of the
1003 languages specified in SupportedLanguages. The
1004 number of languages supported by a driver is up
1005 to the driver writer. Language is specified in
1006 RFC 4646 or ISO 639-2 language code format.
1008 @param ControllerName[out] A pointer to the Unicode string to return.
1009 This Unicode string is the name of the
1010 controller specified by ControllerHandle and
1011 ChildHandle in the language specified by
1012 Language from the point of view of the driver
1015 @retval EFI_SUCCESS The Unicode string for the user readable name in
1016 the language specified by Language for the
1017 driver specified by This was returned in
1020 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1022 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1025 @retval EFI_INVALID_PARAMETER Language is NULL.
1027 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1029 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1030 managing the controller specified by
1031 ControllerHandle and ChildHandle.
1033 @retval EFI_UNSUPPORTED The driver specified by This does not support
1034 the language specified by Language.
1039 ConSplitterConOutComponentNameGetControllerName (
1040 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1041 IN EFI_HANDLE ControllerHandle
,
1042 IN EFI_HANDLE ChildHandle OPTIONAL
,
1044 OUT CHAR16
**ControllerName
1049 Retrieves a Unicode string that is the user readable name of the controller
1050 that is being managed by a driver.
1052 This function retrieves the user readable name of the controller specified by
1053 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1054 driver specified by This has a user readable name in the language specified by
1055 Language, then a pointer to the controller name is returned in ControllerName,
1056 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1057 managing the controller specified by ControllerHandle and ChildHandle,
1058 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1059 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1061 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1062 EFI_COMPONENT_NAME_PROTOCOL instance.
1064 @param ControllerHandle[in] The handle of a controller that the driver
1065 specified by This is managing. This handle
1066 specifies the controller whose name is to be
1069 @param ChildHandle[in] The handle of the child controller to retrieve
1070 the name of. This is an optional parameter that
1071 may be NULL. It will be NULL for device
1072 drivers. It will also be NULL for a bus drivers
1073 that wish to retrieve the name of the bus
1074 controller. It will not be NULL for a bus
1075 driver that wishes to retrieve the name of a
1078 @param Language[in] A pointer to a Null-terminated ASCII string
1079 array indicating the language. This is the
1080 language of the driver name that the caller is
1081 requesting, and it must match one of the
1082 languages specified in SupportedLanguages. The
1083 number of languages supported by a driver is up
1084 to the driver writer. Language is specified in
1085 RFC 4646 or ISO 639-2 language code format.
1087 @param ControllerName[out] A pointer to the Unicode string to return.
1088 This Unicode string is the name of the
1089 controller specified by ControllerHandle and
1090 ChildHandle in the language specified by
1091 Language from the point of view of the driver
1094 @retval EFI_SUCCESS The Unicode string for the user readable name in
1095 the language specified by Language for the
1096 driver specified by This was returned in
1099 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1101 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1104 @retval EFI_INVALID_PARAMETER Language is NULL.
1106 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1108 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1109 managing the controller specified by
1110 ControllerHandle and ChildHandle.
1112 @retval EFI_UNSUPPORTED The driver specified by This does not support
1113 the language specified by Language.
1118 ConSplitterStdErrComponentNameGetControllerName (
1119 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1120 IN EFI_HANDLE ControllerHandle
,
1121 IN EFI_HANDLE ChildHandle OPTIONAL
,
1123 OUT CHAR16
**ControllerName
1128 // TextIn Constructor/Destructor functions
1132 Add Text Input Device in Consplitter Text Input list.
1134 @param Private Text In Splitter pointer.
1135 @param TextIn Simple Text Input protocol pointer.
1137 @retval EFI_SUCCESS Text Input Device added successfully.
1138 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1142 ConSplitterTextInAddDevice (
1143 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1144 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1148 Remove Text Input Device from Consplitter Text Input list.
1150 @param Private Text In Splitter pointer.
1151 @param TextIn Simple Text protocol pointer.
1153 @retval EFI_SUCCESS Simple Text Device removed successfully.
1154 @retval EFI_NOT_FOUND No Simple Text Device found.
1158 ConSplitterTextInDeleteDevice (
1159 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1160 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1164 // SimplePointer Constuctor/Destructor functions
1168 Add Simple Pointer Device in Consplitter Simple Pointer list.
1170 @param Private Text In Splitter pointer.
1171 @param SimplePointer Simple Pointer protocol pointer.
1173 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1174 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1178 ConSplitterSimplePointerAddDevice (
1179 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1180 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1184 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1186 @param Private Text In Splitter pointer.
1187 @param SimplePointer Simple Pointer protocol pointer.
1189 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1190 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1194 ConSplitterSimplePointerDeleteDevice (
1195 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1196 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1200 // TextOut Constuctor/Destructor functions
1204 Add Text Output Device in Consplitter Text Output list.
1206 @param Private Text Out Splitter pointer.
1207 @param TextOut Simple Text Output protocol pointer.
1208 @param GraphicsOutput Graphics Output protocol pointer.
1209 @param UgaDraw UGA Draw protocol pointer.
1211 @retval EFI_SUCCESS Text Output Device added successfully.
1212 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1216 ConSplitterTextOutAddDevice (
1217 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1218 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1219 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1220 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1224 Remove Text Out Device in Consplitter Text Out list.
1226 @param Private Text Out Splitter pointer.
1227 @param TextOut Simple Text Output Pointer protocol pointer.
1229 @retval EFI_SUCCESS Text Out Device removed successfully.
1230 @retval EFI_NOT_FOUND No Text Out Device found.
1234 ConSplitterTextOutDeleteDevice (
1235 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1236 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1240 // TextIn I/O Functions
1244 Reset the input device and optionaly run diagnostics
1246 @param This Protocol instance pointer.
1247 @param ExtendedVerification Driver may perform diagnostics on reset.
1249 @retval EFI_SUCCESS The device was reset.
1250 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1256 ConSplitterTextInReset (
1257 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1258 IN BOOLEAN ExtendedVerification
1262 Reads the next keystroke from the input device. The WaitForKey Event can
1263 be used to test for existance of a keystroke via WaitForEvent () call.
1265 @param This Protocol instance pointer.
1266 @param Key Driver may perform diagnostics on reset.
1268 @retval EFI_SUCCESS The keystroke information was returned.
1269 @retval EFI_NOT_READY There was no keystroke data availiable.
1270 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1276 ConSplitterTextInReadKeyStroke (
1277 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1278 OUT EFI_INPUT_KEY
*Key
1282 Add Text Input Ex Device in Consplitter Text Input Ex list.
1284 @param Private Text In Splitter pointer.
1285 @param TextInEx Simple Text Input Ex Input protocol pointer.
1287 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1288 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1292 ConSplitterTextInExAddDevice (
1293 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1294 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1298 Remove Text Ex Device from Consplitter Text Input Ex list.
1300 @param Private Text In Splitter pointer.
1301 @param TextInEx Simple Text Ex protocol pointer.
1303 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1304 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1308 ConSplitterTextInExDeleteDevice (
1309 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1310 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1314 // Simple Text Input Ex protocol function prototypes
1318 Reset the input device and optionaly run diagnostics
1320 @param This Protocol instance pointer.
1321 @param ExtendedVerification Driver may perform diagnostics on reset.
1323 @retval EFI_SUCCESS The device was reset.
1324 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1330 ConSplitterTextInResetEx (
1331 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1332 IN BOOLEAN ExtendedVerification
1337 Reads the next keystroke from the input device. The WaitForKey Event can
1338 be used to test for existance of a keystroke via WaitForEvent () call.
1340 @param This Protocol instance pointer.
1341 @param KeyData A pointer to a buffer that is filled in with the
1342 keystroke state data for the key that was
1345 @retval EFI_SUCCESS The keystroke information was returned.
1346 @retval EFI_NOT_READY There was no keystroke data availiable.
1347 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1349 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1354 ConSplitterTextInReadKeyStrokeEx (
1355 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1356 OUT EFI_KEY_DATA
*KeyData
1361 Set certain state for the input device.
1363 @param This Protocol instance pointer.
1364 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1365 state for the input device.
1367 @retval EFI_SUCCESS The device state was set successfully.
1368 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1369 could not have the setting adjusted.
1370 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1372 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1377 ConSplitterTextInSetState (
1378 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1379 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1384 Register a notification function for a particular keystroke for the input device.
1386 @param This Protocol instance pointer.
1387 @param KeyData A pointer to a buffer that is filled in with the
1388 keystroke information data for the key that was
1390 @param KeyNotificationFunction Points to the function to be called when the key
1391 sequence is typed specified by KeyData.
1392 @param NotifyHandle Points to the unique handle assigned to the
1393 registered notification.
1395 @retval EFI_SUCCESS The notification function was registered
1397 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1399 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1404 ConSplitterTextInRegisterKeyNotify (
1405 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1406 IN EFI_KEY_DATA
*KeyData
,
1407 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1408 OUT EFI_HANDLE
*NotifyHandle
1413 Remove a registered notification function from a particular keystroke.
1415 @param This Protocol instance pointer.
1416 @param NotificationHandle The handle of the notification function being
1419 @retval EFI_SUCCESS The notification function was unregistered
1421 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1422 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1427 ConSplitterTextInUnregisterKeyNotify (
1428 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1429 IN EFI_HANDLE NotificationHandle
1433 This event aggregates all the events of the ConIn devices in the spliter.
1435 If any events of physical ConIn devices are signaled, signal the ConIn
1436 spliter event. This will cause the calling code to call
1437 ConSplitterTextInReadKeyStroke ().
1439 @param Event The Event assoicated with callback.
1440 @param Context Context registered when Event was created.
1445 ConSplitterTextInWaitForKey (
1452 Reads the next keystroke from the input device. The WaitForKey Event can
1453 be used to test for existance of a keystroke via WaitForEvent () call.
1455 @param Private Protocol instance pointer.
1456 @param Key Driver may perform diagnostics on reset.
1458 @retval EFI_SUCCESS The keystroke information was returned.
1459 @retval EFI_NOT_READY There was no keystroke data availiable.
1460 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1466 ConSplitterTextInPrivateReadKeyStroke (
1467 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1468 OUT EFI_INPUT_KEY
*Key
1472 Reset the input device and optionaly run diagnostics
1474 @param This Protocol instance pointer.
1475 @param ExtendedVerification Driver may perform diagnostics on reset.
1477 @retval EFI_SUCCESS The device was reset.
1478 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1484 ConSplitterSimplePointerReset (
1485 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1486 IN BOOLEAN ExtendedVerification
1490 Reads the next keystroke from the input device. The WaitForKey Event can
1491 be used to test for existance of a keystroke via WaitForEvent () call.
1493 @param This A pointer to protocol instance.
1494 @param State A pointer to state information on the pointer device
1496 @retval EFI_SUCCESS The keystroke information was returned in State.
1497 @retval EFI_NOT_READY There was no keystroke data availiable.
1498 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1504 ConSplitterSimplePointerGetState (
1505 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1506 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1510 This event agregates all the events of the ConIn devices in the spliter.
1511 If any events of physical ConIn devices are signaled, signal the ConIn
1512 spliter event. This will cause the calling code to call
1513 ConSplitterTextInReadKeyStroke ().
1515 @param Event The Event assoicated with callback.
1516 @param Context Context registered when Event was created.
1521 ConSplitterSimplePointerWaitForInput (
1527 // TextOut I/O Functions
1531 Reset the text output device hardware and optionaly run diagnostics
1533 @param This Protocol instance pointer.
1534 @param ExtendedVerification Driver may perform more exhaustive verfication
1535 operation of the device during reset.
1537 @retval EFI_SUCCESS The text output device was reset.
1538 @retval EFI_DEVICE_ERROR The text output device is not functioning
1539 correctly and could not be reset.
1544 ConSplitterTextOutReset (
1545 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1546 IN BOOLEAN ExtendedVerification
1550 Write a Unicode string to the output device.
1552 @param This Protocol instance pointer.
1553 @param WString The NULL-terminated Unicode string to be
1554 displayed on the output device(s). All output
1555 devices must also support the Unicode drawing
1556 defined in this file.
1558 @retval EFI_SUCCESS The string was output to the device.
1559 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1561 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1563 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1564 characters in the Unicode string could not be
1565 rendered and were skipped.
1570 ConSplitterTextOutOutputString (
1571 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1576 Verifies that all characters in a Unicode string can be output to the
1579 @param This Protocol instance pointer.
1580 @param WString The NULL-terminated Unicode string to be
1581 examined for the output device(s).
1583 @retval EFI_SUCCESS The device(s) are capable of rendering the
1585 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1586 cannot be rendered by one or more of the output
1587 devices mapped by the EFI handle.
1592 ConSplitterTextOutTestString (
1593 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1598 Returns information for an available text mode that the output device(s)
1601 @param This Protocol instance pointer.
1602 @param ModeNumber The mode number to return information on.
1603 @param Columns Returns the columns of the text output device
1604 for the requested ModeNumber.
1605 @param Rows Returns the rows of the text output device
1606 for the requested ModeNumber.
1608 @retval EFI_SUCCESS The requested mode information was returned.
1609 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1611 @retval EFI_UNSUPPORTED The mode number was not valid.
1616 ConSplitterTextOutQueryMode (
1617 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1618 IN UINTN ModeNumber
,
1624 Sets the output device(s) to a specified mode.
1626 @param This Protocol instance pointer.
1627 @param ModeNumber The mode number to set.
1629 @retval EFI_SUCCESS The requested text mode was set.
1630 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1632 @retval EFI_UNSUPPORTED The mode number was not valid.
1637 ConSplitterTextOutSetMode (
1638 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1643 Sets the background and foreground colors for the OutputString () and
1644 ClearScreen () functions.
1646 @param This Protocol instance pointer.
1647 @param Attribute The attribute to set. Bits 0..3 are the
1648 foreground color, and bits 4..6 are the
1649 background color. All other bits are undefined
1650 and must be zero. The valid Attributes are
1651 defined in this file.
1653 @retval EFI_SUCCESS The attribute was set.
1654 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1656 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1661 ConSplitterTextOutSetAttribute (
1662 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1667 Clears the output device(s) display to the currently selected background
1670 @param This Protocol instance pointer.
1672 @retval EFI_SUCCESS The operation completed successfully.
1673 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1675 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1680 ConSplitterTextOutClearScreen (
1681 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1685 Sets the current coordinates of the cursor position
1687 @param This Protocol instance pointer.
1688 @param Column The column position to set the cursor to. Must be
1689 greater than or equal to zero and less than the
1690 number of columns by QueryMode ().
1691 @param Row The row position to set the cursor to. Must be
1692 greater than or equal to zero and less than the
1693 number of rows by QueryMode ().
1695 @retval EFI_SUCCESS The operation completed successfully.
1696 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1698 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1699 or the cursor position is invalid for the
1705 ConSplitterTextOutSetCursorPosition (
1706 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1713 Makes the cursor visible or invisible
1715 @param This Protocol instance pointer.
1716 @param Visible If TRUE, the cursor is set to be visible. If
1717 FALSE, the cursor is set to be invisible.
1719 @retval EFI_SUCCESS The operation completed successfully.
1720 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1721 the request, or the device does not support
1722 changing the cursor mode.
1723 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1728 ConSplitterTextOutEnableCursor (
1729 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1734 Take the passed in Buffer of size ElementSize and grow the buffer
1735 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1736 Copy the current data in Buffer to the new version of Buffer and
1737 free the old version of buffer.
1739 @param ElementSize Size of element in array.
1740 @param Count Current number of elements in array.
1741 @param Buffer Bigger version of passed in Buffer with all the
1744 @retval EFI_SUCCESS Buffer size has grown.
1745 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1749 ConSplitterGrowBuffer (
1750 IN UINTN ElementSize
,
1751 IN OUT UINTN
*Count
,
1752 IN OUT VOID
**Buffer
1756 Returns information for an available graphics mode that the graphics device
1757 and the set of active video output devices supports.
1759 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1760 @param ModeNumber The mode number to return information on.
1761 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1762 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1764 @retval EFI_SUCCESS Mode information returned.
1765 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1766 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1767 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1768 @retval EFI_OUT_OF_RESOURCES No resource available.
1773 ConSplitterGraphicsOutputQueryMode (
1774 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1775 IN UINT32 ModeNumber
,
1776 OUT UINTN
*SizeOfInfo
,
1777 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1781 Set the video device into the specified mode and clears the visible portions of
1782 the output display to black.
1784 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1785 @param ModeNumber Abstraction that defines the current video mode.
1787 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1788 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1789 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1790 @retval EFI_OUT_OF_RESOURCES No resource available.
1795 ConSplitterGraphicsOutputSetMode (
1796 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1797 IN UINT32 ModeNumber
1801 The following table defines actions for BltOperations.
1803 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1804 directly to every pixel of the video display rectangle
1805 (DestinationX, DestinationY)
1806 (DestinationX + Width, DestinationY + Height).
1807 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1808 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1809 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1810 the BltBuffer rectangle (DestinationX, DestinationY )
1811 (DestinationX + Width, DestinationY + Height). If DestinationX or
1812 DestinationY is not zero then Delta must be set to the length in bytes
1813 of a row in the BltBuffer.
1814 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1815 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1816 video display rectangle (DestinationX, DestinationY)
1817 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1818 not zero then Delta must be set to the length in bytes of a row in the
1820 EfiBltVideoToVideo - Copy from the video display rectangle
1821 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1822 to the video display rectangle (DestinationX, DestinationY)
1823 (DestinationX + Width, DestinationY + Height).
1824 The BltBuffer and Delta are not used in this mode.
1826 @param This Protocol instance pointer.
1827 @param BltBuffer Buffer containing data to blit into video buffer.
1828 This buffer has a size of
1829 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1830 @param BltOperation Operation to perform on BlitBuffer and video
1832 @param SourceX X coordinate of source for the BltBuffer.
1833 @param SourceY Y coordinate of source for the BltBuffer.
1834 @param DestinationX X coordinate of destination for the BltBuffer.
1835 @param DestinationY Y coordinate of destination for the BltBuffer.
1836 @param Width Width of rectangle in BltBuffer in pixels.
1837 @param Height Hight of rectangle in BltBuffer in pixels.
1838 @param Delta OPTIONAL.
1840 @retval EFI_SUCCESS The Blt operation completed.
1841 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1842 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1848 ConSplitterGraphicsOutputBlt (
1849 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1850 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1851 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1854 IN UINTN DestinationX
,
1855 IN UINTN DestinationY
,
1858 IN UINTN Delta OPTIONAL
1863 Return the current video mode information.
1865 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1866 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1867 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1868 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1869 @param RefreshRate The refresh rate of the monitor in Hertz.
1871 @retval EFI_SUCCESS Mode information returned.
1872 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1873 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1878 ConSplitterUgaDrawGetMode (
1879 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1880 OUT UINT32
*HorizontalResolution
,
1881 OUT UINT32
*VerticalResolution
,
1882 OUT UINT32
*ColorDepth
,
1883 OUT UINT32
*RefreshRate
1887 Set the current video mode information.
1889 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1890 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1891 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1892 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1893 @param RefreshRate The refresh rate of the monitor in Hertz.
1895 @retval EFI_SUCCESS Mode information returned.
1896 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1897 @retval EFI_OUT_OF_RESOURCES Out of resources.
1902 ConSplitterUgaDrawSetMode (
1903 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1904 IN UINT32 HorizontalResolution
,
1905 IN UINT32 VerticalResolution
,
1906 IN UINT32 ColorDepth
,
1907 IN UINT32 RefreshRate
1911 Blt a rectangle of pixels on the graphics screen.
1913 The following table defines actions for BltOperations.
1916 Write data from the BltBuffer pixel (SourceX, SourceY)
1917 directly to every pixel of the video display rectangle
1918 (DestinationX, DestinationY)
1919 (DestinationX + Width, DestinationY + Height).
1920 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1921 EfiUgaVideoToBltBuffer:
1922 Read data from the video display rectangle
1923 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1924 the BltBuffer rectangle (DestinationX, DestinationY )
1925 (DestinationX + Width, DestinationY + Height). If DestinationX or
1926 DestinationY is not zero then Delta must be set to the length in bytes
1927 of a row in the BltBuffer.
1928 EfiUgaBltBufferToVideo:
1929 Write data from the BltBuffer rectangle
1930 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1931 video display rectangle (DestinationX, DestinationY)
1932 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1933 not zero then Delta must be set to the length in bytes of a row in the
1936 Copy from the video display rectangle
1937 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1938 to the video display rectangle (DestinationX, DestinationY)
1939 (DestinationX + Width, DestinationY + Height).
1940 The BltBuffer and Delta are not used in this mode.
1942 @param This Protocol instance pointer.
1943 @param BltBuffer Buffer containing data to blit into video buffer. This
1944 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1945 @param BltOperation Operation to perform on BlitBuffer and video memory
1946 @param SourceX X coordinate of source for the BltBuffer.
1947 @param SourceY Y coordinate of source for the BltBuffer.
1948 @param DestinationX X coordinate of destination for the BltBuffer.
1949 @param DestinationY Y coordinate of destination for the BltBuffer.
1950 @param Width Width of rectangle in BltBuffer in pixels.
1951 @param Height Hight of rectangle in BltBuffer in pixels.
1952 @param Delta OPTIONAL
1954 @retval EFI_SUCCESS The Blt operation completed.
1955 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1956 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1961 ConSplitterUgaDrawBlt (
1962 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1963 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1964 IN EFI_UGA_BLT_OPERATION BltOperation
,
1967 IN UINTN DestinationX
,
1968 IN UINTN DestinationY
,
1971 IN UINTN Delta OPTIONAL
1975 Sets the output device(s) to a specified mode.
1977 @param Private Text Out Splitter pointer.
1978 @param ModeNumber The mode number to set.
1983 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,