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