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_
21 #include <IndustryStandard/Pci.h>
23 #include <Protocol/DevicePath.h>
24 #include <Protocol/ComponentName.h>
25 #include <Protocol/DriverBinding.h>
26 #include <Protocol/SimplePointer.h>
27 #include <Protocol/AbsolutePointer.h>
28 #include <Protocol/SimpleTextOut.h>
29 #include <Protocol/SimpleTextIn.h>
30 #include <Protocol/SimpleTextInEx.h>
31 #include <Protocol/GraphicsOutput.h>
32 #include <Protocol/UgaDraw.h>
33 #include <Protocol/PciIo.h>
35 #include <Guid/ConsoleInDevice.h>
36 #include <Guid/StandardErrorDevice.h>
37 #include <Guid/ConsoleOutDevice.h>
39 #include <Library/PcdLib.h>
40 #include <Library/DebugLib.h>
41 #include <Library/UefiDriverEntryPoint.h>
42 #include <Library/UefiLib.h>
43 #include <Library/BaseLib.h>
44 #include <Library/BaseMemoryLib.h>
45 #include <Library/MemoryAllocationLib.h>
46 #include <Library/UefiBootServicesTableLib.h>
47 #include <Library/UefiRuntimeServicesTableLib.h>
48 #include <Library/DevicePathLib.h>
49 #include <Library/DxeServicesTableLib.h>
53 // Driver Binding Externs
55 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
56 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
57 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
58 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
59 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
60 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
61 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
;
62 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
63 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
64 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
65 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
66 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
67 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
68 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
69 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
73 // These definitions were in the old Hii protocol, but are not in the new UEFI
74 // version. So they are defined locally.
76 #define UNICODE_NARROW_CHAR 0xFFF0
77 #define UNICODE_WIDE_CHAR 0xFFF1
81 // Private Data Structures
83 #define CONSOLE_SPLITTER_ALLOC_UNIT 32
94 } TEXT_OUT_SPLITTER_QUERY_DATA
;
97 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')
100 // Private data for Text In Ex Splitter Notify
102 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
104 VOID
**NotifyHandleList
;
105 EFI_KEY_DATA KeyData
;
106 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
107 LIST_ENTRY NotifyEntry
;
108 } TEXT_IN_EX_SPLITTER_NOTIFY
;
110 #define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \
112 TEXT_IN_EX_SPLITTER_NOTIFY, \
114 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \
117 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')
120 // Private data for the Console In splitter
124 EFI_HANDLE VirtualHandle
;
126 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
127 UINTN CurrentNumberOfConsoles
;
128 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
129 UINTN TextInListCount
;
131 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
132 UINTN CurrentNumberOfExConsoles
;
133 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
134 UINTN TextInExListCount
;
135 LIST_ENTRY NotifyList
;
138 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
139 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
140 UINTN CurrentNumberOfPointers
;
141 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
142 UINTN PointerListCount
;
144 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
145 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
146 UINTN CurrentNumberOfAbsolutePointers
;
147 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
148 UINTN AbsolutePointerListCount
;
149 BOOLEAN AbsoluteInputEventSignalState
;
151 BOOLEAN KeyEventSignalState
;
152 BOOLEAN InputEventSignalState
;
153 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
155 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
157 TEXT_IN_SPLITTER_PRIVATE_DATA, \
159 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
162 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
164 TEXT_IN_SPLITTER_PRIVATE_DATA, \
166 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
168 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
170 TEXT_IN_SPLITTER_PRIVATE_DATA, \
172 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
175 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
177 TEXT_IN_SPLITTER_PRIVATE_DATA, \
179 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
183 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')
186 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
187 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
188 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
189 } TEXT_OUT_AND_GOP_DATA
;
192 // Private data for the Console Out splitter
196 EFI_HANDLE VirtualHandle
;
197 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
198 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
200 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
201 UINT32 UgaHorizontalResolution
;
202 UINT32 UgaVerticalResolution
;
203 UINT32 UgaColorDepth
;
204 UINT32 UgaRefreshRate
;
206 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
207 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
208 UINTN CurrentNumberOfGraphicsOutput
;
209 UINTN CurrentNumberOfUgaDraw
;
211 UINTN CurrentNumberOfConsoles
;
212 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
213 UINTN TextOutListCount
;
214 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
215 UINTN TextOutQueryDataCount
;
216 INT32
*TextOutModeMap
;
218 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
220 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
222 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
224 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
227 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
229 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
231 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
234 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
236 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
238 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
241 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
243 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
245 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
249 // Function Prototypes
253 The user Entry Point for module ConSplitter. The user code starts with this function.
255 Installs driver module protocols and. Creates virtual device handles for ConIn,
256 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
257 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
258 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
260 @param[in] ImageHandle The firmware allocated handle for the EFI image.
261 @param[in] SystemTable A pointer to the EFI System Table.
263 @retval EFI_SUCCESS The entry point is executed successfully.
264 @retval other Some error occurs when executing this entry point.
269 ConSplitterDriverEntry (
270 IN EFI_HANDLE ImageHandle
,
271 IN EFI_SYSTEM_TABLE
*SystemTable
275 Construct console input devices' private data.
277 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
280 @retval EFI_OUT_OF_RESOURCES Out of resources.
281 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
282 @retval other Failed to construct private data.
286 ConSplitterTextInConstructor (
287 TEXT_IN_SPLITTER_PRIVATE_DATA
*ConInPrivate
291 Construct console output devices' private data.
293 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA
296 @retval EFI_OUT_OF_RESOURCES Out of resources.
297 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
301 ConSplitterTextOutConstructor (
302 TEXT_OUT_SPLITTER_PRIVATE_DATA
*ConOutPrivate
307 Test to see if Console In Device could be supported on the Controller.
309 @param This Driver Binding protocol instance pointer.
310 @param ControllerHandle Handle of device to test.
311 @param RemainingDevicePath Optional parameter use to pick a specific child
314 @retval EFI_SUCCESS This driver supports this device.
315 @retval other This driver does not support this device.
320 ConSplitterConInDriverBindingSupported (
321 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
322 IN EFI_HANDLE ControllerHandle
,
323 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
327 Test to see if Simple Pointer protocol could be supported on the Controller.
329 @param This Driver Binding protocol instance pointer.
330 @param ControllerHandle Handle of device to test.
331 @param RemainingDevicePath Optional parameter use to pick a specific child
334 @retval EFI_SUCCESS This driver supports this device.
335 @retval other This driver does not support this device.
340 ConSplitterSimplePointerDriverBindingSupported (
341 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
342 IN EFI_HANDLE ControllerHandle
,
343 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
347 Test to see if Console Out Device could be supported on the Controller.
349 @param This Driver Binding protocol instance pointer.
350 @param ControllerHandle Handle of device to test.
351 @param RemainingDevicePath Optional parameter use to pick a specific child
354 @retval EFI_SUCCESS This driver supports this device.
355 @retval other This driver does not support this device.
360 ConSplitterConOutDriverBindingSupported (
361 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
362 IN EFI_HANDLE ControllerHandle
,
363 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
367 Test to see if Standard Error Device could be supported on the Controller.
369 @param This Driver Binding protocol instance pointer.
370 @param ControllerHandle Handle of device to test.
371 @param RemainingDevicePath Optional parameter use to pick a specific child
374 @retval EFI_SUCCESS This driver supports this device.
375 @retval other This driver does not support this device.
380 ConSplitterStdErrDriverBindingSupported (
381 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
382 IN EFI_HANDLE ControllerHandle
,
383 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
387 Start Console In Consplitter on device handle.
389 @param This Driver Binding protocol instance pointer.
390 @param ControllerHandle Handle of device to bind driver to.
391 @param RemainingDevicePath Optional parameter use to pick a specific child
394 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
395 @retval other Console In Consplitter does not support this device.
400 ConSplitterConInDriverBindingStart (
401 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
402 IN EFI_HANDLE ControllerHandle
,
403 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
407 Start Simple Pointer Consplitter on device handle.
409 @param This Driver Binding protocol instance pointer.
410 @param ControllerHandle Handle of device to bind driver to.
411 @param RemainingDevicePath Optional parameter use to pick a specific child
414 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
415 @retval other Simple Pointer Consplitter does not support this device.
420 ConSplitterSimplePointerDriverBindingStart (
421 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
422 IN EFI_HANDLE ControllerHandle
,
423 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
427 Start Console Out Consplitter on device handle.
429 @param This Driver Binding protocol instance pointer.
430 @param ControllerHandle Handle of device to bind driver to.
431 @param RemainingDevicePath Optional parameter use to pick a specific child
434 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
435 @retval other Console Out Consplitter does not support this device.
440 ConSplitterConOutDriverBindingStart (
441 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
442 IN EFI_HANDLE ControllerHandle
,
443 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
447 Start Standard Error Consplitter on device handle.
449 @param This Driver Binding protocol instance pointer.
450 @param ControllerHandle Handle of device to bind driver to.
451 @param RemainingDevicePath Optional parameter use to pick a specific child
454 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
455 @retval other Standard Error Consplitter does not support this device.
460 ConSplitterStdErrDriverBindingStart (
461 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
462 IN EFI_HANDLE ControllerHandle
,
463 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
467 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
469 @param This Driver Binding protocol instance pointer.
470 @param ControllerHandle Handle of device to stop driver on
471 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
472 children is zero stop the entire bus driver.
473 @param ChildHandleBuffer List of Child Handles to Stop.
475 @retval EFI_SUCCESS This driver is removed ControllerHandle
476 @retval other This driver was not removed from this device
481 ConSplitterConInDriverBindingStop (
482 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
483 IN EFI_HANDLE ControllerHandle
,
484 IN UINTN NumberOfChildren
,
485 IN EFI_HANDLE
*ChildHandleBuffer
489 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
490 Simple Pointer protocol.
492 @param This Driver Binding protocol instance pointer.
493 @param ControllerHandle Handle of device to stop driver on
494 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
495 children is zero stop the entire bus driver.
496 @param ChildHandleBuffer List of Child Handles to Stop.
498 @retval EFI_SUCCESS This driver is removed ControllerHandle
499 @retval other This driver was not removed from this device
504 ConSplitterSimplePointerDriverBindingStop (
505 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
506 IN EFI_HANDLE ControllerHandle
,
507 IN UINTN NumberOfChildren
,
508 IN EFI_HANDLE
*ChildHandleBuffer
512 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.
514 @param This Driver Binding protocol instance pointer.
515 @param ControllerHandle Handle of device to stop driver on
516 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
517 children is zero stop the entire bus driver.
518 @param ChildHandleBuffer List of Child Handles to Stop.
520 @retval EFI_SUCCESS This driver is removed ControllerHandle
521 @retval other This driver was not removed from this device
526 ConSplitterConOutDriverBindingStop (
527 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
528 IN EFI_HANDLE ControllerHandle
,
529 IN UINTN NumberOfChildren
,
530 IN EFI_HANDLE
*ChildHandleBuffer
534 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
536 @param This Driver Binding protocol instance pointer.
537 @param ControllerHandle Handle of device to stop driver on
538 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
539 children is zero stop the entire bus driver.
540 @param ChildHandleBuffer List of Child Handles to Stop.
542 @retval EFI_SUCCESS This driver is removed ControllerHandle
543 @retval other This driver was not removed from this device
548 ConSplitterStdErrDriverBindingStop (
549 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
550 IN EFI_HANDLE ControllerHandle
,
551 IN UINTN NumberOfChildren
,
552 IN EFI_HANDLE
*ChildHandleBuffer
557 Test to see if Absolute Pointer protocol could be supported on the Controller.
559 @param This Driver Binding protocol instance pointer.
560 @param ControllerHandle Handle of device to test.
561 @param RemainingDevicePath Optional parameter use to pick a specific child
564 @retval EFI_SUCCESS This driver supports this device.
565 @retval other This driver does not support this device.
570 ConSplitterAbsolutePointerDriverBindingSupported (
571 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
572 IN EFI_HANDLE ControllerHandle
,
573 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
577 Start Absolute Pointer Consplitter on device handle.
579 @param This Driver Binding protocol instance pointer.
580 @param ControllerHandle Handle of device to bind driver to.
581 @param RemainingDevicePath Optional parameter use to pick a specific child
584 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
585 @retval other Absolute Pointer Consplitter does not support this device.
590 ConSplitterAbsolutePointerDriverBindingStart (
591 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
592 IN EFI_HANDLE ControllerHandle
,
593 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
597 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
598 Absolute Pointer protocol.
600 @param This Driver Binding protocol instance pointer.
601 @param ControllerHandle Handle of device to stop driver on
602 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
603 children is zero stop the entire bus driver.
604 @param ChildHandleBuffer List of Child Handles to Stop.
606 @retval EFI_SUCCESS This driver is removed ControllerHandle
607 @retval other This driver was not removed from this device
612 ConSplitterAbsolutePointerDriverBindingStop (
613 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
614 IN EFI_HANDLE ControllerHandle
,
615 IN UINTN NumberOfChildren
,
616 IN EFI_HANDLE
*ChildHandleBuffer
620 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
622 @param Private Text In Splitter pointer.
623 @param AbsolutePointer Absolute Pointer protocol pointer.
625 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
626 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
630 ConSplitterAbsolutePointerAddDevice (
631 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
632 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
636 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.
638 @param Private Text In Splitter pointer.
639 @param AbsolutePointer Absolute Pointer protocol pointer.
641 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
642 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
646 ConSplitterAbsolutePointerDeleteDevice (
647 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
648 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
652 // Absolute Pointer protocol interfaces
657 Resets the pointer device hardware.
659 @param This Protocol instance pointer.
660 @param ExtendedVerification Driver may perform diagnostics on reset.
662 @retval EFI_SUCCESS The device was reset.
663 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
669 ConSplitterAbsolutePointerReset (
670 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
671 IN BOOLEAN ExtendedVerification
676 Retrieves the current state of a pointer device.
678 @param This Protocol instance pointer.
679 @param State A pointer to the state information on the
682 @retval EFI_SUCCESS The state of the pointer device was returned in
684 @retval EFI_NOT_READY The state of the pointer device has not changed
685 since the last call to GetState().
686 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
687 retrieve the pointer device's current state.
692 ConSplitterAbsolutePointerGetState (
693 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
694 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
698 This event agregates all the events of the pointer devices in the splitter.
700 If any events of physical pointer devices are signaled, signal the pointer
701 splitter event. This will cause the calling code to call
702 ConSplitterAbsolutePointerGetState ().
704 @param Event The Event assoicated with callback.
705 @param Context Context registered when Event was created.
710 ConSplitterAbsolutePointerWaitForInput (
716 Retrieves a Unicode string that is the user readable name of the driver.
718 This function retrieves the user readable name of a driver in the form of a
719 Unicode string. If the driver specified by This has a user readable name in
720 the language specified by Language, then a pointer to the driver name is
721 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
722 by This does not support the language specified by Language,
723 then EFI_UNSUPPORTED is returned.
725 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
726 EFI_COMPONENT_NAME_PROTOCOL instance.
728 @param Language[in] A pointer to a Null-terminated ASCII string
729 array indicating the language. This is the
730 language of the driver name that the caller is
731 requesting, and it must match one of the
732 languages specified in SupportedLanguages. The
733 number of languages supported by a driver is up
734 to the driver writer. Language is specified
735 in RFC 4646 or ISO 639-2 language code format.
737 @param DriverName[out] A pointer to the Unicode string to return.
738 This Unicode string is the name of the
739 driver specified by This in the language
740 specified by Language.
742 @retval EFI_SUCCESS The Unicode string for the Driver specified by
743 This and the language specified by Language was
744 returned in DriverName.
746 @retval EFI_INVALID_PARAMETER Language is NULL.
748 @retval EFI_INVALID_PARAMETER DriverName is NULL.
750 @retval EFI_UNSUPPORTED The driver specified by This does not support
751 the language specified by Language.
756 ConSplitterComponentNameGetDriverName (
757 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
759 OUT CHAR16
**DriverName
764 Retrieves a Unicode string that is the user readable name of the controller
765 that is being managed by a driver.
767 This function retrieves the user readable name of the controller specified by
768 ControllerHandle and ChildHandle in the form of a Unicode string. If the
769 driver specified by This has a user readable name in the language specified by
770 Language, then a pointer to the controller name is returned in ControllerName,
771 and EFI_SUCCESS is returned. If the driver specified by This is not currently
772 managing the controller specified by ControllerHandle and ChildHandle,
773 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
774 support the language specified by Language, then EFI_UNSUPPORTED is returned.
776 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
777 EFI_COMPONENT_NAME_PROTOCOL instance.
779 @param ControllerHandle[in] The handle of a controller that the driver
780 specified by This is managing. This handle
781 specifies the controller whose name is to be
784 @param ChildHandle[in] The handle of the child controller to retrieve
785 the name of. This is an optional parameter that
786 may be NULL. It will be NULL for device
787 drivers. It will also be NULL for a bus drivers
788 that wish to retrieve the name of the bus
789 controller. It will not be NULL for a bus
790 driver that wishes to retrieve the name of a
793 @param Language[in] A pointer to a Null-terminated ASCII string
794 array indicating the language. This is the
795 language of the driver name that the caller is
796 requesting, and it must match one of the
797 languages specified in SupportedLanguages. The
798 number of languages supported by a driver is up
799 to the driver writer. Language is specified in
800 RFC 4646 or ISO 639-2 language code format.
802 @param ControllerName[out] A pointer to the Unicode string to return.
803 This Unicode string is the name of the
804 controller specified by ControllerHandle and
805 ChildHandle in the language specified by
806 Language from the point of view of the driver
809 @retval EFI_SUCCESS The Unicode string for the user readable name in
810 the language specified by Language for the
811 driver specified by This was returned in
814 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
816 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
819 @retval EFI_INVALID_PARAMETER Language is NULL.
821 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
823 @retval EFI_UNSUPPORTED The driver specified by This is not currently
824 managing the controller specified by
825 ControllerHandle and ChildHandle.
827 @retval EFI_UNSUPPORTED The driver specified by This does not support
828 the language specified by Language.
833 ConSplitterConInComponentNameGetControllerName (
834 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
835 IN EFI_HANDLE ControllerHandle
,
836 IN EFI_HANDLE ChildHandle OPTIONAL
,
838 OUT CHAR16
**ControllerName
843 Retrieves a Unicode string that is the user readable name of the controller
844 that is being managed by a driver.
846 This function retrieves the user readable name of the controller specified by
847 ControllerHandle and ChildHandle in the form of a Unicode string. If the
848 driver specified by This has a user readable name in the language specified by
849 Language, then a pointer to the controller name is returned in ControllerName,
850 and EFI_SUCCESS is returned. If the driver specified by This is not currently
851 managing the controller specified by ControllerHandle and ChildHandle,
852 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
853 support the language specified by Language, then EFI_UNSUPPORTED is returned.
855 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
856 EFI_COMPONENT_NAME_PROTOCOL instance.
858 @param ControllerHandle[in] The handle of a controller that the driver
859 specified by This is managing. This handle
860 specifies the controller whose name is to be
863 @param ChildHandle[in] The handle of the child controller to retrieve
864 the name of. This is an optional parameter that
865 may be NULL. It will be NULL for device
866 drivers. It will also be NULL for a bus drivers
867 that wish to retrieve the name of the bus
868 controller. It will not be NULL for a bus
869 driver that wishes to retrieve the name of a
872 @param Language[in] A pointer to a Null-terminated ASCII string
873 array indicating the language. This is the
874 language of the driver name that the caller is
875 requesting, and it must match one of the
876 languages specified in SupportedLanguages. The
877 number of languages supported by a driver is up
878 to the driver writer. Language is specified in
879 RFC 4646 or ISO 639-2 language code format.
881 @param ControllerName[out] A pointer to the Unicode string to return.
882 This Unicode string is the name of the
883 controller specified by ControllerHandle and
884 ChildHandle in the language specified by
885 Language from the point of view of the driver
888 @retval EFI_SUCCESS The Unicode string for the user readable name in
889 the language specified by Language for the
890 driver specified by This was returned in
893 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
895 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
898 @retval EFI_INVALID_PARAMETER Language is NULL.
900 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
902 @retval EFI_UNSUPPORTED The driver specified by This is not currently
903 managing the controller specified by
904 ControllerHandle and ChildHandle.
906 @retval EFI_UNSUPPORTED The driver specified by This does not support
907 the language specified by Language.
912 ConSplitterSimplePointerComponentNameGetControllerName (
913 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
914 IN EFI_HANDLE ControllerHandle
,
915 IN EFI_HANDLE ChildHandle OPTIONAL
,
917 OUT CHAR16
**ControllerName
921 Retrieves a Unicode string that is the user readable name of the controller
922 that is being managed by an EFI Driver.
924 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
926 @param ControllerHandle The handle of a controller that the driver
927 specified by This is managing. This handle
928 specifies the controller whose name is to be
930 @param ChildHandle The handle of the child controller to retrieve the
931 name of. This is an optional parameter that may
932 be NULL. It will be NULL for device drivers. It
933 will also be NULL for a bus drivers that wish to
934 retrieve the name of the bus controller. It will
935 not be NULL for a bus driver that wishes to
936 retrieve the name of a child controller.
937 @param Language A pointer to RFC4646 language identifier. This is
938 the language of the controller name that that the
939 caller is requesting, and it must match one of the
940 languages specified in SupportedLanguages. The
941 number of languages supported by a driver is up to
943 @param ControllerName A pointer to the Unicode string to return. This
944 Unicode string is the name of the controller
945 specified by ControllerHandle and ChildHandle in
946 the language specified by Language from the point
947 of view of the driver specified by This.
949 @retval EFI_SUCCESS The Unicode string for the user readable name in
950 the language specified by Language for the driver
951 specified by This was returned in DriverName.
952 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
953 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
955 @retval EFI_INVALID_PARAMETER Language is NULL.
956 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
957 @retval EFI_UNSUPPORTED The driver specified by This is not currently
958 managing the controller specified by
959 ControllerHandle and ChildHandle.
960 @retval EFI_UNSUPPORTED The driver specified by This does not support the
961 language specified by Language.
966 ConSplitterAbsolutePointerComponentNameGetControllerName (
967 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
968 IN EFI_HANDLE ControllerHandle
,
969 IN EFI_HANDLE ChildHandle OPTIONAL
,
971 OUT CHAR16
**ControllerName
975 Retrieves a Unicode string that is the user readable name of the controller
976 that is being managed by a driver.
978 This function retrieves the user readable name of the controller specified by
979 ControllerHandle and ChildHandle in the form of a Unicode string. If the
980 driver specified by This has a user readable name in the language specified by
981 Language, then a pointer to the controller name is returned in ControllerName,
982 and EFI_SUCCESS is returned. If the driver specified by This is not currently
983 managing the controller specified by ControllerHandle and ChildHandle,
984 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
985 support the language specified by Language, then EFI_UNSUPPORTED is returned.
987 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
988 EFI_COMPONENT_NAME_PROTOCOL instance.
990 @param ControllerHandle[in] The handle of a controller that the driver
991 specified by This is managing. This handle
992 specifies the controller whose name is to be
995 @param ChildHandle[in] The handle of the child controller to retrieve
996 the name of. This is an optional parameter that
997 may be NULL. It will be NULL for device
998 drivers. It will also be NULL for a bus drivers
999 that wish to retrieve the name of the bus
1000 controller. It will not be NULL for a bus
1001 driver that wishes to retrieve the name of a
1004 @param Language[in] A pointer to a Null-terminated ASCII string
1005 array indicating the language. This is the
1006 language of the driver name that the caller is
1007 requesting, and it must match one of the
1008 languages specified in SupportedLanguages. The
1009 number of languages supported by a driver is up
1010 to the driver writer. Language is specified in
1011 RFC 4646 or ISO 639-2 language code format.
1013 @param ControllerName[out] A pointer to the Unicode string to return.
1014 This Unicode string is the name of the
1015 controller specified by ControllerHandle and
1016 ChildHandle in the language specified by
1017 Language from the point of view of the driver
1020 @retval EFI_SUCCESS The Unicode string for the user readable name in
1021 the language specified by Language for the
1022 driver specified by This was returned in
1025 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1027 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1030 @retval EFI_INVALID_PARAMETER Language is NULL.
1032 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1034 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1035 managing the controller specified by
1036 ControllerHandle and ChildHandle.
1038 @retval EFI_UNSUPPORTED The driver specified by This does not support
1039 the language specified by Language.
1044 ConSplitterConOutComponentNameGetControllerName (
1045 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1046 IN EFI_HANDLE ControllerHandle
,
1047 IN EFI_HANDLE ChildHandle OPTIONAL
,
1049 OUT CHAR16
**ControllerName
1054 Retrieves a Unicode string that is the user readable name of the controller
1055 that is being managed by a driver.
1057 This function retrieves the user readable name of the controller specified by
1058 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1059 driver specified by This has a user readable name in the language specified by
1060 Language, then a pointer to the controller name is returned in ControllerName,
1061 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1062 managing the controller specified by ControllerHandle and ChildHandle,
1063 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1064 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1066 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1067 EFI_COMPONENT_NAME_PROTOCOL instance.
1069 @param ControllerHandle[in] The handle of a controller that the driver
1070 specified by This is managing. This handle
1071 specifies the controller whose name is to be
1074 @param ChildHandle[in] The handle of the child controller to retrieve
1075 the name of. This is an optional parameter that
1076 may be NULL. It will be NULL for device
1077 drivers. It will also be NULL for a bus drivers
1078 that wish to retrieve the name of the bus
1079 controller. It will not be NULL for a bus
1080 driver that wishes to retrieve the name of a
1083 @param Language[in] A pointer to a Null-terminated ASCII string
1084 array indicating the language. This is the
1085 language of the driver name that the caller is
1086 requesting, and it must match one of the
1087 languages specified in SupportedLanguages. The
1088 number of languages supported by a driver is up
1089 to the driver writer. Language is specified in
1090 RFC 4646 or ISO 639-2 language code format.
1092 @param ControllerName[out] A pointer to the Unicode string to return.
1093 This Unicode string is the name of the
1094 controller specified by ControllerHandle and
1095 ChildHandle in the language specified by
1096 Language from the point of view of the driver
1099 @retval EFI_SUCCESS The Unicode string for the user readable name in
1100 the language specified by Language for the
1101 driver specified by This was returned in
1104 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
1106 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1109 @retval EFI_INVALID_PARAMETER Language is NULL.
1111 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1113 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1114 managing the controller specified by
1115 ControllerHandle and ChildHandle.
1117 @retval EFI_UNSUPPORTED The driver specified by This does not support
1118 the language specified by Language.
1123 ConSplitterStdErrComponentNameGetControllerName (
1124 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
1125 IN EFI_HANDLE ControllerHandle
,
1126 IN EFI_HANDLE ChildHandle OPTIONAL
,
1128 OUT CHAR16
**ControllerName
1133 // TextIn Constructor/Destructor functions
1137 Add Text Input Device in Consplitter Text Input list.
1139 @param Private Text In Splitter pointer.
1140 @param TextIn Simple Text Input protocol pointer.
1142 @retval EFI_SUCCESS Text Input Device added successfully.
1143 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1147 ConSplitterTextInAddDevice (
1148 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1149 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1153 Remove Text Input Device from Consplitter Text Input list.
1155 @param Private Text In Splitter pointer.
1156 @param TextIn Simple Text protocol pointer.
1158 @retval EFI_SUCCESS Simple Text Device removed successfully.
1159 @retval EFI_NOT_FOUND No Simple Text Device found.
1163 ConSplitterTextInDeleteDevice (
1164 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1165 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
1169 // SimplePointer Constuctor/Destructor functions
1173 Add Simple Pointer Device in Consplitter Simple Pointer list.
1175 @param Private Text In Splitter pointer.
1176 @param SimplePointer Simple Pointer protocol pointer.
1178 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1179 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1183 ConSplitterSimplePointerAddDevice (
1184 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1185 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1189 Remove Simple Pointer Device from Consplitter Simple Pointer list.
1191 @param Private Text In Splitter pointer.
1192 @param SimplePointer Simple Pointer protocol pointer.
1194 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1195 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1199 ConSplitterSimplePointerDeleteDevice (
1200 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1201 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
1205 // TextOut Constuctor/Destructor functions
1209 Add Text Output Device in Consplitter Text Output list.
1211 @param Private Text Out Splitter pointer.
1212 @param TextOut Simple Text Output protocol pointer.
1213 @param GraphicsOutput Graphics Output protocol pointer.
1214 @param UgaDraw UGA Draw protocol pointer.
1216 @retval EFI_SUCCESS Text Output Device added successfully.
1217 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1221 ConSplitterTextOutAddDevice (
1222 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1223 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
1224 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1225 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1229 Remove Text Out Device in Consplitter Text Out list.
1231 @param Private Text Out Splitter pointer.
1232 @param TextOut Simple Text Output Pointer protocol pointer.
1234 @retval EFI_SUCCESS Text Out Device removed successfully.
1235 @retval EFI_NOT_FOUND No Text Out Device found.
1239 ConSplitterTextOutDeleteDevice (
1240 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1241 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
1245 // TextIn I/O Functions
1249 Reset the input device and optionaly run diagnostics
1251 @param This Protocol instance pointer.
1252 @param ExtendedVerification Driver may perform diagnostics on reset.
1254 @retval EFI_SUCCESS The device was reset.
1255 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1261 ConSplitterTextInReset (
1262 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1263 IN BOOLEAN ExtendedVerification
1267 Reads the next keystroke from the input device. The WaitForKey Event can
1268 be used to test for existance of a keystroke via WaitForEvent () call.
1270 @param This Protocol instance pointer.
1271 @param Key Driver may perform diagnostics on reset.
1273 @retval EFI_SUCCESS The keystroke information was returned.
1274 @retval EFI_NOT_READY There was no keystroke data availiable.
1275 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1281 ConSplitterTextInReadKeyStroke (
1282 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
1283 OUT EFI_INPUT_KEY
*Key
1287 Add Text Input Ex Device in Consplitter Text Input Ex list.
1289 @param Private Text In Splitter pointer.
1290 @param TextInEx Simple Text Input Ex Input protocol pointer.
1292 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1293 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1297 ConSplitterTextInExAddDevice (
1298 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1299 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1303 Remove Text Ex Device from Consplitter Text Input Ex list.
1305 @param Private Text In Splitter pointer.
1306 @param TextInEx Simple Text Ex protocol pointer.
1308 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.
1309 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.
1313 ConSplitterTextInExDeleteDevice (
1314 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1315 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
1319 // Simple Text Input Ex protocol function prototypes
1323 Reset the input device and optionaly run diagnostics
1325 @param This Protocol instance pointer.
1326 @param ExtendedVerification Driver may perform diagnostics on reset.
1328 @retval EFI_SUCCESS The device was reset.
1329 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1335 ConSplitterTextInResetEx (
1336 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1337 IN BOOLEAN ExtendedVerification
1342 Reads the next keystroke from the input device. The WaitForKey Event can
1343 be used to test for existance of a keystroke via WaitForEvent () call.
1345 @param This Protocol instance pointer.
1346 @param KeyData A pointer to a buffer that is filled in with the
1347 keystroke state data for the key that was
1350 @retval EFI_SUCCESS The keystroke information was returned.
1351 @retval EFI_NOT_READY There was no keystroke data availiable.
1352 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1354 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1359 ConSplitterTextInReadKeyStrokeEx (
1360 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1361 OUT EFI_KEY_DATA
*KeyData
1366 Set certain state for the input device.
1368 @param This Protocol instance pointer.
1369 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1370 state for the input device.
1372 @retval EFI_SUCCESS The device state was set successfully.
1373 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1374 could not have the setting adjusted.
1375 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1377 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1382 ConSplitterTextInSetState (
1383 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1384 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1389 Register a notification function for a particular keystroke for the input device.
1391 @param This Protocol instance pointer.
1392 @param KeyData A pointer to a buffer that is filled in with the
1393 keystroke information data for the key that was
1395 @param KeyNotificationFunction Points to the function to be called when the key
1396 sequence is typed specified by KeyData.
1397 @param NotifyHandle Points to the unique handle assigned to the
1398 registered notification.
1400 @retval EFI_SUCCESS The notification function was registered
1402 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1404 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.
1409 ConSplitterTextInRegisterKeyNotify (
1410 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1411 IN EFI_KEY_DATA
*KeyData
,
1412 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1413 OUT VOID
**NotifyHandle
1418 Remove a registered notification function from a particular keystroke.
1420 @param This Protocol instance pointer.
1421 @param NotificationHandle The handle of the notification function being
1424 @retval EFI_SUCCESS The notification function was unregistered
1426 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1427 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1432 ConSplitterTextInUnregisterKeyNotify (
1433 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1434 IN VOID
*NotificationHandle
1438 This event aggregates all the events of the ConIn devices in the spliter.
1440 If any events of physical ConIn devices are signaled, signal the ConIn
1441 spliter event. This will cause the calling code to call
1442 ConSplitterTextInReadKeyStroke ().
1444 @param Event The Event assoicated with callback.
1445 @param Context Context registered when Event was created.
1450 ConSplitterTextInWaitForKey (
1457 Reads the next keystroke from the input device. The WaitForKey Event can
1458 be used to test for existance of a keystroke via WaitForEvent () call.
1460 @param Private Protocol instance pointer.
1461 @param Key Driver may perform diagnostics on reset.
1463 @retval EFI_SUCCESS The keystroke information was returned.
1464 @retval EFI_NOT_READY There was no keystroke data availiable.
1465 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1471 ConSplitterTextInPrivateReadKeyStroke (
1472 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1473 OUT EFI_INPUT_KEY
*Key
1477 Reset the input device and optionaly run diagnostics
1479 @param This Protocol instance pointer.
1480 @param ExtendedVerification Driver may perform diagnostics on reset.
1482 @retval EFI_SUCCESS The device was reset.
1483 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1489 ConSplitterSimplePointerReset (
1490 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1491 IN BOOLEAN ExtendedVerification
1495 Reads the next keystroke from the input device. The WaitForKey Event can
1496 be used to test for existance of a keystroke via WaitForEvent () call.
1498 @param This A pointer to protocol instance.
1499 @param State A pointer to state information on the pointer device
1501 @retval EFI_SUCCESS The keystroke information was returned in State.
1502 @retval EFI_NOT_READY There was no keystroke data availiable.
1503 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1509 ConSplitterSimplePointerGetState (
1510 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1511 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1515 This event agregates all the events of the ConIn devices in the spliter.
1516 If any events of physical ConIn devices are signaled, signal the ConIn
1517 spliter event. This will cause the calling code to call
1518 ConSplitterTextInReadKeyStroke ().
1520 @param Event The Event assoicated with callback.
1521 @param Context Context registered when Event was created.
1526 ConSplitterSimplePointerWaitForInput (
1532 // TextOut I/O Functions
1536 Reset the text output device hardware and optionaly run diagnostics
1538 @param This Protocol instance pointer.
1539 @param ExtendedVerification Driver may perform more exhaustive verfication
1540 operation of the device during reset.
1542 @retval EFI_SUCCESS The text output device was reset.
1543 @retval EFI_DEVICE_ERROR The text output device is not functioning
1544 correctly and could not be reset.
1549 ConSplitterTextOutReset (
1550 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1551 IN BOOLEAN ExtendedVerification
1555 Write a Unicode string to the output device.
1557 @param This Protocol instance pointer.
1558 @param WString The NULL-terminated Unicode string to be
1559 displayed on the output device(s). All output
1560 devices must also support the Unicode drawing
1561 defined in this file.
1563 @retval EFI_SUCCESS The string was output to the device.
1564 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1566 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1568 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1569 characters in the Unicode string could not be
1570 rendered and were skipped.
1575 ConSplitterTextOutOutputString (
1576 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1581 Verifies that all characters in a Unicode string can be output to the
1584 @param This Protocol instance pointer.
1585 @param WString The NULL-terminated Unicode string to be
1586 examined for the output device(s).
1588 @retval EFI_SUCCESS The device(s) are capable of rendering the
1590 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1591 cannot be rendered by one or more of the output
1592 devices mapped by the EFI handle.
1597 ConSplitterTextOutTestString (
1598 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1603 Returns information for an available text mode that the output device(s)
1606 @param This Protocol instance pointer.
1607 @param ModeNumber The mode number to return information on.
1608 @param Columns Returns the columns of the text output device
1609 for the requested ModeNumber.
1610 @param Rows Returns the rows of the text output device
1611 for the requested ModeNumber.
1613 @retval EFI_SUCCESS The requested mode information was returned.
1614 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1616 @retval EFI_UNSUPPORTED The mode number was not valid.
1621 ConSplitterTextOutQueryMode (
1622 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1623 IN UINTN ModeNumber
,
1629 Sets the output device(s) to a specified mode.
1631 @param This Protocol instance pointer.
1632 @param ModeNumber The mode number to set.
1634 @retval EFI_SUCCESS The requested text mode was set.
1635 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1637 @retval EFI_UNSUPPORTED The mode number was not valid.
1642 ConSplitterTextOutSetMode (
1643 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1648 Sets the background and foreground colors for the OutputString () and
1649 ClearScreen () functions.
1651 @param This Protocol instance pointer.
1652 @param Attribute The attribute to set. Bits 0..3 are the
1653 foreground color, and bits 4..6 are the
1654 background color. All other bits are undefined
1655 and must be zero. The valid Attributes are
1656 defined in this file.
1658 @retval EFI_SUCCESS The attribute was set.
1659 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1661 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1666 ConSplitterTextOutSetAttribute (
1667 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1672 Clears the output device(s) display to the currently selected background
1675 @param This Protocol instance pointer.
1677 @retval EFI_SUCCESS The operation completed successfully.
1678 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1680 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1685 ConSplitterTextOutClearScreen (
1686 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1690 Sets the current coordinates of the cursor position
1692 @param This Protocol instance pointer.
1693 @param Column The column position to set the cursor to. Must be
1694 greater than or equal to zero and less than the
1695 number of columns by QueryMode ().
1696 @param Row The row position to set the cursor to. Must be
1697 greater than or equal to zero and less than the
1698 number of rows by QueryMode ().
1700 @retval EFI_SUCCESS The operation completed successfully.
1701 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1703 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1704 or the cursor position is invalid for the
1710 ConSplitterTextOutSetCursorPosition (
1711 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1718 Makes the cursor visible or invisible
1720 @param This Protocol instance pointer.
1721 @param Visible If TRUE, the cursor is set to be visible. If
1722 FALSE, the cursor is set to be invisible.
1724 @retval EFI_SUCCESS The operation completed successfully.
1725 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1726 the request, or the device does not support
1727 changing the cursor mode.
1728 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1733 ConSplitterTextOutEnableCursor (
1734 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1739 Take the passed in Buffer of size ElementSize and grow the buffer
1740 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.
1741 Copy the current data in Buffer to the new version of Buffer and
1742 free the old version of buffer.
1744 @param ElementSize Size of element in array.
1745 @param Count Current number of elements in array.
1746 @param Buffer Bigger version of passed in Buffer with all the
1749 @retval EFI_SUCCESS Buffer size has grown.
1750 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1754 ConSplitterGrowBuffer (
1755 IN UINTN ElementSize
,
1756 IN OUT UINTN
*Count
,
1757 IN OUT VOID
**Buffer
1761 Returns information for an available graphics mode that the graphics device
1762 and the set of active video output devices supports.
1764 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1765 @param ModeNumber The mode number to return information on.
1766 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
1767 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.
1769 @retval EFI_SUCCESS Mode information returned.
1770 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1771 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
1772 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1773 @retval EFI_OUT_OF_RESOURCES No resource available.
1778 ConSplitterGraphicsOutputQueryMode (
1779 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1780 IN UINT32 ModeNumber
,
1781 OUT UINTN
*SizeOfInfo
,
1782 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1786 Set the video device into the specified mode and clears the visible portions of
1787 the output display to black.
1789 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
1790 @param ModeNumber Abstraction that defines the current video mode.
1792 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
1793 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
1794 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1795 @retval EFI_OUT_OF_RESOURCES No resource available.
1800 ConSplitterGraphicsOutputSetMode (
1801 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1802 IN UINT32 ModeNumber
1806 The following table defines actions for BltOperations.
1808 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1809 directly to every pixel of the video display rectangle
1810 (DestinationX, DestinationY)
1811 (DestinationX + Width, DestinationY + Height).
1812 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1813 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1814 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1815 the BltBuffer rectangle (DestinationX, DestinationY )
1816 (DestinationX + Width, DestinationY + Height). If DestinationX or
1817 DestinationY is not zero then Delta must be set to the length in bytes
1818 of a row in the BltBuffer.
1819 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1820 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1821 video display rectangle (DestinationX, DestinationY)
1822 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1823 not zero then Delta must be set to the length in bytes of a row in the
1825 EfiBltVideoToVideo - Copy from the video display rectangle
1826 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1827 to the video display rectangle (DestinationX, DestinationY)
1828 (DestinationX + Width, DestinationY + Height).
1829 The BltBuffer and Delta are not used in this mode.
1831 @param This Protocol instance pointer.
1832 @param BltBuffer Buffer containing data to blit into video buffer.
1833 This buffer has a size of
1834 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
1835 @param BltOperation Operation to perform on BlitBuffer and video
1837 @param SourceX X coordinate of source for the BltBuffer.
1838 @param SourceY Y coordinate of source for the BltBuffer.
1839 @param DestinationX X coordinate of destination for the BltBuffer.
1840 @param DestinationY Y coordinate of destination for the BltBuffer.
1841 @param Width Width of rectangle in BltBuffer in pixels.
1842 @param Height Hight of rectangle in BltBuffer in pixels.
1843 @param Delta OPTIONAL.
1845 @retval EFI_SUCCESS The Blt operation completed.
1846 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1847 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
1853 ConSplitterGraphicsOutputBlt (
1854 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1855 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1856 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1859 IN UINTN DestinationX
,
1860 IN UINTN DestinationY
,
1863 IN UINTN Delta OPTIONAL
1868 Return the current video mode information.
1870 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1871 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1872 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1873 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1874 @param RefreshRate The refresh rate of the monitor in Hertz.
1876 @retval EFI_SUCCESS Mode information returned.
1877 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1878 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1883 ConSplitterUgaDrawGetMode (
1884 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1885 OUT UINT32
*HorizontalResolution
,
1886 OUT UINT32
*VerticalResolution
,
1887 OUT UINT32
*ColorDepth
,
1888 OUT UINT32
*RefreshRate
1892 Set the current video mode information.
1894 @param This The EFI_UGA_DRAW_PROTOCOL instance.
1895 @param HorizontalResolution The size of video screen in pixels in the X dimension.
1896 @param VerticalResolution The size of video screen in pixels in the Y dimension.
1897 @param ColorDepth Number of bits per pixel, currently defined to be 32.
1898 @param RefreshRate The refresh rate of the monitor in Hertz.
1900 @retval EFI_SUCCESS Mode information returned.
1901 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1902 @retval EFI_OUT_OF_RESOURCES Out of resources.
1907 ConSplitterUgaDrawSetMode (
1908 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1909 IN UINT32 HorizontalResolution
,
1910 IN UINT32 VerticalResolution
,
1911 IN UINT32 ColorDepth
,
1912 IN UINT32 RefreshRate
1916 Blt a rectangle of pixels on the graphics screen.
1918 The following table defines actions for BltOperations.
1921 Write data from the BltBuffer pixel (SourceX, SourceY)
1922 directly to every pixel of the video display rectangle
1923 (DestinationX, DestinationY)
1924 (DestinationX + Width, DestinationY + Height).
1925 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1926 EfiUgaVideoToBltBuffer:
1927 Read data from the video display rectangle
1928 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1929 the BltBuffer rectangle (DestinationX, DestinationY )
1930 (DestinationX + Width, DestinationY + Height). If DestinationX or
1931 DestinationY is not zero then Delta must be set to the length in bytes
1932 of a row in the BltBuffer.
1933 EfiUgaBltBufferToVideo:
1934 Write data from the BltBuffer rectangle
1935 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1936 video display rectangle (DestinationX, DestinationY)
1937 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1938 not zero then Delta must be set to the length in bytes of a row in the
1941 Copy from the video display rectangle
1942 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1943 to the video display rectangle (DestinationX, DestinationY)
1944 (DestinationX + Width, DestinationY + Height).
1945 The BltBuffer and Delta are not used in this mode.
1947 @param This Protocol instance pointer.
1948 @param BltBuffer Buffer containing data to blit into video buffer. This
1949 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
1950 @param BltOperation Operation to perform on BlitBuffer and video memory
1951 @param SourceX X coordinate of source for the BltBuffer.
1952 @param SourceY Y coordinate of source for the BltBuffer.
1953 @param DestinationX X coordinate of destination for the BltBuffer.
1954 @param DestinationY Y coordinate of destination for the BltBuffer.
1955 @param Width Width of rectangle in BltBuffer in pixels.
1956 @param Height Hight of rectangle in BltBuffer in pixels.
1957 @param Delta OPTIONAL
1959 @retval EFI_SUCCESS The Blt operation completed.
1960 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
1961 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
1966 ConSplitterUgaDrawBlt (
1967 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1968 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1969 IN EFI_UGA_BLT_OPERATION BltOperation
,
1972 IN UINTN DestinationX
,
1973 IN UINTN DestinationY
,
1976 IN UINTN Delta OPTIONAL
1980 Sets the output device(s) to a specified mode.
1982 @param Private Text Out Splitter pointer.
1983 @param ModeNumber The mode number to set.
1988 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,