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