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