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