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