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