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