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