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