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