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