]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
578b49a58e2553230f45224027bd98d49d83b889
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConSplitterDxe / ConSplitter.h
1 /** @file
2 Private data structures for the Console Splitter driver
3
4 Copyright (c) 2006 - 2008 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
9
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.
12
13 **/
14
15 #ifndef _CON_SPLITTER_H_
16 #define _CON_SPLITTER_H_
17
18 #include <Uefi.h>
19 #include <Guid/PrimaryStandardErrorDevice.h>
20 #include <Guid/PrimaryConsoleOutDevice.h>
21 #include <Protocol/GraphicsOutput.h>
22 #include <Guid/PrimaryConsoleInDevice.h>
23 #include <Guid/GenericPlatformVariable.h>
24 #include <Protocol/SimplePointer.h>
25 #include <Protocol/AbsolutePointer.h>
26 #include <Protocol/SimpleTextOut.h>
27 #include <Guid/ConsoleInDevice.h>
28 #include <Protocol/SimpleTextIn.h>
29 #include <Protocol/SimpleTextInEx.h>
30 #include <Protocol/ConsoleControl.h>
31 #include <Guid/StandardErrorDevice.h>
32 #include <Guid/ConsoleOutDevice.h>
33 #include <Protocol/UgaDraw.h>
34 #include <Library/PcdLib.h>
35 #include <Library/DebugLib.h>
36 #include <Library/UefiDriverEntryPoint.h>
37 #include <Library/UefiLib.h>
38 #include <Library/BaseLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/MemoryAllocationLib.h>
41 #include <Library/UefiBootServicesTableLib.h>
42 #include <Library/UefiRuntimeServicesTableLib.h>
43
44
45 //
46 // Driver Binding Externs
47 //
48 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
49 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
50 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2;
51 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
52 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
53 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2;
54 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding;
55 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName;
56 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2;
57 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
58 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
59 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2;
60 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
61 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
62 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;
63
64 extern EFI_GUID gSimpleTextInExNotifyGuid;
65
66 // These definitions were in the old Hii protocol, but are not in the new UEFI
67 // version. So they are defined locally.
68 #define UNICODE_NARROW_CHAR 0xFFF0
69 #define UNICODE_WIDE_CHAR 0xFFF1
70
71
72 //
73 // Private Data Structures
74 //
75 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
76 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
77 #define MAX_STD_IN_PASSWORD 80
78
79 #define VARCONOUTMODE L"ConOutMode"
80
81 typedef struct {
82 UINTN Column;
83 UINTN Row;
84 } CONSOLE_OUT_MODE;
85
86 typedef struct {
87 UINTN Columns;
88 UINTN Rows;
89 } TEXT_OUT_SPLITTER_QUERY_DATA;
90
91 //
92 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
93 //
94 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
95
96 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'n')
97
98 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {
99 UINTN Signature;
100 EFI_HANDLE *NotifyHandleList;
101 EFI_HANDLE NotifyHandle;
102 EFI_KEY_DATA KeyData;
103 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
104 LIST_ENTRY NotifyEntry;
105 } TEXT_IN_EX_SPLITTER_NOTIFY;
106
107 typedef struct {
108 UINT64 Signature;
109 EFI_HANDLE VirtualHandle;
110
111 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn;
112 UINTN CurrentNumberOfConsoles;
113 EFI_SIMPLE_TEXT_INPUT_PROTOCOL **TextInList;
114 UINTN TextInListCount;
115
116 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx;
117 UINTN CurrentNumberOfExConsoles;
118 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **TextInExList;
119 UINTN TextInExListCount;
120 LIST_ENTRY NotifyList;
121
122
123 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;
124 EFI_SIMPLE_POINTER_MODE SimplePointerMode;
125 UINTN CurrentNumberOfPointers;
126 EFI_SIMPLE_POINTER_PROTOCOL **PointerList;
127 UINTN PointerListCount;
128
129 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer;
130 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode;
131 UINTN CurrentNumberOfAbsolutePointers;
132 EFI_ABSOLUTE_POINTER_PROTOCOL **AbsolutePointerList;
133 UINTN AbsolutePointerListCount;
134 BOOLEAN AbsoluteInputEventSignalState;
135
136 BOOLEAN PasswordEnabled;
137 CHAR16 Password[MAX_STD_IN_PASSWORD];
138 UINTN PwdIndex;
139 CHAR16 PwdAttempt[MAX_STD_IN_PASSWORD];
140 EFI_EVENT LockEvent;
141
142 BOOLEAN KeyEventSignalState;
143 BOOLEAN InputEventSignalState;
144 } TEXT_IN_SPLITTER_PRIVATE_DATA;
145
146 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
147 CR ((a), \
148 TEXT_IN_SPLITTER_PRIVATE_DATA, \
149 TextIn, \
150 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
151 )
152
153 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
154 CR ((a), \
155 TEXT_IN_SPLITTER_PRIVATE_DATA, \
156 SimplePointer, \
157 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
158 )
159 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
160 CR (a, \
161 TEXT_IN_SPLITTER_PRIVATE_DATA, \
162 TextInEx, \
163 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
164 )
165
166 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
167 CR (a, \
168 TEXT_IN_SPLITTER_PRIVATE_DATA, \
169 AbsolutePointer, \
170 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
171 )
172
173 //
174 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
175 //
176 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
177
178 typedef struct {
179 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
180 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
181 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
182 BOOLEAN TextOutEnabled;
183 } TEXT_OUT_AND_GOP_DATA;
184
185 typedef struct {
186 UINT64 Signature;
187 EFI_HANDLE VirtualHandle;
188 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;
189 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
190
191 EFI_UGA_DRAW_PROTOCOL UgaDraw;
192 UINT32 UgaHorizontalResolution;
193 UINT32 UgaVerticalResolution;
194 UINT32 UgaColorDepth;
195 UINT32 UgaRefreshRate;
196 EFI_UGA_PIXEL *UgaBlt;
197
198 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
199 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
200 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer;
201 UINTN CurrentNumberOfGraphicsOutput;
202 UINTN CurrentNumberOfUgaDraw;
203 BOOLEAN HardwareNeedsStarting;
204
205 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
206
207 UINTN CurrentNumberOfConsoles;
208 TEXT_OUT_AND_GOP_DATA *TextOutList;
209 UINTN TextOutListCount;
210 TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;
211 UINTN TextOutQueryDataCount;
212 INT32 *TextOutModeMap;
213
214 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode;
215
216 UINTN DevNullColumns;
217 UINTN DevNullRows;
218 CHAR16 *DevNullScreen;
219 INT32 *DevNullAttributes;
220
221 } TEXT_OUT_SPLITTER_PRIVATE_DATA;
222
223 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
224 CR ((a), \
225 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
226 TextOut, \
227 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
228 )
229
230 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
231 CR ((a), \
232 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
233 GraphicsOutput, \
234 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
235 )
236
237 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
238 CR ((a), \
239 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
240 UgaDraw, \
241 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
242 )
243
244 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
245 CR ((a), \
246 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
247 ConsoleControl, \
248 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
249 )
250
251 //
252 // Function Prototypes
253 //
254
255 /**
256 The user Entry Point for module ConSplitter. The user code starts with this function.
257
258 Installs driver module protocols and. Creates virtual device handles for ConIn,
259 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,
260 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
261 Installs Graphics Output protocol and/or UGA Draw protocol if needed.
262
263 @param[in] ImageHandle The firmware allocated handle for the EFI image.
264 @param[in] SystemTable A pointer to the EFI System Table.
265
266 @retval EFI_SUCCESS The entry point is executed successfully.
267 @retval other Some error occurs when executing this entry point.
268
269 **/
270 EFI_STATUS
271 EFIAPI
272 ConSplitterDriverEntry (
273 IN EFI_HANDLE ImageHandle,
274 IN EFI_SYSTEM_TABLE *SystemTable
275 )
276 ;
277
278 /**
279 Construct console input devices' private data.
280
281 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
282 structure.
283
284 @retval EFI_OUT_OF_RESOURCES Out of resources.
285 @retval EFI_SUCCESS Console Input Devcie's private data has been constructed.
286 @retval other Failed to construct private data.
287
288 **/
289 EFI_STATUS
290 ConSplitterTextInConstructor (
291 TEXT_IN_SPLITTER_PRIVATE_DATA *Private
292 )
293 ;
294
295 /**
296 Construct console output devices' private data.
297
298 @param ConOutPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA
299 structure.
300
301 @retval EFI_OUT_OF_RESOURCES Out of resources.
302 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.
303
304 **/
305 EFI_STATUS
306 ConSplitterTextOutConstructor (
307 TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
308 )
309 ;
310
311 //
312 // Driver Binding Functions
313 //
314
315 /**
316 Test to see if Console In Device could be supported on the ControllerHandle.
317
318 @param This Protocol instance pointer.
319 @param ControllerHandle Handle of device to test.
320 @param RemainingDevicePath Optional parameter use to pick a specific child
321 device to start.
322
323 @retval EFI_SUCCESS This driver supports this device.
324 @retval other This driver does not support this device.
325
326 **/
327 EFI_STATUS
328 EFIAPI
329 ConSplitterConInDriverBindingSupported (
330 IN EFI_DRIVER_BINDING_PROTOCOL *This,
331 IN EFI_HANDLE ControllerHandle,
332 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
333 )
334 ;
335
336 /**
337 Test to see if Simple Pointer protocol could be supported on the ControllerHandle.
338
339 @param This Protocol instance pointer.
340 @param ControllerHandle Handle of device to test.
341 @param RemainingDevicePath Optional parameter use to pick a specific child
342 device to start.
343
344 @retval EFI_SUCCESS This driver supports this device.
345 @retval other This driver does not support this device.
346
347 **/
348 EFI_STATUS
349 EFIAPI
350 ConSplitterSimplePointerDriverBindingSupported (
351 IN EFI_DRIVER_BINDING_PROTOCOL *This,
352 IN EFI_HANDLE ControllerHandle,
353 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
354 )
355 ;
356
357 /**
358 Test to see if Console Out Device could be supported on the ControllerHandle.
359
360 @param This Protocol instance pointer.
361 @param ControllerHandle Handle of device to test.
362 @param RemainingDevicePath Optional parameter use to pick a specific child
363 device to start.
364
365 @retval EFI_SUCCESS This driver supports this device.
366 @retval other This driver does not support this device.
367
368 **/
369 EFI_STATUS
370 EFIAPI
371 ConSplitterConOutDriverBindingSupported (
372 IN EFI_DRIVER_BINDING_PROTOCOL *This,
373 IN EFI_HANDLE ControllerHandle,
374 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
375 )
376 ;
377
378 /**
379 Test to see if Standard Error Device could be supported on the ControllerHandle.
380
381 @param This Protocol instance pointer.
382 @param ControllerHandle Handle of device to test.
383 @param RemainingDevicePath Optional parameter use to pick a specific child
384 device to start.
385
386 @retval EFI_SUCCESS This driver supports this device.
387 @retval other This driver does not support this device.
388
389 **/
390 EFI_STATUS
391 EFIAPI
392 ConSplitterStdErrDriverBindingSupported (
393 IN EFI_DRIVER_BINDING_PROTOCOL *This,
394 IN EFI_HANDLE ControllerHandle,
395 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
396 )
397 ;
398
399 /**
400 Start Console In Consplitter on device handle.
401
402 @param This Protocol instance pointer.
403 @param ControllerHandle Handle of device to bind driver to.
404 @param RemainingDevicePath Optional parameter use to pick a specific child
405 device to start.
406
407 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.
408 @retval other Console In Consplitter does not support this device.
409
410 **/
411 EFI_STATUS
412 EFIAPI
413 ConSplitterConInDriverBindingStart (
414 IN EFI_DRIVER_BINDING_PROTOCOL *This,
415 IN EFI_HANDLE ControllerHandle,
416 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
417 )
418 ;
419
420 /**
421 Start Simple Pointer Consplitter on device handle.
422
423 @param This Protocol instance pointer.
424 @param ControllerHandle Handle of device to bind driver to.
425 @param RemainingDevicePath Optional parameter use to pick a specific child
426 device to start.
427
428 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.
429 @retval other Simple Pointer Consplitter does not support this device.
430
431 **/
432 EFI_STATUS
433 EFIAPI
434 ConSplitterSimplePointerDriverBindingStart (
435 IN EFI_DRIVER_BINDING_PROTOCOL *This,
436 IN EFI_HANDLE ControllerHandle,
437 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
438 )
439 ;
440
441 /**
442 Start Console Out Consplitter on device handle.
443
444 @param This Protocol instance pointer.
445 @param ControllerHandle Handle of device to bind driver to.
446 @param RemainingDevicePath Optional parameter use to pick a specific child
447 device to start.
448
449 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.
450 @retval other Console Out Consplitter does not support this device.
451
452 **/
453 EFI_STATUS
454 EFIAPI
455 ConSplitterConOutDriverBindingStart (
456 IN EFI_DRIVER_BINDING_PROTOCOL *This,
457 IN EFI_HANDLE ControllerHandle,
458 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
459 )
460 ;
461
462 /**
463 Start Standard Error Consplitter on device handle.
464
465 @param This Protocol instance pointer.
466 @param ControllerHandle Handle of device to bind driver to.
467 @param RemainingDevicePath Optional parameter use to pick a specific child
468 device to start.
469
470 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.
471 @retval other Standard Error Consplitter does not support this device.
472
473 **/
474 EFI_STATUS
475 EFIAPI
476 ConSplitterStdErrDriverBindingStart (
477 IN EFI_DRIVER_BINDING_PROTOCOL *This,
478 IN EFI_HANDLE ControllerHandle,
479 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
480 )
481 ;
482
483 /**
484 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.
485
486 @param This Protocol instance pointer.
487 @param ControllerHandle Handle of device to stop driver on
488 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
489 children is zero stop the entire bus driver.
490 @param ChildHandleBuffer List of Child Handles to Stop.
491
492 @retval EFI_SUCCESS This driver is removed ControllerHandle
493 @retval other This driver was not removed from this device
494
495 **/
496 EFI_STATUS
497 EFIAPI
498 ConSplitterConInDriverBindingStop (
499 IN EFI_DRIVER_BINDING_PROTOCOL *This,
500 IN EFI_HANDLE ControllerHandle,
501 IN UINTN NumberOfChildren,
502 IN EFI_HANDLE *ChildHandleBuffer
503 )
504 ;
505
506 /**
507 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing
508 Simple Pointer protocol.
509
510 @param This Protocol instance pointer.
511 @param ControllerHandle Handle of device to stop driver on
512 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
513 children is zero stop the entire bus driver.
514 @param ChildHandleBuffer List of Child Handles to Stop.
515
516 @retval EFI_SUCCESS This driver is removed ControllerHandle
517 @retval other This driver was not removed from this device
518
519 **/
520 EFI_STATUS
521 EFIAPI
522 ConSplitterSimplePointerDriverBindingStop (
523 IN EFI_DRIVER_BINDING_PROTOCOL *This,
524 IN EFI_HANDLE ControllerHandle,
525 IN UINTN NumberOfChildren,
526 IN EFI_HANDLE *ChildHandleBuffer
527 )
528 ;
529
530 /**
531 Stop Console Out ConSplitter on ControllerHandle by closing Console Out Devcice GUID.
532
533 @param This Protocol instance pointer.
534 @param ControllerHandle Handle of device to stop driver on
535 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
536 children is zero stop the entire bus driver.
537 @param ChildHandleBuffer List of Child Handles to Stop.
538
539 @retval EFI_SUCCESS This driver is removed ControllerHandle
540 @retval other This driver was not removed from this device
541
542 **/
543 EFI_STATUS
544 EFIAPI
545 ConSplitterConOutDriverBindingStop (
546 IN EFI_DRIVER_BINDING_PROTOCOL *This,
547 IN EFI_HANDLE ControllerHandle,
548 IN UINTN NumberOfChildren,
549 IN EFI_HANDLE *ChildHandleBuffer
550 )
551 ;
552
553 /**
554 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.
555
556 @param This Protocol instance pointer.
557 @param ControllerHandle Handle of device to stop driver on
558 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
559 children is zero stop the entire bus driver.
560 @param ChildHandleBuffer List of Child Handles to Stop.
561
562 @retval EFI_SUCCESS This driver is removed ControllerHandle
563 @retval other This driver was not removed from this device
564
565 **/
566 EFI_STATUS
567 EFIAPI
568 ConSplitterStdErrDriverBindingStop (
569 IN EFI_DRIVER_BINDING_PROTOCOL *This,
570 IN EFI_HANDLE ControllerHandle,
571 IN UINTN NumberOfChildren,
572 IN EFI_HANDLE *ChildHandleBuffer
573 )
574 ;
575
576
577 /**
578 Test to see if Absolute Pointer protocol could be supported on the ControllerHandle.
579
580 @param This Protocol instance pointer.
581 @param ControllerHandle Handle of device to test.
582 @param RemainingDevicePath Optional parameter use to pick a specific child
583 device to start.
584
585 @retval EFI_SUCCESS This driver supports this device.
586 @retval other This driver does not support this device.
587
588 **/
589 EFI_STATUS
590 EFIAPI
591 ConSplitterAbsolutePointerDriverBindingSupported (
592 IN EFI_DRIVER_BINDING_PROTOCOL *This,
593 IN EFI_HANDLE ControllerHandle,
594 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
595 )
596 ;
597
598 /**
599 Start Absolute Pointer Consplitter on device handle.
600
601 @param This Protocol instance pointer.
602 @param ControllerHandle Handle of device to bind driver to.
603 @param RemainingDevicePath Optional parameter use to pick a specific child
604 device to start.
605
606 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.
607 @retval other Absolute Pointer Consplitter does not support this device.
608
609 **/
610 EFI_STATUS
611 EFIAPI
612 ConSplitterAbsolutePointerDriverBindingStart (
613 IN EFI_DRIVER_BINDING_PROTOCOL *This,
614 IN EFI_HANDLE ControllerHandle,
615 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
616 )
617 ;
618
619 /**
620 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing
621 Absolute Pointer protocol.
622
623 @param This Protocol instance pointer.
624 @param ControllerHandle Handle of device to stop driver on
625 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
626 children is zero stop the entire bus driver.
627 @param ChildHandleBuffer List of Child Handles to Stop.
628
629 @retval EFI_SUCCESS This driver is removed ControllerHandle
630 @retval other This driver was not removed from this device
631
632 **/
633 EFI_STATUS
634 EFIAPI
635 ConSplitterAbsolutePointerDriverBindingStop (
636 IN EFI_DRIVER_BINDING_PROTOCOL *This,
637 IN EFI_HANDLE ControllerHandle,
638 IN UINTN NumberOfChildren,
639 IN EFI_HANDLE *ChildHandleBuffer
640 )
641 ;
642
643 /**
644 Add Absolute Pointer Device in Consplitter Absolute Pointer list.
645
646 @param Private Text In Splitter pointer.
647 @param AbsolutePointer Absolute Pointer protocol pointer.
648
649 @retval EFI_SUCCESS Absolute Pointer Device added successfully.
650 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
651
652 **/
653 EFI_STATUS
654 ConSplitterAbsolutePointerAddDevice (
655 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
656 IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer
657 )
658 ;
659
660 /**
661 Remove Absolute Pointer Device in Consplitter Absolute Pointer list.
662
663 @param Private Text In Splitter pointer.
664 @param AbsolutePointer Absolute Pointer protocol pointer.
665
666 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.
667 @retval EFI_NOT_FOUND No Absolute Pointer Device found.
668
669 **/
670 EFI_STATUS
671 ConSplitterAbsolutePointerDeleteDevice (
672 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
673 IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer
674 )
675 ;
676
677 //
678 // Absolute Pointer protocol interfaces
679 //
680
681
682 /**
683 Resets the pointer device hardware.
684
685 @param This Protocol instance pointer.
686 @param ExtendedVerification Driver may perform diagnostics on reset.
687
688 @retval EFI_SUCCESS The device was reset.
689 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
690 could not be reset.
691
692 **/
693 EFI_STATUS
694 EFIAPI
695 ConSplitterAbsolutePointerReset (
696 IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
697 IN BOOLEAN ExtendedVerification
698 )
699 ;
700
701
702 /**
703 Retrieves the current state of a pointer device.
704
705 @param This Protocol instance pointer.
706 @param State A pointer to the state information on the
707 pointer device.
708
709 @retval EFI_SUCCESS The state of the pointer device was returned in
710 State..
711 @retval EFI_NOT_READY The state of the pointer device has not changed
712 since the last call to GetState().
713 @retval EFI_DEVICE_ERROR A device error occurred while attempting to
714 retrieve the pointer device's current state.
715
716 **/
717 EFI_STATUS
718 EFIAPI
719 ConSplitterAbsolutePointerGetState (
720 IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
721 IN OUT EFI_ABSOLUTE_POINTER_STATE *State
722 )
723 ;
724
725 /**
726 This event agregates all the events of the pointer devices in the splitter.
727 If the ConIn is password locked then return.
728 If any events of physical pointer devices are signaled, signal the pointer
729 splitter event. This will cause the calling code to call
730 ConSplitterAbsolutePointerGetState ().
731
732 @param Event The Event assoicated with callback.
733 @param Context Context registered when Event was created.
734
735 @return None
736
737 **/
738 VOID
739 EFIAPI
740 ConSplitterAbsolutePointerWaitForInput (
741 IN EFI_EVENT Event,
742 IN VOID *Context
743 )
744 ;
745
746 /**
747 Retrieves a Unicode string that is the user readable name of the driver.
748
749 This function retrieves the user readable name of a driver in the form of a
750 Unicode string. If the driver specified by This has a user readable name in
751 the language specified by Language, then a pointer to the driver name is
752 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
753 by This does not support the language specified by Language,
754 then EFI_UNSUPPORTED is returned.
755
756 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
757 EFI_COMPONENT_NAME_PROTOCOL instance.
758
759 @param Language[in] A pointer to a Null-terminated ASCII string
760 array indicating the language. This is the
761 language of the driver name that the caller is
762 requesting, and it must match one of the
763 languages specified in SupportedLanguages. The
764 number of languages supported by a driver is up
765 to the driver writer. Language is specified
766 in RFC 3066 or ISO 639-2 language code format.
767
768 @param DriverName[out] A pointer to the Unicode string to return.
769 This Unicode string is the name of the
770 driver specified by This in the language
771 specified by Language.
772
773 @retval EFI_SUCCESS The Unicode string for the Driver specified by
774 This and the language specified by Language was
775 returned in DriverName.
776
777 @retval EFI_INVALID_PARAMETER Language is NULL.
778
779 @retval EFI_INVALID_PARAMETER DriverName is NULL.
780
781 @retval EFI_UNSUPPORTED The driver specified by This does not support
782 the language specified by Language.
783
784 **/
785 EFI_STATUS
786 EFIAPI
787 ConSplitterComponentNameGetDriverName (
788 IN EFI_COMPONENT_NAME_PROTOCOL *This,
789 IN CHAR8 *Language,
790 OUT CHAR16 **DriverName
791 );
792
793
794 /**
795 Retrieves a Unicode string that is the user readable name of the controller
796 that is being managed by a driver.
797
798 This function retrieves the user readable name of the controller specified by
799 ControllerHandle and ChildHandle in the form of a Unicode string. If the
800 driver specified by This has a user readable name in the language specified by
801 Language, then a pointer to the controller name is returned in ControllerName,
802 and EFI_SUCCESS is returned. If the driver specified by This is not currently
803 managing the controller specified by ControllerHandle and ChildHandle,
804 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
805 support the language specified by Language, then EFI_UNSUPPORTED is returned.
806
807 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
808 EFI_COMPONENT_NAME_PROTOCOL instance.
809
810 @param ControllerHandle[in] The handle of a controller that the driver
811 specified by This is managing. This handle
812 specifies the controller whose name is to be
813 returned.
814
815 @param ChildHandle[in] The handle of the child controller to retrieve
816 the name of. This is an optional parameter that
817 may be NULL. It will be NULL for device
818 drivers. It will also be NULL for a bus drivers
819 that wish to retrieve the name of the bus
820 controller. It will not be NULL for a bus
821 driver that wishes to retrieve the name of a
822 child controller.
823
824 @param Language[in] A pointer to a Null-terminated ASCII string
825 array indicating the language. This is the
826 language of the driver name that the caller is
827 requesting, and it must match one of the
828 languages specified in SupportedLanguages. The
829 number of languages supported by a driver is up
830 to the driver writer. Language is specified in
831 RFC 3066 or ISO 639-2 language code format.
832
833 @param ControllerName[out] A pointer to the Unicode string to return.
834 This Unicode string is the name of the
835 controller specified by ControllerHandle and
836 ChildHandle in the language specified by
837 Language from the point of view of the driver
838 specified by This.
839
840 @retval EFI_SUCCESS The Unicode string for the user readable name in
841 the language specified by Language for the
842 driver specified by This was returned in
843 DriverName.
844
845 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
846
847 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
848 EFI_HANDLE.
849
850 @retval EFI_INVALID_PARAMETER Language is NULL.
851
852 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
853
854 @retval EFI_UNSUPPORTED The driver specified by This is not currently
855 managing the controller specified by
856 ControllerHandle and ChildHandle.
857
858 @retval EFI_UNSUPPORTED The driver specified by This does not support
859 the language specified by Language.
860
861 **/
862 EFI_STATUS
863 EFIAPI
864 ConSplitterConInComponentNameGetControllerName (
865 IN EFI_COMPONENT_NAME_PROTOCOL *This,
866 IN EFI_HANDLE ControllerHandle,
867 IN EFI_HANDLE ChildHandle OPTIONAL,
868 IN CHAR8 *Language,
869 OUT CHAR16 **ControllerName
870 );
871
872
873 /**
874 Retrieves a Unicode string that is the user readable name of the controller
875 that is being managed by a driver.
876
877 This function retrieves the user readable name of the controller specified by
878 ControllerHandle and ChildHandle in the form of a Unicode string. If the
879 driver specified by This has a user readable name in the language specified by
880 Language, then a pointer to the controller name is returned in ControllerName,
881 and EFI_SUCCESS is returned. If the driver specified by This is not currently
882 managing the controller specified by ControllerHandle and ChildHandle,
883 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
884 support the language specified by Language, then EFI_UNSUPPORTED is returned.
885
886 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
887 EFI_COMPONENT_NAME_PROTOCOL instance.
888
889 @param ControllerHandle[in] The handle of a controller that the driver
890 specified by This is managing. This handle
891 specifies the controller whose name is to be
892 returned.
893
894 @param ChildHandle[in] The handle of the child controller to retrieve
895 the name of. This is an optional parameter that
896 may be NULL. It will be NULL for device
897 drivers. It will also be NULL for a bus drivers
898 that wish to retrieve the name of the bus
899 controller. It will not be NULL for a bus
900 driver that wishes to retrieve the name of a
901 child controller.
902
903 @param Language[in] A pointer to a Null-terminated ASCII string
904 array indicating the language. This is the
905 language of the driver name that the caller is
906 requesting, and it must match one of the
907 languages specified in SupportedLanguages. The
908 number of languages supported by a driver is up
909 to the driver writer. Language is specified in
910 RFC 3066 or ISO 639-2 language code format.
911
912 @param ControllerName[out] A pointer to the Unicode string to return.
913 This Unicode string is the name of the
914 controller specified by ControllerHandle and
915 ChildHandle in the language specified by
916 Language from the point of view of the driver
917 specified by This.
918
919 @retval EFI_SUCCESS The Unicode string for the user readable name in
920 the language specified by Language for the
921 driver specified by This was returned in
922 DriverName.
923
924 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
925
926 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
927 EFI_HANDLE.
928
929 @retval EFI_INVALID_PARAMETER Language is NULL.
930
931 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
932
933 @retval EFI_UNSUPPORTED The driver specified by This is not currently
934 managing the controller specified by
935 ControllerHandle and ChildHandle.
936
937 @retval EFI_UNSUPPORTED The driver specified by This does not support
938 the language specified by Language.
939
940 **/
941 EFI_STATUS
942 EFIAPI
943 ConSplitterSimplePointerComponentNameGetControllerName (
944 IN EFI_COMPONENT_NAME_PROTOCOL *This,
945 IN EFI_HANDLE ControllerHandle,
946 IN EFI_HANDLE ChildHandle OPTIONAL,
947 IN CHAR8 *Language,
948 OUT CHAR16 **ControllerName
949 );
950
951 /**
952 Retrieves a Unicode string that is the user readable name of the controller
953 that is being managed by an EFI Driver.
954
955 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
956 instance.
957 @param ControllerHandle The handle of a controller that the driver
958 specified by This is managing. This handle
959 specifies the controller whose name is to be
960 returned.
961 @param ChildHandle The handle of the child controller to retrieve the
962 name of. This is an optional parameter that may
963 be NULL. It will be NULL for device drivers. It
964 will also be NULL for a bus drivers that wish to
965 retrieve the name of the bus controller. It will
966 not be NULL for a bus driver that wishes to
967 retrieve the name of a child controller.
968 @param Language A pointer to RFC3066 language identifier. This is
969 the language of the controller name that that the
970 caller is requesting, and it must match one of the
971 languages specified in SupportedLanguages. The
972 number of languages supported by a driver is up to
973 the driver writer.
974 @param ControllerName A pointer to the Unicode string to return. This
975 Unicode string is the name of the controller
976 specified by ControllerHandle and ChildHandle in
977 the language specified by Language from the point
978 of view of the driver specified by This.
979
980 @retval EFI_SUCCESS The Unicode string for the user readable name in
981 the language specified by Language for the driver
982 specified by This was returned in DriverName.
983 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
984 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
985 EFI_HANDLE.
986 @retval EFI_INVALID_PARAMETER Language is NULL.
987 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
988 @retval EFI_UNSUPPORTED The driver specified by This is not currently
989 managing the controller specified by
990 ControllerHandle and ChildHandle.
991 @retval EFI_UNSUPPORTED The driver specified by This does not support the
992 language specified by Language.
993
994 **/
995 EFI_STATUS
996 EFIAPI
997 ConSplitterAbsolutePointerComponentNameGetControllerName (
998 IN EFI_COMPONENT_NAME_PROTOCOL *This,
999 IN EFI_HANDLE ControllerHandle,
1000 IN EFI_HANDLE ChildHandle OPTIONAL,
1001 IN CHAR8 *Language,
1002 OUT CHAR16 **ControllerName
1003 )
1004 ;
1005
1006 /**
1007 Retrieves a Unicode string that is the user readable name of the controller
1008 that is being managed by a driver.
1009
1010 This function retrieves the user readable name of the controller specified by
1011 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1012 driver specified by This has a user readable name in the language specified by
1013 Language, then a pointer to the controller name is returned in ControllerName,
1014 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1015 managing the controller specified by ControllerHandle and ChildHandle,
1016 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1017 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1018
1019 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1020 EFI_COMPONENT_NAME_PROTOCOL instance.
1021
1022 @param ControllerHandle[in] The handle of a controller that the driver
1023 specified by This is managing. This handle
1024 specifies the controller whose name is to be
1025 returned.
1026
1027 @param ChildHandle[in] The handle of the child controller to retrieve
1028 the name of. This is an optional parameter that
1029 may be NULL. It will be NULL for device
1030 drivers. It will also be NULL for a bus drivers
1031 that wish to retrieve the name of the bus
1032 controller. It will not be NULL for a bus
1033 driver that wishes to retrieve the name of a
1034 child controller.
1035
1036 @param Language[in] A pointer to a Null-terminated ASCII string
1037 array indicating the language. This is the
1038 language of the driver name that the caller is
1039 requesting, and it must match one of the
1040 languages specified in SupportedLanguages. The
1041 number of languages supported by a driver is up
1042 to the driver writer. Language is specified in
1043 RFC 3066 or ISO 639-2 language code format.
1044
1045 @param ControllerName[out] A pointer to the Unicode string to return.
1046 This Unicode string is the name of the
1047 controller specified by ControllerHandle and
1048 ChildHandle in the language specified by
1049 Language from the point of view of the driver
1050 specified by This.
1051
1052 @retval EFI_SUCCESS The Unicode string for the user readable name in
1053 the language specified by Language for the
1054 driver specified by This was returned in
1055 DriverName.
1056
1057 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
1058
1059 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1060 EFI_HANDLE.
1061
1062 @retval EFI_INVALID_PARAMETER Language is NULL.
1063
1064 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1065
1066 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1067 managing the controller specified by
1068 ControllerHandle and ChildHandle.
1069
1070 @retval EFI_UNSUPPORTED The driver specified by This does not support
1071 the language specified by Language.
1072
1073 **/
1074 EFI_STATUS
1075 EFIAPI
1076 ConSplitterConOutComponentNameGetControllerName (
1077 IN EFI_COMPONENT_NAME_PROTOCOL *This,
1078 IN EFI_HANDLE ControllerHandle,
1079 IN EFI_HANDLE ChildHandle OPTIONAL,
1080 IN CHAR8 *Language,
1081 OUT CHAR16 **ControllerName
1082 );
1083
1084
1085 /**
1086 Retrieves a Unicode string that is the user readable name of the controller
1087 that is being managed by a driver.
1088
1089 This function retrieves the user readable name of the controller specified by
1090 ControllerHandle and ChildHandle in the form of a Unicode string. If the
1091 driver specified by This has a user readable name in the language specified by
1092 Language, then a pointer to the controller name is returned in ControllerName,
1093 and EFI_SUCCESS is returned. If the driver specified by This is not currently
1094 managing the controller specified by ControllerHandle and ChildHandle,
1095 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
1096 support the language specified by Language, then EFI_UNSUPPORTED is returned.
1097
1098 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
1099 EFI_COMPONENT_NAME_PROTOCOL instance.
1100
1101 @param ControllerHandle[in] The handle of a controller that the driver
1102 specified by This is managing. This handle
1103 specifies the controller whose name is to be
1104 returned.
1105
1106 @param ChildHandle[in] The handle of the child controller to retrieve
1107 the name of. This is an optional parameter that
1108 may be NULL. It will be NULL for device
1109 drivers. It will also be NULL for a bus drivers
1110 that wish to retrieve the name of the bus
1111 controller. It will not be NULL for a bus
1112 driver that wishes to retrieve the name of a
1113 child controller.
1114
1115 @param Language[in] A pointer to a Null-terminated ASCII string
1116 array indicating the language. This is the
1117 language of the driver name that the caller is
1118 requesting, and it must match one of the
1119 languages specified in SupportedLanguages. The
1120 number of languages supported by a driver is up
1121 to the driver writer. Language is specified in
1122 RFC 3066 or ISO 639-2 language code format.
1123
1124 @param ControllerName[out] A pointer to the Unicode string to return.
1125 This Unicode string is the name of the
1126 controller specified by ControllerHandle and
1127 ChildHandle in the language specified by
1128 Language from the point of view of the driver
1129 specified by This.
1130
1131 @retval EFI_SUCCESS The Unicode string for the user readable name in
1132 the language specified by Language for the
1133 driver specified by This was returned in
1134 DriverName.
1135
1136 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
1137
1138 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
1139 EFI_HANDLE.
1140
1141 @retval EFI_INVALID_PARAMETER Language is NULL.
1142
1143 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
1144
1145 @retval EFI_UNSUPPORTED The driver specified by This is not currently
1146 managing the controller specified by
1147 ControllerHandle and ChildHandle.
1148
1149 @retval EFI_UNSUPPORTED The driver specified by This does not support
1150 the language specified by Language.
1151
1152 **/
1153 EFI_STATUS
1154 EFIAPI
1155 ConSplitterStdErrComponentNameGetControllerName (
1156 IN EFI_COMPONENT_NAME_PROTOCOL *This,
1157 IN EFI_HANDLE ControllerHandle,
1158 IN EFI_HANDLE ChildHandle OPTIONAL,
1159 IN CHAR8 *Language,
1160 OUT CHAR16 **ControllerName
1161 );
1162
1163
1164 //
1165 // TextIn Constructor/Destructor functions
1166 //
1167
1168 /**
1169 Add Text Input Device in Consplitter Text Input list.
1170
1171 @param Private Text In Splitter pointer.
1172 @param TextIn Simple Text Input protocol pointer.
1173
1174 @retval EFI_SUCCESS Text Input Device added successfully.
1175 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1176
1177 **/
1178 EFI_STATUS
1179 ConSplitterTextInAddDevice (
1180 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1181 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
1182 )
1183 ;
1184
1185 /**
1186 Remove Simple Text Device in Consplitter Absolute Pointer list.
1187
1188 @param Private Text In Splitter pointer.
1189 @param TextIn Simple Text protocol pointer.
1190
1191 @retval EFI_SUCCESS Simple Text Device removed successfully.
1192 @retval EFI_NOT_FOUND No Simple Text Device found.
1193
1194 **/
1195 EFI_STATUS
1196 ConSplitterTextInDeleteDevice (
1197 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1198 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
1199 )
1200 ;
1201
1202 //
1203 // SimplePointer Constuctor/Destructor functions
1204 //
1205
1206 /**
1207 Add Simple Pointer Device in Consplitter Simple Pointer list.
1208
1209 @param Private Text In Splitter pointer.
1210 @param SimplePointer Simple Pointer protocol pointer.
1211
1212 @retval EFI_SUCCESS Simple Pointer Device added successfully.
1213 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1214
1215 **/
1216 EFI_STATUS
1217 ConSplitterSimplePointerAddDevice (
1218 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1219 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
1220 )
1221 ;
1222
1223 /**
1224 Remove Simple Pointer Device in Consplitter Absolute Pointer list.
1225
1226 @param Private Text In Splitter pointer.
1227 @param SimplePointer Simple Pointer protocol pointer.
1228
1229 @retval EFI_SUCCESS Simple Pointer Device removed successfully.
1230 @retval EFI_NOT_FOUND No Simple Pointer Device found.
1231
1232 **/
1233 EFI_STATUS
1234 ConSplitterSimplePointerDeleteDevice (
1235 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1236 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
1237 )
1238 ;
1239
1240 //
1241 // TextOut Constuctor/Destructor functions
1242 //
1243
1244 /**
1245 Add Text Output Device in Consplitter Text Output list.
1246
1247 @param Private Text Out Splitter pointer.
1248 @param TextOut Simple Text Output protocol pointer.
1249 @param GraphicsOutput Graphics Output protocol pointer.
1250 @param UgaDraw UGA Draw protocol pointer.
1251
1252 @retval EFI_SUCCESS Text Output Device added successfully.
1253 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1254
1255 **/
1256 EFI_STATUS
1257 ConSplitterTextOutAddDevice (
1258 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1259 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut,
1260 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
1261 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
1262 )
1263 ;
1264
1265 /**
1266 Remove Text Out Device in Consplitter Text Out list.
1267
1268 @param Private Text Out Splitter pointer.
1269 @param TextOut Simple Text Output Pointer protocol pointer.
1270
1271 @retval EFI_SUCCESS Text Out Device removed successfully.
1272 @retval EFI_NOT_FOUND No Text Out Device found.
1273
1274 **/
1275 EFI_STATUS
1276 ConSplitterTextOutDeleteDevice (
1277 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1278 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
1279 )
1280 ;
1281
1282 //
1283 // TextIn I/O Functions
1284 //
1285
1286 /**
1287 Reset the input device and optionaly run diagnostics
1288
1289 @param This Protocol instance pointer.
1290 @param ExtendedVerification Driver may perform diagnostics on reset.
1291
1292 @retval EFI_SUCCESS The device was reset.
1293 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1294 not be reset.
1295
1296 **/
1297 EFI_STATUS
1298 EFIAPI
1299 ConSplitterTextInReset (
1300 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
1301 IN BOOLEAN ExtendedVerification
1302 )
1303 ;
1304
1305 /**
1306 Reads the next keystroke from the input device. The WaitForKey Event can
1307 be used to test for existance of a keystroke via WaitForEvent () call.
1308 If the ConIn is password locked make it look like no keystroke is availible
1309
1310 @param This Protocol instance pointer.
1311 @param Key Driver may perform diagnostics on reset.
1312
1313 @retval EFI_SUCCESS The keystroke information was returned.
1314 @retval EFI_NOT_READY There was no keystroke data availiable.
1315 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1316 to hardware errors.
1317
1318 **/
1319 EFI_STATUS
1320 EFIAPI
1321 ConSplitterTextInReadKeyStroke (
1322 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
1323 OUT EFI_INPUT_KEY *Key
1324 )
1325 ;
1326
1327 /**
1328 Add Text Input Ex Device in Consplitter Text Input Ex list.
1329
1330 @param Private Text In Splitter pointer.
1331 @param TextInEx Simple Text Ex Input protocol pointer.
1332
1333 @retval EFI_SUCCESS Text Input Ex Device added successfully.
1334 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1335
1336 **/
1337 EFI_STATUS
1338 ConSplitterTextInExAddDevice (
1339 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1340 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx
1341 )
1342 ;
1343
1344 /**
1345 Remove Simple Text Ex Device in Consplitter Absolute Pointer list.
1346
1347 @param Private Text In Splitter pointer.
1348 @param TextInEx Simple Text Ex protocol pointer.
1349
1350 @retval EFI_SUCCESS Simple Text Ex Device removed successfully.
1351 @retval EFI_NOT_FOUND No Simple Text Ex Device found.
1352
1353 **/
1354 EFI_STATUS
1355 ConSplitterTextInExDeleteDevice (
1356 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1357 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx
1358 )
1359 ;
1360
1361 //
1362 // Simple Text Input Ex protocol function prototypes
1363 //
1364
1365
1366 /**
1367 Reset the input device and optionaly run diagnostics
1368
1369 @param This Protocol instance pointer.
1370 @param ExtendedVerification Driver may perform diagnostics on reset.
1371
1372 @retval EFI_SUCCESS The device was reset.
1373 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1374 not be reset.
1375
1376 **/
1377 EFI_STATUS
1378 EFIAPI
1379 ConSplitterTextInResetEx (
1380 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
1381 IN BOOLEAN ExtendedVerification
1382 )
1383 ;
1384
1385
1386 /**
1387 Reads the next keystroke from the input device. The WaitForKey Event can
1388 be used to test for existance of a keystroke via WaitForEvent () call.
1389
1390 @param This Protocol instance pointer.
1391 @param KeyData A pointer to a buffer that is filled in with the
1392 keystroke state data for the key that was
1393 pressed.
1394
1395 @retval EFI_SUCCESS The keystroke information was returned.
1396 @retval EFI_NOT_READY There was no keystroke data availiable.
1397 @retval EFI_DEVICE_ERROR The keystroke information was not returned due
1398 to hardware errors.
1399 @retval EFI_INVALID_PARAMETER KeyData is NULL.
1400
1401 **/
1402 EFI_STATUS
1403 EFIAPI
1404 ConSplitterTextInReadKeyStrokeEx (
1405 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
1406 OUT EFI_KEY_DATA *KeyData
1407 )
1408 ;
1409
1410
1411 /**
1412 Set certain state for the input device.
1413
1414 @param This Protocol instance pointer.
1415 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the
1416 state for the input device.
1417
1418 @retval EFI_SUCCESS The device state was set successfully.
1419 @retval EFI_DEVICE_ERROR The device is not functioning correctly and
1420 could not have the setting adjusted.
1421 @retval EFI_UNSUPPORTED The device does not have the ability to set its
1422 state.
1423 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.
1424
1425 **/
1426 EFI_STATUS
1427 EFIAPI
1428 ConSplitterTextInSetState (
1429 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
1430 IN EFI_KEY_TOGGLE_STATE *KeyToggleState
1431 )
1432 ;
1433
1434
1435 /**
1436 Register a notification function for a particular keystroke for the input device.
1437
1438 @param This Protocol instance pointer.
1439 @param KeyData A pointer to a buffer that is filled in with the
1440 keystroke information data for the key that was
1441 pressed.
1442 @param KeyNotificationFunction Points to the function to be called when the key
1443 sequence is typed specified by KeyData.
1444 @param NotifyHandle Points to the unique handle assigned to the
1445 registered notification.
1446
1447 @retval EFI_SUCCESS The notification function was registered
1448 successfully.
1449 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data
1450 structures.
1451 @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.
1452
1453 **/
1454 EFI_STATUS
1455 EFIAPI
1456 ConSplitterTextInRegisterKeyNotify (
1457 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
1458 IN EFI_KEY_DATA *KeyData,
1459 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
1460 OUT EFI_HANDLE *NotifyHandle
1461 )
1462 ;
1463
1464
1465 /**
1466 Remove a registered notification function from a particular keystroke.
1467
1468 @param This Protocol instance pointer.
1469 @param NotificationHandle The handle of the notification function being
1470 unregistered.
1471
1472 @retval EFI_SUCCESS The notification function was unregistered
1473 successfully.
1474 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.
1475 @retval EFI_NOT_FOUND Can not find the matching entry in database.
1476
1477 **/
1478 EFI_STATUS
1479 EFIAPI
1480 ConSplitterTextInUnregisterKeyNotify (
1481 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
1482 IN EFI_HANDLE NotificationHandle
1483 )
1484 ;
1485
1486 /**
1487 This event agregates all the events of the ConIn devices in the spliter.
1488 If the ConIn is password locked then return.
1489 If any events of physical ConIn devices are signaled, signal the ConIn
1490 spliter event. This will cause the calling code to call
1491 ConSplitterTextInReadKeyStroke ().
1492
1493 @param Event The Event assoicated with callback.
1494 @param Context Context registered when Event was created.
1495
1496 @return None
1497
1498 **/
1499 VOID
1500 EFIAPI
1501 ConSplitterTextInWaitForKey (
1502 IN EFI_EVENT Event,
1503 IN VOID *Context
1504 )
1505 ;
1506 /**
1507 Return TRUE if StdIn is locked. The ConIn device on the virtual handle is
1508 the only device locked.
1509
1510 NONE
1511
1512 @retval TRUE StdIn locked
1513 @retval FALSE StdIn working normally
1514
1515 **/
1516 BOOLEAN
1517 ConSpliterConssoleControlStdInLocked (
1518 VOID
1519 )
1520 ;
1521 /**
1522 This timer event will fire when StdIn is locked. It will check the key
1523 sequence on StdIn to see if it matches the password. Any error in the
1524 password will cause the check to reset. As long a mConIn.PasswordEnabled is
1525 TRUE the StdIn splitter will not report any input.
1526
1527 @param Event The Event this notify function registered to.
1528 @param Context Pointer to the context data registerd to the
1529 Event.
1530
1531 @return None
1532
1533 **/
1534 VOID
1535 EFIAPI
1536 ConSpliterConsoleControlLockStdInEvent (
1537 IN EFI_EVENT Event,
1538 IN VOID *Context
1539 )
1540 ;
1541
1542 /**
1543 If Password is NULL unlock the password state variable and set the event
1544 timer. If the Password is too big return an error. If the Password is valid
1545 Copy the Password and enable state variable and then arm the periodic timer
1546
1547 @param This Console Control protocol pointer.
1548 @param Password The password input.
1549
1550 @retval EFI_SUCCESS Lock the StdIn device
1551 @retval EFI_INVALID_PARAMETER Password is NULL
1552 @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails
1553
1554 **/
1555 EFI_STATUS
1556 EFIAPI
1557 ConSpliterConsoleControlLockStdIn (
1558 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
1559 IN CHAR16 *Password
1560 )
1561 ;
1562
1563 /**
1564 Reads the next keystroke from the input device. The WaitForKey Event can
1565 be used to test for existance of a keystroke via WaitForEvent () call.
1566
1567 @param Private Protocol instance pointer.
1568 @param Key Driver may perform diagnostics on reset.
1569
1570 @retval EFI_SUCCESS The keystroke information was returned.
1571 @retval EFI_NOT_READY There was no keystroke data availiable.
1572 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1573 to hardware errors.
1574
1575 **/
1576 EFI_STATUS
1577 EFIAPI
1578 ConSplitterTextInPrivateReadKeyStroke (
1579 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
1580 OUT EFI_INPUT_KEY *Key
1581 )
1582 ;
1583
1584 /**
1585 Reset the input device and optionaly run diagnostics
1586
1587 @param This Protocol instance pointer.
1588 @param ExtendedVerification Driver may perform diagnostics on reset.
1589
1590 @retval EFI_SUCCESS The device was reset.
1591 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
1592 not be reset.
1593
1594 **/
1595 EFI_STATUS
1596 EFIAPI
1597 ConSplitterSimplePointerReset (
1598 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
1599 IN BOOLEAN ExtendedVerification
1600 )
1601 ;
1602
1603 /**
1604 Reads the next keystroke from the input device. The WaitForKey Event can
1605 be used to test for existance of a keystroke via WaitForEvent () call.
1606 If the ConIn is password locked make it look like no keystroke is availible
1607
1608 @param This A pointer to protocol instance.
1609 @param State A pointer to state information on the pointer device
1610
1611 @retval EFI_SUCCESS The keystroke information was returned in State.
1612 @retval EFI_NOT_READY There was no keystroke data availiable.
1613 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due
1614 to hardware errors.
1615
1616 **/
1617 EFI_STATUS
1618 EFIAPI
1619 ConSplitterSimplePointerGetState (
1620 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
1621 IN OUT EFI_SIMPLE_POINTER_STATE *State
1622 )
1623 ;
1624
1625 /**
1626 This event agregates all the events of the ConIn devices in the spliter.
1627 If the ConIn is password locked then return.
1628 If any events of physical ConIn devices are signaled, signal the ConIn
1629 spliter event. This will cause the calling code to call
1630 ConSplitterTextInReadKeyStroke ().
1631
1632 @param Event The Event assoicated with callback.
1633 @param Context Context registered when Event was created.
1634
1635 @return None
1636
1637 **/
1638 VOID
1639 EFIAPI
1640 ConSplitterSimplePointerWaitForInput (
1641 IN EFI_EVENT Event,
1642 IN VOID *Context
1643 )
1644 ;
1645
1646 //
1647 // TextOut I/O Functions
1648 //
1649
1650 /**
1651 Reset the text output device hardware and optionaly run diagnostics
1652
1653 @param This Protocol instance pointer.
1654 @param ExtendedVerification Driver may perform more exhaustive verfication
1655 operation of the device during reset.
1656
1657 @retval EFI_SUCCESS The text output device was reset.
1658 @retval EFI_DEVICE_ERROR The text output device is not functioning
1659 correctly and could not be reset.
1660
1661 **/
1662 EFI_STATUS
1663 EFIAPI
1664 ConSplitterTextOutReset (
1665 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1666 IN BOOLEAN ExtendedVerification
1667 )
1668 ;
1669
1670 /**
1671 Write a Unicode string to the output device.
1672
1673 @param This Protocol instance pointer.
1674 @param WString The NULL-terminated Unicode string to be
1675 displayed on the output device(s). All output
1676 devices must also support the Unicode drawing
1677 defined in this file.
1678
1679 @retval EFI_SUCCESS The string was output to the device.
1680 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
1681 output the text.
1682 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
1683 defined text mode.
1684 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
1685 characters in the Unicode string could not be
1686 rendered and were skipped.
1687
1688 **/
1689 EFI_STATUS
1690 EFIAPI
1691 ConSplitterTextOutOutputString (
1692 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1693 IN CHAR16 *WString
1694 )
1695 ;
1696
1697 /**
1698 Verifies that all characters in a Unicode string can be output to the
1699 target device.
1700
1701 @param This Protocol instance pointer.
1702 @param WString The NULL-terminated Unicode string to be
1703 examined for the output device(s).
1704
1705 @retval EFI_SUCCESS The device(s) are capable of rendering the
1706 output string.
1707 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string
1708 cannot be rendered by one or more of the output
1709 devices mapped by the EFI handle.
1710
1711 **/
1712 EFI_STATUS
1713 EFIAPI
1714 ConSplitterTextOutTestString (
1715 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1716 IN CHAR16 *WString
1717 )
1718 ;
1719
1720 /**
1721 Returns information for an available text mode that the output device(s)
1722 supports.
1723
1724 @param This Protocol instance pointer.
1725 @param ModeNumber The mode number to return information on.
1726 @param Columns Returns the columns of the text output device
1727 for the requested ModeNumber.
1728 @param Rows Returns the rows of the text output device
1729 for the requested ModeNumber.
1730
1731 @retval EFI_SUCCESS The requested mode information was returned.
1732 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1733 the request.
1734 @retval EFI_UNSUPPORTED The mode number was not valid.
1735
1736 **/
1737 EFI_STATUS
1738 EFIAPI
1739 ConSplitterTextOutQueryMode (
1740 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1741 IN UINTN ModeNumber,
1742 OUT UINTN *Columns,
1743 OUT UINTN *Rows
1744 )
1745 ;
1746
1747 /**
1748 Sets the output device(s) to a specified mode.
1749
1750 @param This Protocol instance pointer.
1751 @param ModeNumber The mode number to set.
1752
1753 @retval EFI_SUCCESS The requested text mode was set.
1754 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1755 the request.
1756 @retval EFI_UNSUPPORTED The mode number was not valid.
1757
1758 **/
1759 EFI_STATUS
1760 EFIAPI
1761 ConSplitterTextOutSetMode (
1762 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1763 IN UINTN ModeNumber
1764 )
1765 ;
1766
1767 /**
1768 Sets the background and foreground colors for the OutputString () and
1769 ClearScreen () functions.
1770
1771 @param This Protocol instance pointer.
1772 @param Attribute The attribute to set. Bits 0..3 are the
1773 foreground color, and bits 4..6 are the
1774 background color. All other bits are undefined
1775 and must be zero. The valid Attributes are
1776 defined in this file.
1777
1778 @retval EFI_SUCCESS The attribute was set.
1779 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1780 the request.
1781 @retval EFI_UNSUPPORTED The attribute requested is not defined.
1782
1783 **/
1784 EFI_STATUS
1785 EFIAPI
1786 ConSplitterTextOutSetAttribute (
1787 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1788 IN UINTN Attribute
1789 )
1790 ;
1791
1792 /**
1793 Clears the output device(s) display to the currently selected background
1794 color.
1795
1796 @param This Protocol instance pointer.
1797
1798 @retval EFI_SUCCESS The operation completed successfully.
1799 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1800 the request.
1801 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1802
1803 **/
1804 EFI_STATUS
1805 EFIAPI
1806 ConSplitterTextOutClearScreen (
1807 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
1808 )
1809 ;
1810
1811 /**
1812 Sets the current coordinates of the cursor position
1813
1814 @param This Protocol instance pointer.
1815 @param Column The column position to set the cursor to. Must be
1816 greater than or equal to zero and less than the
1817 number of columns by QueryMode ().
1818 @param Row The row position to set the cursor to. Must be
1819 greater than or equal to zero and less than the
1820 number of rows by QueryMode ().
1821
1822 @retval EFI_SUCCESS The operation completed successfully.
1823 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1824 the request.
1825 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,
1826 or the cursor position is invalid for the
1827 current mode.
1828
1829 **/
1830 EFI_STATUS
1831 EFIAPI
1832 ConSplitterTextOutSetCursorPosition (
1833 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1834 IN UINTN Column,
1835 IN UINTN Row
1836 )
1837 ;
1838
1839
1840 /**
1841 Makes the cursor visible or invisible
1842
1843 @param This Protocol instance pointer.
1844 @param Visible If TRUE, the cursor is set to be visible. If
1845 FALSE, the cursor is set to be invisible.
1846
1847 @retval EFI_SUCCESS The operation completed successfully.
1848 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1849 the request, or the device does not support
1850 changing the cursor mode.
1851 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
1852
1853 **/
1854 EFI_STATUS
1855 EFIAPI
1856 ConSplitterTextOutEnableCursor (
1857 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1858 IN BOOLEAN Visible
1859 )
1860 ;
1861
1862 /**
1863 Take the passed in Buffer of size SizeOfCount and grow the buffer
1864 by MAX (CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT, MaxGrow) * SizeOfCount
1865 bytes. Copy the current data in Buffer to the new version of Buffer
1866 and free the old version of buffer.
1867
1868 @param SizeOfCount Size of element in array
1869 @param Count Current number of elements in array
1870 @param Buffer Bigger version of passed in Buffer with all the
1871 data
1872
1873 @retval EFI_SUCCESS Buffer size has grown
1874 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.
1875
1876 **/
1877 EFI_STATUS
1878 ConSplitterGrowBuffer (
1879 IN UINTN SizeOfCount,
1880 IN UINTN *Count,
1881 IN OUT VOID **Buffer
1882 )
1883 ;
1884
1885 /**
1886 Return the current video mode information. Also returns info about existence
1887 of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
1888 arguments are optional and only returned if a non NULL pointer is passed in.
1889
1890 @param This Protocol instance pointer.
1891 @param Mode Are we in text of grahics mode.
1892 @param GopExists TRUE if GOP Spliter has found a GOP/UGA device
1893 @param StdInLocked TRUE if StdIn device is keyboard locked
1894
1895 @retval EFI_SUCCESS Mode information returned.
1896 @retval EFI_INVALID_PARAMETER Invalid parameters.
1897
1898 **/
1899 EFI_STATUS
1900 EFIAPI
1901 ConSpliterConsoleControlGetMode (
1902 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
1903 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
1904 OUT BOOLEAN *GopExists,
1905 OUT BOOLEAN *StdInLocked
1906 )
1907 ;
1908
1909 /**
1910 Set the current mode to either text or graphics. Graphics is
1911 for Quiet Boot.
1912
1913 @param This Protocol instance pointer.
1914 @param Mode Mode to set the
1915
1916 @retval EFI_SUCCESS Mode information returned.
1917 @retval EFI_INVALID_PARAMETER Invalid parameter.
1918 @retval EFI_UNSUPPORTED Operation unsupported.
1919
1920 **/
1921 EFI_STATUS
1922 EFIAPI
1923 ConSpliterConsoleControlSetMode (
1924 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
1925 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
1926 )
1927 ;
1928
1929 /**
1930 Return the current video mode information.
1931
1932 @param This Protocol instance pointer.
1933 @param ModeNumber The mode number to return information on.
1934 @param SizeOfInfo A pointer to the size, in bytes, of the Info
1935 buffer.
1936 @param Info Caller allocated buffer that returns information
1937 about ModeNumber.
1938
1939 @retval EFI_SUCCESS Mode information returned.
1940 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
1941 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
1942 video mode.
1943 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
1944 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
1945
1946 **/
1947 EFI_STATUS
1948 EFIAPI
1949 ConSpliterGraphicsOutputQueryMode (
1950 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
1951 IN UINT32 ModeNumber,
1952 OUT UINTN *SizeOfInfo,
1953 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
1954 )
1955 ;
1956
1957 /**
1958 Graphics output protocol interface to set video mode.
1959
1960 @param This Protocol instance pointer.
1961 @param ModeNumber The mode number to be set.
1962
1963 @retval EFI_SUCCESS Graphics mode was changed.
1964 @retval EFI_DEVICE_ERROR The device had an error and could not complete
1965 the request.
1966 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
1967
1968 **/
1969 EFI_STATUS
1970 EFIAPI
1971 ConSpliterGraphicsOutputSetMode (
1972 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
1973 IN UINT32 ModeNumber
1974 )
1975 ;
1976
1977 /**
1978 The following table defines actions for BltOperations.
1979
1980 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
1981 directly to every pixel of the video display rectangle
1982 (DestinationX, DestinationY)
1983 (DestinationX + Width, DestinationY + Height).
1984 Only one pixel will be used from the BltBuffer. Delta is NOT used.
1985 EfiBltVideoToBltBuffer - Read data from the video display rectangle
1986 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
1987 the BltBuffer rectangle (DestinationX, DestinationY )
1988 (DestinationX + Width, DestinationY + Height). If DestinationX or
1989 DestinationY is not zero then Delta must be set to the length in bytes
1990 of a row in the BltBuffer.
1991 EfiBltBufferToVideo - Write data from the BltBuffer rectangle
1992 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
1993 video display rectangle (DestinationX, DestinationY)
1994 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
1995 not zero then Delta must be set to the length in bytes of a row in the
1996 BltBuffer.
1997 EfiBltVideoToVideo - Copy from the video display rectangle
1998 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
1999 to the video display rectangle (DestinationX, DestinationY)
2000 (DestinationX + Width, DestinationY + Height).
2001 The BltBuffer and Delta are not used in this mode.
2002
2003 @param This Protocol instance pointer.
2004 @param BltBuffer Buffer containing data to blit into video buffer.
2005 This buffer has a size of
2006 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
2007 @param BltOperation Operation to perform on BlitBuffer and video
2008 memory
2009 @param SourceX X coordinate of source for the BltBuffer.
2010 @param SourceY Y coordinate of source for the BltBuffer.
2011 @param DestinationX X coordinate of destination for the BltBuffer.
2012 @param DestinationY Y coordinate of destination for the BltBuffer.
2013 @param Width Width of rectangle in BltBuffer in pixels.
2014 @param Height Hight of rectangle in BltBuffer in pixels.
2015 @param Delta OPTIONAL.
2016
2017 @retval EFI_SUCCESS The Blt operation completed.
2018 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
2019 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
2020 buffer.
2021
2022 **/
2023 EFI_STATUS
2024 EFIAPI
2025 ConSpliterGraphicsOutputBlt (
2026 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
2027 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
2028 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
2029 IN UINTN SourceX,
2030 IN UINTN SourceY,
2031 IN UINTN DestinationX,
2032 IN UINTN DestinationY,
2033 IN UINTN Width,
2034 IN UINTN Height,
2035 IN UINTN Delta OPTIONAL
2036 )
2037 ;
2038
2039 /**
2040 Write data from the buffer to video display based on Graphics Output setting.
2041
2042 @param Private Consplitter Text Out pointer.
2043 @param GraphicsOutput Graphics Output protocol pointer.
2044 @param UgaDraw UGA Draw protocol pointer.
2045
2046 @retval EFI_UNSUPPORTED No graphics devcie available .
2047 @retval EFI_SUCCESS The Blt operation completed.
2048 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
2049 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
2050
2051
2052 **/
2053 EFI_STATUS
2054 DevNullGopSync (
2055 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
2056 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
2057 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
2058 )
2059 ;
2060
2061 /**
2062 Return the current video mode information.
2063
2064 @param This Protocol instance pointer.
2065 @param HorizontalResolution Current video horizontal resolution in pixels
2066 @param VerticalResolution Current video vertical resolution in pixels
2067 @param ColorDepth Current video color depth in bits per pixel
2068 @param RefreshRate Current video refresh rate in Hz.
2069
2070 @retval EFI_SUCCESS Mode information returned.
2071 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
2072 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
2073
2074 **/
2075 EFI_STATUS
2076 EFIAPI
2077 ConSpliterUgaDrawGetMode (
2078 IN EFI_UGA_DRAW_PROTOCOL *This,
2079 OUT UINT32 *HorizontalResolution,
2080 OUT UINT32 *VerticalResolution,
2081 OUT UINT32 *ColorDepth,
2082 OUT UINT32 *RefreshRate
2083 )
2084 ;
2085
2086 /**
2087 Return the current video mode information.
2088
2089 @param This Protocol instance pointer.
2090 @param HorizontalResolution Current video horizontal resolution in pixels
2091 @param VerticalResolution Current video vertical resolution in pixels
2092 @param ColorDepth Current video color depth in bits per pixel
2093 @param RefreshRate Current video refresh rate in Hz.
2094
2095 @retval EFI_SUCCESS Mode information returned.
2096 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
2097 @retval EFI_OUT_OF_RESOURCES Out of resources.
2098
2099 **/
2100 EFI_STATUS
2101 EFIAPI
2102 ConSpliterUgaDrawSetMode (
2103 IN EFI_UGA_DRAW_PROTOCOL *This,
2104 IN UINT32 HorizontalResolution,
2105 IN UINT32 VerticalResolution,
2106 IN UINT32 ColorDepth,
2107 IN UINT32 RefreshRate
2108 )
2109 ;
2110
2111 /**
2112 The following table defines actions for BltOperations.
2113
2114 EfiUgaVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
2115 directly to every pixel of the video display rectangle
2116 (DestinationX, DestinationY)
2117 (DestinationX + Width, DestinationY + Height).
2118 Only one pixel will be used from the BltBuffer. Delta is NOT used.
2119 EfiUgaVideoToBltBuffer - Read data from the video display rectangle
2120 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
2121 the BltBuffer rectangle (DestinationX, DestinationY )
2122 (DestinationX + Width, DestinationY + Height). If DestinationX or
2123 DestinationY is not zero then Delta must be set to the length in bytes
2124 of a row in the BltBuffer.
2125 EfiUgaBltBufferToVideo - Write data from the BltBuffer rectangle
2126 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
2127 video display rectangle (DestinationX, DestinationY)
2128 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
2129 not zero then Delta must be set to the length in bytes of a row in the
2130 BltBuffer.
2131 EfiUgaVideoToVideo - Copy from the video display rectangle
2132 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .
2133 to the video display rectangle (DestinationX, DestinationY)
2134 (DestinationX + Width, DestinationY + Height).
2135 The BltBuffer and Delta are not used in this mode.
2136
2137 @param This Protocol instance pointer.
2138 @param BltBuffer Buffer containing data to blit into video buffer.
2139 This buffer has a size of
2140 Width*Height*sizeof(EFI_UGA_PIXEL)
2141 @param BltOperation Operation to perform on BlitBuffer and video
2142 memory
2143 @param SourceX X coordinate of source for the BltBuffer.
2144 @param SourceY Y coordinate of source for the BltBuffer.
2145 @param DestinationX X coordinate of destination for the BltBuffer.
2146 @param DestinationY Y coordinate of destination for the BltBuffer.
2147 @param Width Width of rectangle in BltBuffer in pixels.
2148 @param Height Hight of rectangle in BltBuffer in pixels.
2149 @param Delta OPTIONAL.
2150
2151 @retval EFI_SUCCESS The Blt operation completed.
2152 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
2153 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video
2154 buffer.
2155
2156 **/
2157 EFI_STATUS
2158 EFIAPI
2159 ConSpliterUgaDrawBlt (
2160 IN EFI_UGA_DRAW_PROTOCOL *This,
2161 IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
2162 IN EFI_UGA_BLT_OPERATION BltOperation,
2163 IN UINTN SourceX,
2164 IN UINTN SourceY,
2165 IN UINTN DestinationX,
2166 IN UINTN DestinationY,
2167 IN UINTN Width,
2168 IN UINTN Height,
2169 IN UINTN Delta OPTIONAL
2170 )
2171 ;
2172
2173 /**
2174 Write data from the buffer to video display based on UGA Draw setting.
2175
2176 @param Private Consplitter Text Out pointer.
2177 @param GraphicsOutput Graphics Output protocol pointer.
2178 @param UgaDraw UGA Draw protocol pointer.
2179
2180 @retval EFI_UNSUPPORTED No graphics devcie available .
2181 @retval EFI_SUCCESS The Blt operation completed.
2182 @retval EFI_INVALID_PARAMETER BltOperation is not valid.
2183 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
2184
2185 **/
2186 EFI_STATUS
2187 DevNullUgaSync (
2188 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
2189 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
2190 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
2191 )
2192 ;
2193
2194 /**
2195 Write a Unicode string to the output device.
2196
2197 @param Private Pointer to the console output splitter's private
2198 data. It indicates the calling context.
2199 @param WString The NULL-terminated Unicode string to be
2200 displayed on the output device(s). All output
2201 devices must also support the Unicode drawing
2202 defined in this file.
2203
2204 @retval EFI_SUCCESS The string was output to the device.
2205 @retval EFI_DEVICE_ERROR The device reported an error while attempting to
2206 output the text.
2207 @retval EFI_UNSUPPORTED The output device's mode is not currently in a
2208 defined text mode.
2209 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
2210 characters in the Unicode string could not be
2211 rendered and were skipped.
2212
2213 **/
2214 EFI_STATUS
2215 DevNullTextOutOutputString (
2216 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
2217 IN CHAR16 *WString
2218 )
2219 ;
2220
2221 /**
2222 Sets the output device(s) to a specified mode.
2223
2224 @param Private Private data structure pointer.
2225 @param ModeNumber The mode number to set.
2226
2227 @retval EFI_SUCCESS The requested text mode was set.
2228 @retval EFI_DEVICE_ERROR The device had an error and could not complete
2229 the request.
2230 @retval EFI_UNSUPPORTED The mode number was not valid.
2231 @retval EFI_OUT_OF_RESOURCES Out of resources.
2232
2233 **/
2234 EFI_STATUS
2235 DevNullTextOutSetMode (
2236 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
2237 IN UINTN ModeNumber
2238 )
2239 ;
2240
2241 /**
2242 Clears the output device(s) display to the currently selected background
2243 color.
2244
2245 @param Private Protocol instance pointer.
2246
2247 @retval EFI_SUCCESS The operation completed successfully.
2248 @retval EFI_DEVICE_ERROR The device had an error and could not complete
2249 the request.
2250 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.
2251
2252 **/
2253 EFI_STATUS
2254 DevNullTextOutClearScreen (
2255 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
2256 )
2257 ;
2258
2259 /**
2260 Sets the current coordinates of the cursor position.
2261
2262 @param Private Protocol instance pointer.
2263 @param Column
2264 @param Row the position to set the cursor to. Must be
2265 greater than or equal to zero and less than the
2266 number of columns and rows by QueryMode ().
2267
2268 @retval EFI_SUCCESS The operation completed successfully.
2269 @retval EFI_DEVICE_ERROR The device had an error and could not complete
2270 the request.
2271 @retval EFI_UNSUPPORTED The output device is not in a valid text mode, or
2272 the cursor position is invalid for the current
2273 mode.
2274
2275 **/
2276 EFI_STATUS
2277 DevNullTextOutSetCursorPosition (
2278 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
2279 IN UINTN Column,
2280 IN UINTN Row
2281 )
2282 ;
2283
2284 /**
2285 Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
2286 In this driver, the cursor cannot be hidden.
2287
2288 @param Private Indicates the calling context.
2289 @param Visible If TRUE, the cursor is set to be visible, If
2290 FALSE, the cursor is set to be invisible.
2291
2292 @retval EFI_SUCCESS The request is valid.
2293
2294 **/
2295 EFI_STATUS
2296 DevNullTextOutEnableCursor (
2297 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
2298 IN BOOLEAN Visible
2299 )
2300 ;
2301
2302 /**
2303 Take the DevNull TextOut device and update the Simple Text Out on every
2304 UGA device.
2305
2306 @param Private Indicates the calling context.
2307
2308 @retval EFI_SUCCESS The request is valid.
2309 @retval other Return status of TextOut->OutputString ()
2310
2311 **/
2312 EFI_STATUS
2313 DevNullSyncStdOut (
2314 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
2315 )
2316 ;
2317
2318 #endif