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