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