]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
Update to support EFI_SIMPLE_INPUT_EX protocol
[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 - 2007 Intel Corporation. <BR>
5 All rights reserved. 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 <PiDxe.h>
19 #include <Guid/PrimaryStandardErrorDevice.h>
20 #include <Guid/PrimaryConsoleOutDevice.h>
21 #include <Protocol/GraphicsOutput.h>
22 #include <Guid/PrimaryConsoleInDevice.h>
23 #include <Protocol/SimplePointer.h>
24 #include <Protocol/SimpleTextOut.h>
25 #include <Guid/ConsoleInDevice.h>
26 #include <Protocol/SimpleTextIn.h>
27 #include <Protocol/SimpleTextInEx.h>
28 #include <Protocol/ConsoleControl.h>
29 #include <Guid/StandardErrorDevice.h>
30 #include <Guid/ConsoleOutDevice.h>
31 #include <Protocol/UgaDraw.h>
32 #include <Library/PcdLib.h>
33 #include <Library/DebugLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/UefiLib.h>
36 #include <Library/BaseLib.h>
37 #include <Library/BaseMemoryLib.h>
38 #include <Library/MemoryAllocationLib.h>
39 #include <Library/UefiBootServicesTableLib.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 gConSplitterConOutDriverBinding;
51 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2;
53 extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
54 extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
55 extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;
56
57 extern EFI_GUID gSimpleTextInExNotifyGuid;
58
59 // These definitions were in the old Hii protocol, but are not in the new UEFI
60 // version. So they are defined locally.
61 #define UNICODE_NARROW_CHAR 0xFFF0
62 #define UNICODE_WIDE_CHAR 0xFFF1
63
64
65 //
66 // Private Data Structures
67 //
68 #define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
69 #define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
70 #define MAX_STD_IN_PASSWORD 80
71
72 typedef struct {
73 UINTN Columns;
74 UINTN Rows;
75 } TEXT_OUT_SPLITTER_QUERY_DATA;
76
77 //
78 // Private data for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL splitter
79 //
80 #define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'p')
81
82 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('T', 'i', 'S', 'n')
83
84 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {
85 UINTN Signature;
86 EFI_HANDLE *NotifyHandleList;
87 EFI_HANDLE NotifyHandle;
88 EFI_KEY_DATA KeyData;
89 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
90 LIST_ENTRY NotifyEntry;
91 } TEXT_IN_EX_SPLITTER_NOTIFY;
92 typedef struct {
93 UINT64 Signature;
94 EFI_HANDLE VirtualHandle;
95
96 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn;
97 UINTN CurrentNumberOfConsoles;
98 EFI_SIMPLE_TEXT_INPUT_PROTOCOL **TextInList;
99 UINTN TextInListCount;
100
101 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx;
102 UINTN CurrentNumberOfExConsoles;
103 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **TextInExList;
104 UINTN TextInExListCount;
105 LIST_ENTRY NotifyList;
106
107
108 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;
109 EFI_SIMPLE_POINTER_MODE SimplePointerMode;
110 UINTN CurrentNumberOfPointers;
111 EFI_SIMPLE_POINTER_PROTOCOL **PointerList;
112 UINTN PointerListCount;
113
114 BOOLEAN PasswordEnabled;
115 CHAR16 Password[MAX_STD_IN_PASSWORD];
116 UINTN PwdIndex;
117 CHAR16 PwdAttempt[MAX_STD_IN_PASSWORD];
118 EFI_EVENT LockEvent;
119
120 BOOLEAN KeyEventSignalState;
121 BOOLEAN InputEventSignalState;
122 } TEXT_IN_SPLITTER_PRIVATE_DATA;
123
124 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
125 CR ((a), \
126 TEXT_IN_SPLITTER_PRIVATE_DATA, \
127 TextIn, \
128 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
129 )
130
131 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \
132 CR ((a), \
133 TEXT_IN_SPLITTER_PRIVATE_DATA, \
134 SimplePointer, \
135 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
136 )
137 #define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
138 CR (a, \
139 TEXT_IN_SPLITTER_PRIVATE_DATA, \
140 TextInEx, \
141 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
142 )
143
144 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \
145 CR (a, \
146 TEXT_IN_SPLITTER_PRIVATE_DATA, \
147 AbsolutePointer, \
148 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \
149 )
150
151 //
152 // Private data for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL splitter
153 //
154 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('T', 'o', 'S', 'p')
155
156 typedef struct {
157 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
158 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
159 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
160 BOOLEAN TextOutEnabled;
161 } TEXT_OUT_AND_GOP_DATA;
162
163 typedef struct {
164 UINT32 HorizontalResolution;
165 UINT32 VerticalResolution;
166 } TEXT_OUT_GOP_MODE;
167
168 typedef struct {
169 UINT64 Signature;
170 EFI_HANDLE VirtualHandle;
171 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;
172 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
173
174 EFI_UGA_DRAW_PROTOCOL UgaDraw;
175 UINT32 UgaHorizontalResolution;
176 UINT32 UgaVerticalResolution;
177 UINT32 UgaColorDepth;
178 UINT32 UgaRefreshRate;
179 EFI_UGA_PIXEL *UgaBlt;
180
181 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
182 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
183 TEXT_OUT_GOP_MODE *GraphicsOutputModeBuffer;
184 UINTN CurrentNumberOfGraphicsOutput;
185 BOOLEAN HardwareNeedsStarting;
186
187 EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
188
189 UINTN CurrentNumberOfConsoles;
190 TEXT_OUT_AND_GOP_DATA *TextOutList;
191 UINTN TextOutListCount;
192 TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;
193 UINTN TextOutQueryDataCount;
194 INT32 *TextOutModeMap;
195
196 EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode;
197
198 UINTN DevNullColumns;
199 UINTN DevNullRows;
200 CHAR16 *DevNullScreen;
201 INT32 *DevNullAttributes;
202
203 } TEXT_OUT_SPLITTER_PRIVATE_DATA;
204
205 #define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
206 CR ((a), \
207 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
208 TextOut, \
209 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
210 )
211
212 #define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
213 CR ((a), \
214 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
215 GraphicsOutput, \
216 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
217 )
218
219 #define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
220 CR ((a), \
221 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
222 UgaDraw, \
223 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
224 )
225
226 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
227 CR ((a), \
228 TEXT_OUT_SPLITTER_PRIVATE_DATA, \
229 ConsoleControl, \
230 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \
231 )
232
233 //
234 // Function Prototypes
235 //
236 EFI_STATUS
237 EFIAPI
238 ConSplitterDriverEntry (
239 IN EFI_HANDLE ImageHandle,
240 IN EFI_SYSTEM_TABLE *SystemTable
241 )
242 ;
243
244 EFI_STATUS
245 ConSplitterTextInConstructor (
246 TEXT_IN_SPLITTER_PRIVATE_DATA *Private
247 )
248 ;
249
250 EFI_STATUS
251 ConSplitterTextOutConstructor (
252 TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
253 )
254 ;
255
256 //
257 // Driver Binding Functions
258 //
259 EFI_STATUS
260 EFIAPI
261 ConSplitterConInDriverBindingSupported (
262 IN EFI_DRIVER_BINDING_PROTOCOL *This,
263 IN EFI_HANDLE ControllerHandle,
264 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
265 )
266 ;
267
268 EFI_STATUS
269 EFIAPI
270 ConSplitterSimplePointerDriverBindingSupported (
271 IN EFI_DRIVER_BINDING_PROTOCOL *This,
272 IN EFI_HANDLE ControllerHandle,
273 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
274 )
275 ;
276
277 EFI_STATUS
278 EFIAPI
279 ConSplitterConOutDriverBindingSupported (
280 IN EFI_DRIVER_BINDING_PROTOCOL *This,
281 IN EFI_HANDLE ControllerHandle,
282 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
283 )
284 ;
285
286 EFI_STATUS
287 EFIAPI
288 ConSplitterStdErrDriverBindingSupported (
289 IN EFI_DRIVER_BINDING_PROTOCOL *This,
290 IN EFI_HANDLE ControllerHandle,
291 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
292 )
293 ;
294
295 EFI_STATUS
296 EFIAPI
297 ConSplitterConInDriverBindingStart (
298 IN EFI_DRIVER_BINDING_PROTOCOL *This,
299 IN EFI_HANDLE ControllerHandle,
300 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
301 )
302 ;
303
304 EFI_STATUS
305 EFIAPI
306 ConSplitterSimplePointerDriverBindingStart (
307 IN EFI_DRIVER_BINDING_PROTOCOL *This,
308 IN EFI_HANDLE ControllerHandle,
309 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
310 )
311 ;
312
313 EFI_STATUS
314 EFIAPI
315 ConSplitterConOutDriverBindingStart (
316 IN EFI_DRIVER_BINDING_PROTOCOL *This,
317 IN EFI_HANDLE ControllerHandle,
318 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
319 )
320 ;
321
322 EFI_STATUS
323 EFIAPI
324 ConSplitterStdErrDriverBindingStart (
325 IN EFI_DRIVER_BINDING_PROTOCOL *This,
326 IN EFI_HANDLE ControllerHandle,
327 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
328 )
329 ;
330
331 EFI_STATUS
332 EFIAPI
333 ConSplitterConInDriverBindingStop (
334 IN EFI_DRIVER_BINDING_PROTOCOL *This,
335 IN EFI_HANDLE ControllerHandle,
336 IN UINTN NumberOfChildren,
337 IN EFI_HANDLE *ChildHandleBuffer
338 )
339 ;
340
341 EFI_STATUS
342 EFIAPI
343 ConSplitterSimplePointerDriverBindingStop (
344 IN EFI_DRIVER_BINDING_PROTOCOL *This,
345 IN EFI_HANDLE ControllerHandle,
346 IN UINTN NumberOfChildren,
347 IN EFI_HANDLE *ChildHandleBuffer
348 )
349 ;
350
351 EFI_STATUS
352 EFIAPI
353 ConSplitterConOutDriverBindingStop (
354 IN EFI_DRIVER_BINDING_PROTOCOL *This,
355 IN EFI_HANDLE ControllerHandle,
356 IN UINTN NumberOfChildren,
357 IN EFI_HANDLE *ChildHandleBuffer
358 )
359 ;
360
361 EFI_STATUS
362 EFIAPI
363 ConSplitterStdErrDriverBindingStop (
364 IN EFI_DRIVER_BINDING_PROTOCOL *This,
365 IN EFI_HANDLE ControllerHandle,
366 IN UINTN NumberOfChildren,
367 IN EFI_HANDLE *ChildHandleBuffer
368 )
369 ;
370
371 /**
372 Retrieves a Unicode string that is the user readable name of the driver.
373
374 This function retrieves the user readable name of a driver in the form of a
375 Unicode string. If the driver specified by This has a user readable name in
376 the language specified by Language, then a pointer to the driver name is
377 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
378 by This does not support the language specified by Language,
379 then EFI_UNSUPPORTED is returned.
380
381 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
382 EFI_COMPONENT_NAME_PROTOCOL instance.
383
384 @param Language[in] A pointer to a Null-terminated ASCII string
385 array indicating the language. This is the
386 language of the driver name that the caller is
387 requesting, and it must match one of the
388 languages specified in SupportedLanguages. The
389 number of languages supported by a driver is up
390 to the driver writer. Language is specified
391 in RFC 3066 or ISO 639-2 language code format.
392
393 @param DriverName[out] A pointer to the Unicode string to return.
394 This Unicode string is the name of the
395 driver specified by This in the language
396 specified by Language.
397
398 @retval EFI_SUCCESS The Unicode string for the Driver specified by
399 This and the language specified by Language was
400 returned in DriverName.
401
402 @retval EFI_INVALID_PARAMETER Language is NULL.
403
404 @retval EFI_INVALID_PARAMETER DriverName is NULL.
405
406 @retval EFI_UNSUPPORTED The driver specified by This does not support
407 the language specified by Language.
408
409 **/
410 EFI_STATUS
411 EFIAPI
412 ConSplitterComponentNameGetDriverName (
413 IN EFI_COMPONENT_NAME_PROTOCOL *This,
414 IN CHAR8 *Language,
415 OUT CHAR16 **DriverName
416 );
417
418
419 /**
420 Retrieves a Unicode string that is the user readable name of the controller
421 that is being managed by a driver.
422
423 This function retrieves the user readable name of the controller specified by
424 ControllerHandle and ChildHandle in the form of a Unicode string. If the
425 driver specified by This has a user readable name in the language specified by
426 Language, then a pointer to the controller name is returned in ControllerName,
427 and EFI_SUCCESS is returned. If the driver specified by This is not currently
428 managing the controller specified by ControllerHandle and ChildHandle,
429 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
430 support the language specified by Language, then EFI_UNSUPPORTED is returned.
431
432 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
433 EFI_COMPONENT_NAME_PROTOCOL instance.
434
435 @param ControllerHandle[in] The handle of a controller that the driver
436 specified by This is managing. This handle
437 specifies the controller whose name is to be
438 returned.
439
440 @param ChildHandle[in] The handle of the child controller to retrieve
441 the name of. This is an optional parameter that
442 may be NULL. It will be NULL for device
443 drivers. It will also be NULL for a bus drivers
444 that wish to retrieve the name of the bus
445 controller. It will not be NULL for a bus
446 driver that wishes to retrieve the name of a
447 child controller.
448
449 @param Language[in] A pointer to a Null-terminated ASCII string
450 array indicating the language. This is the
451 language of the driver name that the caller is
452 requesting, and it must match one of the
453 languages specified in SupportedLanguages. The
454 number of languages supported by a driver is up
455 to the driver writer. Language is specified in
456 RFC 3066 or ISO 639-2 language code format.
457
458 @param ControllerName[out] A pointer to the Unicode string to return.
459 This Unicode string is the name of the
460 controller specified by ControllerHandle and
461 ChildHandle in the language specified by
462 Language from the point of view of the driver
463 specified by This.
464
465 @retval EFI_SUCCESS The Unicode string for the user readable name in
466 the language specified by Language for the
467 driver specified by This was returned in
468 DriverName.
469
470 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
471
472 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
473 EFI_HANDLE.
474
475 @retval EFI_INVALID_PARAMETER Language is NULL.
476
477 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
478
479 @retval EFI_UNSUPPORTED The driver specified by This is not currently
480 managing the controller specified by
481 ControllerHandle and ChildHandle.
482
483 @retval EFI_UNSUPPORTED The driver specified by This does not support
484 the language specified by Language.
485
486 **/
487 EFI_STATUS
488 EFIAPI
489 ConSplitterConInComponentNameGetControllerName (
490 IN EFI_COMPONENT_NAME_PROTOCOL *This,
491 IN EFI_HANDLE ControllerHandle,
492 IN EFI_HANDLE ChildHandle OPTIONAL,
493 IN CHAR8 *Language,
494 OUT CHAR16 **ControllerName
495 );
496
497
498 /**
499 Retrieves a Unicode string that is the user readable name of the controller
500 that is being managed by a driver.
501
502 This function retrieves the user readable name of the controller specified by
503 ControllerHandle and ChildHandle in the form of a Unicode string. If the
504 driver specified by This has a user readable name in the language specified by
505 Language, then a pointer to the controller name is returned in ControllerName,
506 and EFI_SUCCESS is returned. If the driver specified by This is not currently
507 managing the controller specified by ControllerHandle and ChildHandle,
508 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
509 support the language specified by Language, then EFI_UNSUPPORTED is returned.
510
511 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
512 EFI_COMPONENT_NAME_PROTOCOL instance.
513
514 @param ControllerHandle[in] The handle of a controller that the driver
515 specified by This is managing. This handle
516 specifies the controller whose name is to be
517 returned.
518
519 @param ChildHandle[in] The handle of the child controller to retrieve
520 the name of. This is an optional parameter that
521 may be NULL. It will be NULL for device
522 drivers. It will also be NULL for a bus drivers
523 that wish to retrieve the name of the bus
524 controller. It will not be NULL for a bus
525 driver that wishes to retrieve the name of a
526 child controller.
527
528 @param Language[in] A pointer to a Null-terminated ASCII string
529 array indicating the language. This is the
530 language of the driver name that the caller is
531 requesting, and it must match one of the
532 languages specified in SupportedLanguages. The
533 number of languages supported by a driver is up
534 to the driver writer. Language is specified in
535 RFC 3066 or ISO 639-2 language code format.
536
537 @param ControllerName[out] A pointer to the Unicode string to return.
538 This Unicode string is the name of the
539 controller specified by ControllerHandle and
540 ChildHandle in the language specified by
541 Language from the point of view of the driver
542 specified by This.
543
544 @retval EFI_SUCCESS The Unicode string for the user readable name in
545 the language specified by Language for the
546 driver specified by This was returned in
547 DriverName.
548
549 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
550
551 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
552 EFI_HANDLE.
553
554 @retval EFI_INVALID_PARAMETER Language is NULL.
555
556 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
557
558 @retval EFI_UNSUPPORTED The driver specified by This is not currently
559 managing the controller specified by
560 ControllerHandle and ChildHandle.
561
562 @retval EFI_UNSUPPORTED The driver specified by This does not support
563 the language specified by Language.
564
565 **/
566 EFI_STATUS
567 EFIAPI
568 ConSplitterSimplePointerComponentNameGetControllerName (
569 IN EFI_COMPONENT_NAME_PROTOCOL *This,
570 IN EFI_HANDLE ControllerHandle,
571 IN EFI_HANDLE ChildHandle OPTIONAL,
572 IN CHAR8 *Language,
573 OUT CHAR16 **ControllerName
574 );
575
576
577 /**
578 Retrieves a Unicode string that is the user readable name of the controller
579 that is being managed by a driver.
580
581 This function retrieves the user readable name of the controller specified by
582 ControllerHandle and ChildHandle in the form of a Unicode string. If the
583 driver specified by This has a user readable name in the language specified by
584 Language, then a pointer to the controller name is returned in ControllerName,
585 and EFI_SUCCESS is returned. If the driver specified by This is not currently
586 managing the controller specified by ControllerHandle and ChildHandle,
587 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
588 support the language specified by Language, then EFI_UNSUPPORTED is returned.
589
590 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
591 EFI_COMPONENT_NAME_PROTOCOL instance.
592
593 @param ControllerHandle[in] The handle of a controller that the driver
594 specified by This is managing. This handle
595 specifies the controller whose name is to be
596 returned.
597
598 @param ChildHandle[in] The handle of the child controller to retrieve
599 the name of. This is an optional parameter that
600 may be NULL. It will be NULL for device
601 drivers. It will also be NULL for a bus drivers
602 that wish to retrieve the name of the bus
603 controller. It will not be NULL for a bus
604 driver that wishes to retrieve the name of a
605 child controller.
606
607 @param Language[in] A pointer to a Null-terminated ASCII string
608 array indicating the language. This is the
609 language of the driver name that the caller is
610 requesting, and it must match one of the
611 languages specified in SupportedLanguages. The
612 number of languages supported by a driver is up
613 to the driver writer. Language is specified in
614 RFC 3066 or ISO 639-2 language code format.
615
616 @param ControllerName[out] A pointer to the Unicode string to return.
617 This Unicode string is the name of the
618 controller specified by ControllerHandle and
619 ChildHandle in the language specified by
620 Language from the point of view of the driver
621 specified by This.
622
623 @retval EFI_SUCCESS The Unicode string for the user readable name in
624 the language specified by Language for the
625 driver specified by This was returned in
626 DriverName.
627
628 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
629
630 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
631 EFI_HANDLE.
632
633 @retval EFI_INVALID_PARAMETER Language is NULL.
634
635 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
636
637 @retval EFI_UNSUPPORTED The driver specified by This is not currently
638 managing the controller specified by
639 ControllerHandle and ChildHandle.
640
641 @retval EFI_UNSUPPORTED The driver specified by This does not support
642 the language specified by Language.
643
644 **/
645 EFI_STATUS
646 EFIAPI
647 ConSplitterConOutComponentNameGetControllerName (
648 IN EFI_COMPONENT_NAME_PROTOCOL *This,
649 IN EFI_HANDLE ControllerHandle,
650 IN EFI_HANDLE ChildHandle OPTIONAL,
651 IN CHAR8 *Language,
652 OUT CHAR16 **ControllerName
653 );
654
655
656 /**
657 Retrieves a Unicode string that is the user readable name of the controller
658 that is being managed by a driver.
659
660 This function retrieves the user readable name of the controller specified by
661 ControllerHandle and ChildHandle in the form of a Unicode string. If the
662 driver specified by This has a user readable name in the language specified by
663 Language, then a pointer to the controller name is returned in ControllerName,
664 and EFI_SUCCESS is returned. If the driver specified by This is not currently
665 managing the controller specified by ControllerHandle and ChildHandle,
666 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
667 support the language specified by Language, then EFI_UNSUPPORTED is returned.
668
669 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
670 EFI_COMPONENT_NAME_PROTOCOL instance.
671
672 @param ControllerHandle[in] The handle of a controller that the driver
673 specified by This is managing. This handle
674 specifies the controller whose name is to be
675 returned.
676
677 @param ChildHandle[in] The handle of the child controller to retrieve
678 the name of. This is an optional parameter that
679 may be NULL. It will be NULL for device
680 drivers. It will also be NULL for a bus drivers
681 that wish to retrieve the name of the bus
682 controller. It will not be NULL for a bus
683 driver that wishes to retrieve the name of a
684 child controller.
685
686 @param Language[in] A pointer to a Null-terminated ASCII string
687 array indicating the language. This is the
688 language of the driver name that the caller is
689 requesting, and it must match one of the
690 languages specified in SupportedLanguages. The
691 number of languages supported by a driver is up
692 to the driver writer. Language is specified in
693 RFC 3066 or ISO 639-2 language code format.
694
695 @param ControllerName[out] A pointer to the Unicode string to return.
696 This Unicode string is the name of the
697 controller specified by ControllerHandle and
698 ChildHandle in the language specified by
699 Language from the point of view of the driver
700 specified by This.
701
702 @retval EFI_SUCCESS The Unicode string for the user readable name in
703 the language specified by Language for the
704 driver specified by This was returned in
705 DriverName.
706
707 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
708
709 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
710 EFI_HANDLE.
711
712 @retval EFI_INVALID_PARAMETER Language is NULL.
713
714 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
715
716 @retval EFI_UNSUPPORTED The driver specified by This is not currently
717 managing the controller specified by
718 ControllerHandle and ChildHandle.
719
720 @retval EFI_UNSUPPORTED The driver specified by This does not support
721 the language specified by Language.
722
723 **/
724 EFI_STATUS
725 EFIAPI
726 ConSplitterStdErrComponentNameGetControllerName (
727 IN EFI_COMPONENT_NAME_PROTOCOL *This,
728 IN EFI_HANDLE ControllerHandle,
729 IN EFI_HANDLE ChildHandle OPTIONAL,
730 IN CHAR8 *Language,
731 OUT CHAR16 **ControllerName
732 );
733
734
735 //
736 // TextIn Constructor/Destructor functions
737 //
738 EFI_STATUS
739 ConSplitterTextInAddDevice (
740 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
741 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
742 )
743 ;
744
745 EFI_STATUS
746 ConSplitterTextInDeleteDevice (
747 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
748 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn
749 )
750 ;
751
752 //
753 // SimplePointer Constuctor/Destructor functions
754 //
755 EFI_STATUS
756 ConSplitterSimplePointerAddDevice (
757 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
758 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
759 )
760 ;
761
762 EFI_STATUS
763 ConSplitterSimplePointerDeleteDevice (
764 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
765 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer
766 )
767 ;
768
769 //
770 // TextOut Constuctor/Destructor functions
771 //
772 EFI_STATUS
773 ConSplitterTextOutAddDevice (
774 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
775 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut,
776 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
777 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
778 )
779 ;
780
781 EFI_STATUS
782 ConSplitterTextOutDeleteDevice (
783 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
784 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut
785 )
786 ;
787
788 //
789 // TextIn I/O Functions
790 //
791 EFI_STATUS
792 EFIAPI
793 ConSplitterTextInReset (
794 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
795 IN BOOLEAN ExtendedVerification
796 )
797 ;
798
799 EFI_STATUS
800 EFIAPI
801 ConSplitterTextInReadKeyStroke (
802 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
803 OUT EFI_INPUT_KEY *Key
804 )
805 ;
806 EFI_STATUS
807 ConSplitterTextInExAddDevice (
808 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
809 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx
810 )
811 ;
812
813 EFI_STATUS
814 ConSplitterTextInExDeleteDevice (
815 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
816 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx
817 )
818 ;
819
820 //
821 // Simple Text Input Ex protocol function prototypes
822 //
823
824 EFI_STATUS
825 EFIAPI
826 ConSplitterTextInResetEx (
827 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
828 IN BOOLEAN ExtendedVerification
829 )
830 /*++
831
832 Routine Description:
833 Reset the input device and optionaly run diagnostics
834
835 Arguments:
836 This - Protocol instance pointer.
837 ExtendedVerification - Driver may perform diagnostics on reset.
838
839 Returns:
840 EFI_SUCCESS - The device was reset.
841 EFI_DEVICE_ERROR - The device is not functioning properly and could
842 not be reset.
843
844 --*/
845 ;
846
847 EFI_STATUS
848 EFIAPI
849 ConSplitterTextInReadKeyStrokeEx (
850 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
851 OUT EFI_KEY_DATA *KeyData
852 )
853 /*++
854
855 Routine Description:
856 Reads the next keystroke from the input device. The WaitForKey Event can
857 be used to test for existance of a keystroke via WaitForEvent () call.
858
859 Arguments:
860 This - Protocol instance pointer.
861 KeyData - A pointer to a buffer that is filled in with the keystroke
862 state data for the key that was pressed.
863
864 Returns:
865 EFI_SUCCESS - The keystroke information was returned.
866 EFI_NOT_READY - There was no keystroke data availiable.
867 EFI_DEVICE_ERROR - The keystroke information was not returned due to
868 hardware errors.
869 EFI_INVALID_PARAMETER - KeyData is NULL.
870
871 --*/
872 ;
873
874 EFI_STATUS
875 EFIAPI
876 ConSplitterTextInSetState (
877 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
878 IN EFI_KEY_TOGGLE_STATE *KeyToggleState
879 )
880 /*++
881
882 Routine Description:
883 Set certain state for the input device.
884
885 Arguments:
886 This - Protocol instance pointer.
887 KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
888 state for the input device.
889
890 Returns:
891 EFI_SUCCESS - The device state was set successfully.
892 EFI_DEVICE_ERROR - The device is not functioning correctly and could
893 not have the setting adjusted.
894 EFI_UNSUPPORTED - The device does not have the ability to set its state.
895 EFI_INVALID_PARAMETER - KeyToggleState is NULL.
896
897 --*/
898 ;
899
900 EFI_STATUS
901 EFIAPI
902 ConSplitterTextInRegisterKeyNotify (
903 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
904 IN EFI_KEY_DATA *KeyData,
905 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
906 OUT EFI_HANDLE *NotifyHandle
907 )
908 /*++
909
910 Routine Description:
911 Register a notification function for a particular keystroke for the input device.
912
913 Arguments:
914 This - Protocol instance pointer.
915 KeyData - A pointer to a buffer that is filled in with the keystroke
916 information data for the key that was pressed.
917 KeyNotificationFunction - Points to the function to be called when the key
918 sequence is typed specified by KeyData.
919 NotifyHandle - Points to the unique handle assigned to the registered notification.
920
921 Returns:
922 EFI_SUCCESS - The notification function was registered successfully.
923 EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
924 EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
925
926 --*/
927 ;
928
929 EFI_STATUS
930 EFIAPI
931 ConSplitterTextInUnregisterKeyNotify (
932 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
933 IN EFI_HANDLE NotificationHandle
934 )
935 /*++
936
937 Routine Description:
938 Remove a registered notification function from a particular keystroke.
939
940 Arguments:
941 This - Protocol instance pointer.
942 NotificationHandle - The handle of the notification function being unregistered.
943
944 Returns:
945 EFI_SUCCESS - The notification function was unregistered successfully.
946 EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
947 EFI_NOT_FOUND - Can not find the matching entry in database.
948
949 --*/
950 ;
951 VOID
952 EFIAPI
953 ConSplitterTextInWaitForKey (
954 IN EFI_EVENT Event,
955 IN VOID *Context
956 )
957 ;
958
959 BOOLEAN
960 ConSpliterConssoleControlStdInLocked (
961 VOID
962 )
963 ;
964
965 VOID
966 EFIAPI
967 ConSpliterConsoleControlLockStdInEvent (
968 IN EFI_EVENT Event,
969 IN VOID *Context
970 )
971 ;
972
973 EFI_STATUS
974 EFIAPI
975 ConSpliterConsoleControlLockStdIn (
976 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
977 IN CHAR16 *Password
978 )
979 ;
980
981 EFI_STATUS
982 EFIAPI
983 ConSplitterTextInPrivateReadKeyStroke (
984 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,
985 OUT EFI_INPUT_KEY *Key
986 )
987 ;
988
989 EFI_STATUS
990 EFIAPI
991 ConSplitterSimplePointerReset (
992 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
993 IN BOOLEAN ExtendedVerification
994 )
995 ;
996
997 EFI_STATUS
998 EFIAPI
999 ConSplitterSimplePointerGetState (
1000 IN EFI_SIMPLE_POINTER_PROTOCOL *This,
1001 IN OUT EFI_SIMPLE_POINTER_STATE *State
1002 )
1003 ;
1004
1005 VOID
1006 EFIAPI
1007 ConSplitterSimplePointerWaitForInput (
1008 IN EFI_EVENT Event,
1009 IN VOID *Context
1010 )
1011 ;
1012
1013 //
1014 // TextOut I/O Functions
1015 //
1016 VOID
1017 ConSplitterSynchronizeModeData (
1018 TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
1019 )
1020 ;
1021
1022 EFI_STATUS
1023 EFIAPI
1024 ConSplitterTextOutReset (
1025 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1026 IN BOOLEAN ExtendedVerification
1027 )
1028 ;
1029
1030 EFI_STATUS
1031 EFIAPI
1032 ConSplitterTextOutOutputString (
1033 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1034 IN CHAR16 *WString
1035 )
1036 ;
1037
1038 EFI_STATUS
1039 EFIAPI
1040 ConSplitterTextOutTestString (
1041 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1042 IN CHAR16 *WString
1043 )
1044 ;
1045
1046 EFI_STATUS
1047 EFIAPI
1048 ConSplitterTextOutQueryMode (
1049 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1050 IN UINTN ModeNumber,
1051 OUT UINTN *Columns,
1052 OUT UINTN *Rows
1053 )
1054 ;
1055
1056 EFI_STATUS
1057 EFIAPI
1058 ConSplitterTextOutSetMode (
1059 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1060 IN UINTN ModeNumber
1061 )
1062 ;
1063
1064 EFI_STATUS
1065 EFIAPI
1066 ConSplitterTextOutSetAttribute (
1067 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1068 IN UINTN Attribute
1069 )
1070 ;
1071
1072 EFI_STATUS
1073 EFIAPI
1074 ConSplitterTextOutClearScreen (
1075 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
1076 )
1077 ;
1078
1079 EFI_STATUS
1080 EFIAPI
1081 ConSplitterTextOutSetCursorPosition (
1082 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1083 IN UINTN Column,
1084 IN UINTN Row
1085 )
1086 ;
1087
1088 EFI_STATUS
1089 EFIAPI
1090 ConSplitterTextOutEnableCursor (
1091 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
1092 IN BOOLEAN Visible
1093 )
1094 ;
1095
1096 EFI_STATUS
1097 ConSplitterGrowBuffer (
1098 IN UINTN SizeOfCount,
1099 IN UINTN *Count,
1100 IN OUT VOID **Buffer
1101 )
1102 ;
1103
1104 EFI_STATUS
1105 EFIAPI
1106 ConSpliterConsoleControlGetMode (
1107 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
1108 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
1109 OUT BOOLEAN *GopExists,
1110 OUT BOOLEAN *StdInLocked
1111 )
1112 ;
1113
1114 EFI_STATUS
1115 EFIAPI
1116 ConSpliterConsoleControlSetMode (
1117 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
1118 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
1119 )
1120 ;
1121
1122 EFI_STATUS
1123 EFIAPI
1124 ConSpliterGraphicsOutputQueryMode (
1125 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
1126 IN UINT32 ModeNumber,
1127 OUT UINTN *SizeOfInfo,
1128 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
1129 )
1130 ;
1131
1132 EFI_STATUS
1133 EFIAPI
1134 ConSpliterGraphicsOutputSetMode (
1135 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
1136 IN UINT32 ModeNumber
1137 )
1138 ;
1139
1140 EFI_STATUS
1141 EFIAPI
1142 ConSpliterGraphicsOutputBlt (
1143 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
1144 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
1145 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
1146 IN UINTN SourceX,
1147 IN UINTN SourceY,
1148 IN UINTN DestinationX,
1149 IN UINTN DestinationY,
1150 IN UINTN Width,
1151 IN UINTN Height,
1152 IN UINTN Delta OPTIONAL
1153 )
1154 ;
1155
1156 EFI_STATUS
1157 DevNullGopSync (
1158 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1159 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
1160 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
1161 )
1162 ;
1163
1164 EFI_STATUS
1165 EFIAPI
1166 ConSpliterUgaDrawGetMode (
1167 IN EFI_UGA_DRAW_PROTOCOL *This,
1168 OUT UINT32 *HorizontalResolution,
1169 OUT UINT32 *VerticalResolution,
1170 OUT UINT32 *ColorDepth,
1171 OUT UINT32 *RefreshRate
1172 )
1173 ;
1174
1175 EFI_STATUS
1176 EFIAPI
1177 ConSpliterUgaDrawSetMode (
1178 IN EFI_UGA_DRAW_PROTOCOL *This,
1179 IN UINT32 HorizontalResolution,
1180 IN UINT32 VerticalResolution,
1181 IN UINT32 ColorDepth,
1182 IN UINT32 RefreshRate
1183 )
1184 ;
1185
1186 EFI_STATUS
1187 EFIAPI
1188 ConSpliterUgaDrawBlt (
1189 IN EFI_UGA_DRAW_PROTOCOL *This,
1190 IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
1191 IN EFI_UGA_BLT_OPERATION BltOperation,
1192 IN UINTN SourceX,
1193 IN UINTN SourceY,
1194 IN UINTN DestinationX,
1195 IN UINTN DestinationY,
1196 IN UINTN Width,
1197 IN UINTN Height,
1198 IN UINTN Delta OPTIONAL
1199 )
1200 ;
1201
1202 EFI_STATUS
1203 DevNullUgaSync (
1204 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1205 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
1206 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
1207 )
1208 ;
1209
1210 EFI_STATUS
1211 DevNullTextOutOutputString (
1212 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1213 IN CHAR16 *WString
1214 )
1215 ;
1216
1217 EFI_STATUS
1218 DevNullTextOutSetMode (
1219 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1220 IN UINTN ModeNumber
1221 )
1222 ;
1223
1224 EFI_STATUS
1225 DevNullTextOutClearScreen (
1226 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
1227 )
1228 ;
1229
1230 EFI_STATUS
1231 DevNullTextOutSetCursorPosition (
1232 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1233 IN UINTN Column,
1234 IN UINTN Row
1235 )
1236 ;
1237
1238 EFI_STATUS
1239 DevNullTextOutEnableCursor (
1240 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
1241 IN BOOLEAN Visible
1242 )
1243 ;
1244
1245 EFI_STATUS
1246 DevNullSyncGopStdOut (
1247 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
1248 )
1249 ;
1250
1251 #endif