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