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