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