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