2 Private data structures for the Console Splitter driver
4 Copyright (c) 2006 - 2007 Intel Corporation. <BR>
5 All rights reserved. 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_
19 #include <Guid/PrimaryStandardErrorDevice.h>
20 #include <Guid/PrimaryConsoleOutDevice.h>
21 #include <Protocol/GraphicsOutput.h>
22 #include <Guid/PrimaryConsoleInDevice.h>
23 #include <Protocol/SimplePointer.h>
24 #include <Protocol/AbsolutePointer.h>
25 #include <Protocol/SimpleTextOut.h>
26 #include <Guid/ConsoleInDevice.h>
27 #include <Protocol/SimpleTextIn.h>
28 #include <Protocol/SimpleTextInEx.h>
29 #include <Protocol/ConsoleControl.h>
30 #include <Guid/StandardErrorDevice.h>
31 #include <Guid/ConsoleOutDevice.h>
32 #include <Protocol/UgaDraw.h>
33 #include <Library/PcdLib.h>
34 #include <Library/DebugLib.h>
35 #include <Library/UefiDriverEntryPoint.h>
36 #include <Library/UefiLib.h>
37 #include <Library/BaseLib.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/MemoryAllocationLib.h>
40 #include <Library/UefiBootServicesTableLib.h>
43 // Driver Binding Externs
45 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
;
46 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName
;
47 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2
;
48 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
;
49 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName
;
50 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2
;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName
;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2
;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName
;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2
;
56 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
;
57 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName
;
58 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2
;
60 extern EFI_GUID gSimpleTextInExNotifyGuid
;
62 // These definitions were in the old Hii protocol, but are not in the new UEFI
63 // version. So they are defined locally.
64 #define UNICODE_NARROW_CHAR 0xFFF0
65 #define UNICODE_WIDE_CHAR 0xFFF1
69 // Private Data Structures
71 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
72 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
73 #define MAX_STD_IN_PASSWORD 80
78 } TEXT_OUT_SPLITTER_QUERY_DATA
;
81 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
83 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
85 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'n')
87 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY
{
89 EFI_HANDLE
*NotifyHandleList
;
90 EFI_HANDLE NotifyHandle
;
92 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn
;
93 LIST_ENTRY NotifyEntry
;
94 } TEXT_IN_EX_SPLITTER_NOTIFY
;
98 EFI_HANDLE VirtualHandle
;
100 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn
;
101 UINTN CurrentNumberOfConsoles
;
102 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
**TextInList
;
103 UINTN TextInListCount
;
105 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx
;
106 UINTN CurrentNumberOfExConsoles
;
107 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
**TextInExList
;
108 UINTN TextInExListCount
;
109 LIST_ENTRY NotifyList
;
112 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
113 EFI_SIMPLE_POINTER_MODE SimplePointerMode
;
114 UINTN CurrentNumberOfPointers
;
115 EFI_SIMPLE_POINTER_PROTOCOL
**PointerList
;
116 UINTN PointerListCount
;
118 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer
;
119 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode
;
120 UINTN CurrentNumberOfAbsolutePointers
;
121 EFI_ABSOLUTE_POINTER_PROTOCOL
**AbsolutePointerList
;
122 UINTN AbsolutePointerListCount
;
123 BOOLEAN AbsoluteInputEventSignalState
;
125 BOOLEAN PasswordEnabled
;
126 CHAR16 Password
[MAX_STD_IN_PASSWORD
];
128 CHAR16 PwdAttempt
[MAX_STD_IN_PASSWORD
];
131 BOOLEAN KeyEventSignalState
;
132 BOOLEAN InputEventSignalState
;
133 } TEXT_IN_SPLITTER_PRIVATE_DATA
;
135 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
137 TEXT_IN_SPLITTER_PRIVATE_DATA, \
139 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
142 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
144 TEXT_IN_SPLITTER_PRIVATE_DATA, \
146 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
148 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
150 TEXT_IN_SPLITTER_PRIVATE_DATA, \
152 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
155 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
157 TEXT_IN_SPLITTER_PRIVATE_DATA, \
159 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
163 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
165 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
168 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
169 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
170 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
171 BOOLEAN TextOutEnabled
;
172 } TEXT_OUT_AND_GOP_DATA
;
176 EFI_HANDLE VirtualHandle
;
177 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut
;
178 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode
;
180 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
181 UINT32 UgaHorizontalResolution
;
182 UINT32 UgaVerticalResolution
;
183 UINT32 UgaColorDepth
;
184 UINT32 UgaRefreshRate
;
185 EFI_UGA_PIXEL
*UgaBlt
;
187 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
188 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*GraphicsOutputBlt
;
189 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*GraphicsOutputModeBuffer
;
190 UINTN CurrentNumberOfGraphicsOutput
;
191 UINTN CurrentNumberOfUgaDraw
;
192 BOOLEAN HardwareNeedsStarting
;
194 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl
;
196 UINTN CurrentNumberOfConsoles
;
197 TEXT_OUT_AND_GOP_DATA
*TextOutList
;
198 UINTN TextOutListCount
;
199 TEXT_OUT_SPLITTER_QUERY_DATA
*TextOutQueryData
;
200 UINTN TextOutQueryDataCount
;
201 INT32
*TextOutModeMap
;
203 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode
;
205 UINTN DevNullColumns
;
207 CHAR16
*DevNullScreen
;
208 INT32
*DevNullAttributes
;
210 } TEXT_OUT_SPLITTER_PRIVATE_DATA
;
212 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
214 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
216 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
219 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
221 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
223 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
226 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
228 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
230 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
233 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
235 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
237 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
241 // Function Prototypes
245 ConSplitterDriverEntry (
246 IN EFI_HANDLE ImageHandle
,
247 IN EFI_SYSTEM_TABLE
*SystemTable
252 ConSplitterTextInConstructor (
253 TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
258 ConSplitterTextOutConstructor (
259 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
264 // Driver Binding Functions
268 ConSplitterConInDriverBindingSupported (
269 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
270 IN EFI_HANDLE ControllerHandle
,
271 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
277 ConSplitterSimplePointerDriverBindingSupported (
278 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
279 IN EFI_HANDLE ControllerHandle
,
280 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
286 ConSplitterConOutDriverBindingSupported (
287 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
288 IN EFI_HANDLE ControllerHandle
,
289 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
295 ConSplitterStdErrDriverBindingSupported (
296 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
297 IN EFI_HANDLE ControllerHandle
,
298 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
304 ConSplitterConInDriverBindingStart (
305 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
306 IN EFI_HANDLE ControllerHandle
,
307 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
313 ConSplitterSimplePointerDriverBindingStart (
314 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
315 IN EFI_HANDLE ControllerHandle
,
316 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
322 ConSplitterConOutDriverBindingStart (
323 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
324 IN EFI_HANDLE ControllerHandle
,
325 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
331 ConSplitterStdErrDriverBindingStart (
332 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
333 IN EFI_HANDLE ControllerHandle
,
334 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
340 ConSplitterConInDriverBindingStop (
341 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
342 IN EFI_HANDLE ControllerHandle
,
343 IN UINTN NumberOfChildren
,
344 IN EFI_HANDLE
*ChildHandleBuffer
350 ConSplitterSimplePointerDriverBindingStop (
351 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
352 IN EFI_HANDLE ControllerHandle
,
353 IN UINTN NumberOfChildren
,
354 IN EFI_HANDLE
*ChildHandleBuffer
360 ConSplitterConOutDriverBindingStop (
361 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
362 IN EFI_HANDLE ControllerHandle
,
363 IN UINTN NumberOfChildren
,
364 IN EFI_HANDLE
*ChildHandleBuffer
370 ConSplitterStdErrDriverBindingStop (
371 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
372 IN EFI_HANDLE ControllerHandle
,
373 IN UINTN NumberOfChildren
,
374 IN EFI_HANDLE
*ChildHandleBuffer
379 // Driver binding functions
384 ConSplitterAbsolutePointerDriverBindingSupported (
385 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
386 IN EFI_HANDLE ControllerHandle
,
387 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
393 ConSplitterAbsolutePointerDriverBindingStart (
394 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
395 IN EFI_HANDLE ControllerHandle
,
396 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
402 ConSplitterAbsolutePointerDriverBindingStop (
403 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
404 IN EFI_HANDLE ControllerHandle
,
405 IN UINTN NumberOfChildren
,
406 IN EFI_HANDLE
*ChildHandleBuffer
411 ConSplitterAbsolutePointerAddDevice (
412 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
413 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
418 ConSplitterAbsolutePointerDeleteDevice (
419 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
420 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*AbsolutePointer
425 // Absolute Pointer protocol interfaces
430 ConSplitterAbsolutePointerReset (
431 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
432 IN BOOLEAN ExtendedVerification
437 Resets the pointer device hardware.
440 This - Protocol instance pointer.
441 ExtendedVerification - Driver may perform diagnostics on reset.
444 EFI_SUCCESS - The device was reset.
445 EFI_DEVICE_ERROR - The device is not functioning correctly and could
453 ConSplitterAbsolutePointerGetState (
454 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
455 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
460 Retrieves the current state of a pointer device.
463 This - Protocol instance pointer.
464 State - A pointer to the state information on the pointer device.
467 EFI_SUCCESS - The state of the pointer device was returned in State..
468 EFI_NOT_READY - The state of the pointer device has not changed since the last call to
470 EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
471 device's current state.
477 ConSplitterAbsolutePointerWaitForInput (
484 Retrieves a Unicode string that is the user readable name of the driver.
486 This function retrieves the user readable name of a driver in the form of a
487 Unicode string. If the driver specified by This has a user readable name in
488 the language specified by Language, then a pointer to the driver name is
489 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
490 by This does not support the language specified by Language,
491 then EFI_UNSUPPORTED is returned.
493 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
494 EFI_COMPONENT_NAME_PROTOCOL instance.
496 @param Language[in] A pointer to a Null-terminated ASCII string
497 array indicating the language. This is the
498 language of the driver name that the caller is
499 requesting, and it must match one of the
500 languages specified in SupportedLanguages. The
501 number of languages supported by a driver is up
502 to the driver writer. Language is specified
503 in RFC 3066 or ISO 639-2 language code format.
505 @param DriverName[out] A pointer to the Unicode string to return.
506 This Unicode string is the name of the
507 driver specified by This in the language
508 specified by Language.
510 @retval EFI_SUCCESS The Unicode string for the Driver specified by
511 This and the language specified by Language was
512 returned in DriverName.
514 @retval EFI_INVALID_PARAMETER Language is NULL.
516 @retval EFI_INVALID_PARAMETER DriverName is NULL.
518 @retval EFI_UNSUPPORTED The driver specified by This does not support
519 the language specified by Language.
524 ConSplitterComponentNameGetDriverName (
525 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
527 OUT CHAR16
**DriverName
532 Retrieves a Unicode string that is the user readable name of the controller
533 that is being managed by a driver.
535 This function retrieves the user readable name of the controller specified by
536 ControllerHandle and ChildHandle in the form of a Unicode string. If the
537 driver specified by This has a user readable name in the language specified by
538 Language, then a pointer to the controller name is returned in ControllerName,
539 and EFI_SUCCESS is returned. If the driver specified by This is not currently
540 managing the controller specified by ControllerHandle and ChildHandle,
541 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
542 support the language specified by Language, then EFI_UNSUPPORTED is returned.
544 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
545 EFI_COMPONENT_NAME_PROTOCOL instance.
547 @param ControllerHandle[in] The handle of a controller that the driver
548 specified by This is managing. This handle
549 specifies the controller whose name is to be
552 @param ChildHandle[in] The handle of the child controller to retrieve
553 the name of. This is an optional parameter that
554 may be NULL. It will be NULL for device
555 drivers. It will also be NULL for a bus drivers
556 that wish to retrieve the name of the bus
557 controller. It will not be NULL for a bus
558 driver that wishes to retrieve the name of a
561 @param Language[in] A pointer to a Null-terminated ASCII string
562 array indicating the language. This is the
563 language of the driver name that the caller is
564 requesting, and it must match one of the
565 languages specified in SupportedLanguages. The
566 number of languages supported by a driver is up
567 to the driver writer. Language is specified in
568 RFC 3066 or ISO 639-2 language code format.
570 @param ControllerName[out] A pointer to the Unicode string to return.
571 This Unicode string is the name of the
572 controller specified by ControllerHandle and
573 ChildHandle in the language specified by
574 Language from the point of view of the driver
577 @retval EFI_SUCCESS The Unicode string for the user readable name in
578 the language specified by Language for the
579 driver specified by This was returned in
582 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
584 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
587 @retval EFI_INVALID_PARAMETER Language is NULL.
589 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
591 @retval EFI_UNSUPPORTED The driver specified by This is not currently
592 managing the controller specified by
593 ControllerHandle and ChildHandle.
595 @retval EFI_UNSUPPORTED The driver specified by This does not support
596 the language specified by Language.
601 ConSplitterConInComponentNameGetControllerName (
602 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
603 IN EFI_HANDLE ControllerHandle
,
604 IN EFI_HANDLE ChildHandle OPTIONAL
,
606 OUT CHAR16
**ControllerName
611 Retrieves a Unicode string that is the user readable name of the controller
612 that is being managed by a driver.
614 This function retrieves the user readable name of the controller specified by
615 ControllerHandle and ChildHandle in the form of a Unicode string. If the
616 driver specified by This has a user readable name in the language specified by
617 Language, then a pointer to the controller name is returned in ControllerName,
618 and EFI_SUCCESS is returned. If the driver specified by This is not currently
619 managing the controller specified by ControllerHandle and ChildHandle,
620 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
621 support the language specified by Language, then EFI_UNSUPPORTED is returned.
623 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
624 EFI_COMPONENT_NAME_PROTOCOL instance.
626 @param ControllerHandle[in] The handle of a controller that the driver
627 specified by This is managing. This handle
628 specifies the controller whose name is to be
631 @param ChildHandle[in] The handle of the child controller to retrieve
632 the name of. This is an optional parameter that
633 may be NULL. It will be NULL for device
634 drivers. It will also be NULL for a bus drivers
635 that wish to retrieve the name of the bus
636 controller. It will not be NULL for a bus
637 driver that wishes to retrieve the name of a
640 @param Language[in] A pointer to a Null-terminated ASCII string
641 array indicating the language. This is the
642 language of the driver name that the caller is
643 requesting, and it must match one of the
644 languages specified in SupportedLanguages. The
645 number of languages supported by a driver is up
646 to the driver writer. Language is specified in
647 RFC 3066 or ISO 639-2 language code format.
649 @param ControllerName[out] A pointer to the Unicode string to return.
650 This Unicode string is the name of the
651 controller specified by ControllerHandle and
652 ChildHandle in the language specified by
653 Language from the point of view of the driver
656 @retval EFI_SUCCESS The Unicode string for the user readable name in
657 the language specified by Language for the
658 driver specified by This was returned in
661 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
663 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
666 @retval EFI_INVALID_PARAMETER Language is NULL.
668 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
670 @retval EFI_UNSUPPORTED The driver specified by This is not currently
671 managing the controller specified by
672 ControllerHandle and ChildHandle.
674 @retval EFI_UNSUPPORTED The driver specified by This does not support
675 the language specified by Language.
680 ConSplitterSimplePointerComponentNameGetControllerName (
681 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
682 IN EFI_HANDLE ControllerHandle
,
683 IN EFI_HANDLE ChildHandle OPTIONAL
,
685 OUT CHAR16
**ControllerName
690 ConSplitterAbsolutePointerComponentNameGetControllerName (
691 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
692 IN EFI_HANDLE ControllerHandle
,
693 IN EFI_HANDLE ChildHandle OPTIONAL
,
695 OUT CHAR16
**ControllerName
700 Retrieves a Unicode string that is the user readable name of the controller
701 that is being managed by a driver.
703 This function retrieves the user readable name of the controller specified by
704 ControllerHandle and ChildHandle in the form of a Unicode string. If the
705 driver specified by This has a user readable name in the language specified by
706 Language, then a pointer to the controller name is returned in ControllerName,
707 and EFI_SUCCESS is returned. If the driver specified by This is not currently
708 managing the controller specified by ControllerHandle and ChildHandle,
709 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
710 support the language specified by Language, then EFI_UNSUPPORTED is returned.
712 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
713 EFI_COMPONENT_NAME_PROTOCOL instance.
715 @param ControllerHandle[in] The handle of a controller that the driver
716 specified by This is managing. This handle
717 specifies the controller whose name is to be
720 @param ChildHandle[in] The handle of the child controller to retrieve
721 the name of. This is an optional parameter that
722 may be NULL. It will be NULL for device
723 drivers. It will also be NULL for a bus drivers
724 that wish to retrieve the name of the bus
725 controller. It will not be NULL for a bus
726 driver that wishes to retrieve the name of a
729 @param Language[in] A pointer to a Null-terminated ASCII string
730 array indicating the language. This is the
731 language of the driver name that the caller is
732 requesting, and it must match one of the
733 languages specified in SupportedLanguages. The
734 number of languages supported by a driver is up
735 to the driver writer. Language is specified in
736 RFC 3066 or ISO 639-2 language code format.
738 @param ControllerName[out] A pointer to the Unicode string to return.
739 This Unicode string is the name of the
740 controller specified by ControllerHandle and
741 ChildHandle in the language specified by
742 Language from the point of view of the driver
745 @retval EFI_SUCCESS The Unicode string for the user readable name in
746 the language specified by Language for the
747 driver specified by This was returned in
750 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
752 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
755 @retval EFI_INVALID_PARAMETER Language is NULL.
757 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
759 @retval EFI_UNSUPPORTED The driver specified by This is not currently
760 managing the controller specified by
761 ControllerHandle and ChildHandle.
763 @retval EFI_UNSUPPORTED The driver specified by This does not support
764 the language specified by Language.
769 ConSplitterConOutComponentNameGetControllerName (
770 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
771 IN EFI_HANDLE ControllerHandle
,
772 IN EFI_HANDLE ChildHandle OPTIONAL
,
774 OUT CHAR16
**ControllerName
779 Retrieves a Unicode string that is the user readable name of the controller
780 that is being managed by a driver.
782 This function retrieves the user readable name of the controller specified by
783 ControllerHandle and ChildHandle in the form of a Unicode string. If the
784 driver specified by This has a user readable name in the language specified by
785 Language, then a pointer to the controller name is returned in ControllerName,
786 and EFI_SUCCESS is returned. If the driver specified by This is not currently
787 managing the controller specified by ControllerHandle and ChildHandle,
788 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
789 support the language specified by Language, then EFI_UNSUPPORTED is returned.
791 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
792 EFI_COMPONENT_NAME_PROTOCOL instance.
794 @param ControllerHandle[in] The handle of a controller that the driver
795 specified by This is managing. This handle
796 specifies the controller whose name is to be
799 @param ChildHandle[in] The handle of the child controller to retrieve
800 the name of. This is an optional parameter that
801 may be NULL. It will be NULL for device
802 drivers. It will also be NULL for a bus drivers
803 that wish to retrieve the name of the bus
804 controller. It will not be NULL for a bus
805 driver that wishes to retrieve the name of a
808 @param Language[in] A pointer to a Null-terminated ASCII string
809 array indicating the language. This is the
810 language of the driver name that the caller is
811 requesting, and it must match one of the
812 languages specified in SupportedLanguages. The
813 number of languages supported by a driver is up
814 to the driver writer. Language is specified in
815 RFC 3066 or ISO 639-2 language code format.
817 @param ControllerName[out] A pointer to the Unicode string to return.
818 This Unicode string is the name of the
819 controller specified by ControllerHandle and
820 ChildHandle in the language specified by
821 Language from the point of view of the driver
824 @retval EFI_SUCCESS The Unicode string for the user readable name in
825 the language specified by Language for the
826 driver specified by This was returned in
829 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
831 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
834 @retval EFI_INVALID_PARAMETER Language is NULL.
836 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
838 @retval EFI_UNSUPPORTED The driver specified by This is not currently
839 managing the controller specified by
840 ControllerHandle and ChildHandle.
842 @retval EFI_UNSUPPORTED The driver specified by This does not support
843 the language specified by Language.
848 ConSplitterStdErrComponentNameGetControllerName (
849 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
850 IN EFI_HANDLE ControllerHandle
,
851 IN EFI_HANDLE ChildHandle OPTIONAL
,
853 OUT CHAR16
**ControllerName
858 // TextIn Constructor/Destructor functions
861 ConSplitterTextInAddDevice (
862 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
863 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
868 ConSplitterTextInDeleteDevice (
869 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
870 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*TextIn
875 // SimplePointer Constuctor/Destructor functions
878 ConSplitterSimplePointerAddDevice (
879 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
880 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
885 ConSplitterSimplePointerDeleteDevice (
886 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
887 IN EFI_SIMPLE_POINTER_PROTOCOL
*SimplePointer
892 // TextOut Constuctor/Destructor functions
895 ConSplitterTextOutAddDevice (
896 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
897 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
,
898 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
899 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
904 ConSplitterTextOutDeleteDevice (
905 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
906 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
911 // TextIn I/O Functions
915 ConSplitterTextInReset (
916 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
917 IN BOOLEAN ExtendedVerification
923 ConSplitterTextInReadKeyStroke (
924 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
925 OUT EFI_INPUT_KEY
*Key
929 ConSplitterTextInExAddDevice (
930 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
931 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
936 ConSplitterTextInExDeleteDevice (
937 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
938 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*TextInEx
943 // Simple Text Input Ex protocol function prototypes
948 ConSplitterTextInResetEx (
949 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
950 IN BOOLEAN ExtendedVerification
955 Reset the input device and optionaly run diagnostics
958 This - Protocol instance pointer.
959 ExtendedVerification - Driver may perform diagnostics on reset.
962 EFI_SUCCESS - The device was reset.
963 EFI_DEVICE_ERROR - The device is not functioning properly and could
971 ConSplitterTextInReadKeyStrokeEx (
972 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
973 OUT EFI_KEY_DATA
*KeyData
978 Reads the next keystroke from the input device. The WaitForKey Event can
979 be used to test for existance of a keystroke via WaitForEvent () call.
982 This - Protocol instance pointer.
983 KeyData - A pointer to a buffer that is filled in with the keystroke
984 state data for the key that was pressed.
987 EFI_SUCCESS - The keystroke information was returned.
988 EFI_NOT_READY - There was no keystroke data availiable.
989 EFI_DEVICE_ERROR - The keystroke information was not returned due to
991 EFI_INVALID_PARAMETER - KeyData is NULL.
998 ConSplitterTextInSetState (
999 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1000 IN EFI_KEY_TOGGLE_STATE
*KeyToggleState
1004 Routine Description:
1005 Set certain state for the input device.
1008 This - Protocol instance pointer.
1009 KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
1010 state for the input device.
1013 EFI_SUCCESS - The device state was set successfully.
1014 EFI_DEVICE_ERROR - The device is not functioning correctly and could
1015 not have the setting adjusted.
1016 EFI_UNSUPPORTED - The device does not have the ability to set its state.
1017 EFI_INVALID_PARAMETER - KeyToggleState is NULL.
1024 ConSplitterTextInRegisterKeyNotify (
1025 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1026 IN EFI_KEY_DATA
*KeyData
,
1027 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction
,
1028 OUT EFI_HANDLE
*NotifyHandle
1032 Routine Description:
1033 Register a notification function for a particular keystroke for the input device.
1036 This - Protocol instance pointer.
1037 KeyData - A pointer to a buffer that is filled in with the keystroke
1038 information data for the key that was pressed.
1039 KeyNotificationFunction - Points to the function to be called when the key
1040 sequence is typed specified by KeyData.
1041 NotifyHandle - Points to the unique handle assigned to the registered notification.
1044 EFI_SUCCESS - The notification function was registered successfully.
1045 EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
1046 EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
1053 ConSplitterTextInUnregisterKeyNotify (
1054 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
*This
,
1055 IN EFI_HANDLE NotificationHandle
1059 Routine Description:
1060 Remove a registered notification function from a particular keystroke.
1063 This - Protocol instance pointer.
1064 NotificationHandle - The handle of the notification function being unregistered.
1067 EFI_SUCCESS - The notification function was unregistered successfully.
1068 EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
1069 EFI_NOT_FOUND - Can not find the matching entry in database.
1075 ConSplitterTextInWaitForKey (
1082 ConSpliterConssoleControlStdInLocked (
1089 ConSpliterConsoleControlLockStdInEvent (
1097 ConSpliterConsoleControlLockStdIn (
1098 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1105 ConSplitterTextInPrivateReadKeyStroke (
1106 IN TEXT_IN_SPLITTER_PRIVATE_DATA
*Private
,
1107 OUT EFI_INPUT_KEY
*Key
1113 ConSplitterSimplePointerReset (
1114 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1115 IN BOOLEAN ExtendedVerification
1121 ConSplitterSimplePointerGetState (
1122 IN EFI_SIMPLE_POINTER_PROTOCOL
*This
,
1123 IN OUT EFI_SIMPLE_POINTER_STATE
*State
1129 ConSplitterSimplePointerWaitForInput (
1136 // TextOut I/O Functions
1139 ConSplitterSynchronizeModeData (
1140 TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1146 ConSplitterTextOutReset (
1147 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1148 IN BOOLEAN ExtendedVerification
1154 ConSplitterTextOutOutputString (
1155 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1162 ConSplitterTextOutTestString (
1163 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1170 ConSplitterTextOutQueryMode (
1171 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1172 IN UINTN ModeNumber
,
1180 ConSplitterTextOutSetMode (
1181 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1188 ConSplitterTextOutSetAttribute (
1189 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1196 ConSplitterTextOutClearScreen (
1197 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
1203 ConSplitterTextOutSetCursorPosition (
1204 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1212 ConSplitterTextOutEnableCursor (
1213 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
1219 ConSplitterGrowBuffer (
1220 IN UINTN SizeOfCount
,
1222 IN OUT VOID
**Buffer
1228 ConSpliterConsoleControlGetMode (
1229 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1230 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE
*Mode
,
1231 OUT BOOLEAN
*GopExists
,
1232 OUT BOOLEAN
*StdInLocked
1238 ConSpliterConsoleControlSetMode (
1239 IN EFI_CONSOLE_CONTROL_PROTOCOL
*This
,
1240 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
1246 ConSpliterGraphicsOutputQueryMode (
1247 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1248 IN UINT32 ModeNumber
,
1249 OUT UINTN
*SizeOfInfo
,
1250 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
**Info
1256 ConSpliterGraphicsOutputSetMode (
1257 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
* This
,
1258 IN UINT32 ModeNumber
1264 ConSpliterGraphicsOutputBlt (
1265 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*This
,
1266 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
, OPTIONAL
1267 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation
,
1270 IN UINTN DestinationX
,
1271 IN UINTN DestinationY
,
1274 IN UINTN Delta OPTIONAL
1280 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1281 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1282 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1288 ConSpliterUgaDrawGetMode (
1289 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1290 OUT UINT32
*HorizontalResolution
,
1291 OUT UINT32
*VerticalResolution
,
1292 OUT UINT32
*ColorDepth
,
1293 OUT UINT32
*RefreshRate
1299 ConSpliterUgaDrawSetMode (
1300 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1301 IN UINT32 HorizontalResolution
,
1302 IN UINT32 VerticalResolution
,
1303 IN UINT32 ColorDepth
,
1304 IN UINT32 RefreshRate
1310 ConSpliterUgaDrawBlt (
1311 IN EFI_UGA_DRAW_PROTOCOL
*This
,
1312 IN EFI_UGA_PIXEL
*BltBuffer
, OPTIONAL
1313 IN EFI_UGA_BLT_OPERATION BltOperation
,
1316 IN UINTN DestinationX
,
1317 IN UINTN DestinationY
,
1320 IN UINTN Delta OPTIONAL
1326 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1327 IN EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
,
1328 IN EFI_UGA_DRAW_PROTOCOL
*UgaDraw
1333 DevNullTextOutOutputString (
1334 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1340 DevNullTextOutSetMode (
1341 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1347 DevNullTextOutClearScreen (
1348 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
1353 DevNullTextOutSetCursorPosition (
1354 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1361 DevNullTextOutEnableCursor (
1362 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private
,
1369 IN TEXT_OUT_SPLITTER_PRIVATE_DATA
*Private