TianoCore EDK2 master
Loading...
Searching...
No Matches
ConSplitter.c File Reference
#include "ConSplitter.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI ToggleStateSyncKeyNotify (IN EFI_KEY_DATA *KeyData)
 
VOID ToggleStateSyncInitialization (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private)
 
VOID ToggleStateSyncReInitialization (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private)
 
EFI_STATUS EFIAPI ConSplitterDriverEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS ConSplitterTextInConstructor (TEXT_IN_SPLITTER_PRIVATE_DATA *ConInPrivate)
 
EFI_STATUS ConSplitterTextOutConstructor (TEXT_OUT_SPLITTER_PRIVATE_DATA *ConOutPrivate)
 
EFI_STATUS ConSplitterSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_GUID *Guid)
 
EFI_STATUS EFIAPI ConSplitterConInDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterConOutDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS ConSplitterStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ConSplitterVirtualHandle, IN EFI_GUID *DeviceGuid, IN EFI_GUID *InterfaceGuid, OUT VOID **Interface)
 
EFI_STATUS EFIAPI ConSplitterConInDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterConOutDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
 
EFI_STATUS ConSplitterStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ConSplitterVirtualHandle, IN EFI_GUID *DeviceGuid, IN EFI_GUID *InterfaceGuid, IN VOID **Interface)
 
EFI_STATUS EFIAPI ConSplitterConInDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS EFIAPI ConSplitterConOutDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
 
EFI_STATUS ConSplitterGrowBuffer (IN UINTN ElementSize, IN OUT UINTN *Count, IN OUT VOID **Buffer)
 
EFI_STATUS ConSplitterTextInAddDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn)
 
EFI_STATUS ConSplitterTextInDeleteDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn)
 
EFI_STATUS ConSplitterTextInExAddDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx)
 
EFI_STATUS ConSplitterTextInExDeleteDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx)
 
EFI_STATUS ConSplitterSimplePointerAddDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer)
 
EFI_STATUS ConSplitterSimplePointerDeleteDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer)
 
EFI_STATUS ConSplitterAbsolutePointerAddDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer)
 
EFI_STATUS ConSplitterAbsolutePointerDeleteDevice (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer)
 
EFI_STATUS ConSplitterGrowMapTable (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private)
 
EFI_STATUS ConSplitterAddOutputMode (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut)
 
VOID ConSplitterGetIntersection (IN INT32 *TextOutModeMap, IN INT32 *NewlyAddedMap, IN UINTN MapStepSize, IN UINTN NewMapStepSize, IN OUT INT32 *MaxMode, IN OUT INT32 *CurrentMode)
 
VOID ConSplitterSyncOutputMode (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut)
 
EFI_STATUS ConSplitterGetIntersectionBetweenConOutAndStrErr (VOID)
 
EFI_STATUS ConSplitterAddGraphicsOutputMode (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, IN EFI_UGA_DRAW_PROTOCOL *UgaDraw)
 
VOID ConsplitterSetConsoleOutMode (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private)
 
EFI_STATUS ConSplitterTextOutAddDevice (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, IN EFI_UGA_DRAW_PROTOCOL *UgaDraw)
 
EFI_STATUS ConSplitterTextOutDeleteDevice (IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut)
 
EFI_STATUS EFIAPI ConSplitterTextInReset (IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
 
EFI_STATUS ConSplitterTextInExDequeueKey (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, OUT EFI_KEY_DATA *KeyData)
 
EFI_STATUS EFIAPI ConSplitterTextInPrivateReadKeyStroke (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, OUT EFI_INPUT_KEY *Key)
 
EFI_STATUS EFIAPI ConSplitterTextInReadKeyStroke (IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, OUT EFI_INPUT_KEY *Key)
 
VOID EFIAPI ConSplitterTextInWaitForKey (IN EFI_EVENT Event, IN VOID *Context)
 
BOOLEAN IsKeyRegistered (IN EFI_KEY_DATA *RegsiteredData, IN EFI_KEY_DATA *InputData)
 
EFI_STATUS EFIAPI ConSplitterTextInResetEx (IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
 
EFI_STATUS EFIAPI ConSplitterTextInReadKeyStrokeEx (IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, OUT EFI_KEY_DATA *KeyData)
 
EFI_STATUS EFIAPI ConSplitterTextInSetState (IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN EFI_KEY_TOGGLE_STATE *KeyToggleState)
 
EFI_STATUS EFIAPI ConSplitterTextInRegisterKeyNotify (IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN EFI_KEY_DATA *KeyData, IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, OUT VOID **NotifyHandle)
 
EFI_STATUS EFIAPI ConSplitterTextInUnregisterKeyNotify (IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN VOID *NotificationHandle)
 
EFI_STATUS EFIAPI ConSplitterSimplePointerReset (IN EFI_SIMPLE_POINTER_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
 
EFI_STATUS EFIAPI ConSplitterSimplePointerPrivateGetState (IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private, IN OUT EFI_SIMPLE_POINTER_STATE *State)
 
EFI_STATUS EFIAPI ConSplitterSimplePointerGetState (IN EFI_SIMPLE_POINTER_PROTOCOL *This, IN OUT EFI_SIMPLE_POINTER_STATE *State)
 
VOID EFIAPI ConSplitterSimplePointerWaitForInput (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI ConSplitterAbsolutePointerReset (IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
 
EFI_STATUS EFIAPI ConSplitterAbsolutePointerGetState (IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN OUT EFI_ABSOLUTE_POINTER_STATE *State)
 
VOID EFIAPI ConSplitterAbsolutePointerWaitForInput (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI ConSplitterTextOutReset (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
 
EFI_STATUS EFIAPI ConSplitterTextOutOutputString (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
 
EFI_STATUS EFIAPI ConSplitterTextOutTestString (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
 
EFI_STATUS EFIAPI ConSplitterTextOutQueryMode (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows)
 
EFI_STATUS EFIAPI ConSplitterTextOutSetMode (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber)
 
EFI_STATUS EFIAPI ConSplitterTextOutSetAttribute (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Attribute)
 
EFI_STATUS EFIAPI ConSplitterTextOutClearScreen (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This)
 
EFI_STATUS EFIAPI ConSplitterTextOutSetCursorPosition (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Column, IN UINTN Row)
 
EFI_STATUS EFIAPI ConSplitterTextOutEnableCursor (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN Visible)
 

Variables

BOOLEAN mConInIsConnect = FALSE
 
GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn
 
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate
 
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate
 
GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut
 
GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr
 
EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
 
EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
 
EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
 
EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
 
EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
 

Detailed Description

Console Splitter Driver. Any Handle that attached console I/O protocols (Console In device, Console Out device, Console Error device, Simple Pointer protocol, Absolute Pointer protocol) can be bound by this driver.

So far it works like any other driver by opening a SimpleTextIn and/or SimpleTextOut protocol with EFI_OPEN_PROTOCOL_BY_DRIVER attributes. The big difference is this driver does not layer a protocol on the passed in handle, or construct a child handle like a standard device or bus driver. This driver produces three virtual handles as children, one for console input splitter, one for console output splitter and one for error output splitter. These 3 virtual handles would be installed on gST.

Each virtual handle, that supports the Console I/O protocol, will be produced in the driver entry point. The virtual handle are added on driver entry and never removed. Such design ensures system function well during none console device situation.

Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ConSplitter.c.

Function Documentation

◆ ConSplitterAbsolutePointerAddDevice()

EFI_STATUS ConSplitterAbsolutePointerAddDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer 
)

Add Absolute Pointer Device in Consplitter Absolute Pointer list.

Parameters
PrivateText In Splitter pointer.
AbsolutePointerAbsolute Pointer protocol pointer.
Return values
EFI_SUCCESSAbsolute Pointer Device added successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 2169 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerDeleteDevice()

EFI_STATUS ConSplitterAbsolutePointerDeleteDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer 
)

Remove Absolute Pointer Device from Consplitter Absolute Pointer list.

Parameters
PrivateText In Splitter pointer.
AbsolutePointerAbsolute Pointer protocol pointer.
Return values
EFI_SUCCESSAbsolute Pointer Device removed successfully.
EFI_NOT_FOUNDNo Absolute Pointer Device found.

Definition at line 2210 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerDriverBindingStart()

EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Start Absolute Pointer Consplitter on device handle.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to bind driver to.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSAbsolute Pointer Consplitter is added to ControllerHandle.
otherAbsolute Pointer Consplitter does not support this device.

Definition at line 1283 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerDriverBindingStop()

EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing Absolute Pointer protocol.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 1683 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerDriverBindingSupported()

EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if Absolute Pointer protocol could be supported on the Controller.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to test.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
otherThis driver does not support this device.

Definition at line 990 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerGetState()

EFI_STATUS EFIAPI ConSplitterAbsolutePointerGetState ( IN EFI_ABSOLUTE_POINTER_PROTOCOL This,
IN OUT EFI_ABSOLUTE_POINTER_STATE State 
)

Retrieves the current state of a pointer device.

Parameters
ThisProtocol instance pointer.
StateA pointer to the state information on the pointer device.
Return values
EFI_SUCCESSThe state of the pointer device was returned in State..
EFI_NOT_READYThe state of the pointer device has not changed since the last call to GetState().
EFI_DEVICE_ERRORA device error occurred while attempting to retrieve the pointer device's current state.

Definition at line 4414 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerReset()

EFI_STATUS EFIAPI ConSplitterAbsolutePointerReset ( IN EFI_ABSOLUTE_POINTER_PROTOCOL This,
IN BOOLEAN  ExtendedVerification 
)

Resets the pointer device hardware.

Parameters
ThisProtocol instance pointer.
ExtendedVerificationDriver may perform diagnostics on reset.
Return values
EFI_SUCCESSThe device was reset.
EFI_DEVICE_ERRORThe device is not functioning correctly and could not be reset.

Definition at line 4363 of file ConSplitter.c.

◆ ConSplitterAbsolutePointerWaitForInput()

VOID EFIAPI ConSplitterAbsolutePointerWaitForInput ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This event aggregates all the events of the pointer devices in the splitter. If any events of physical pointer devices are signaled, signal the pointer splitter event. This will cause the calling code to call ConSplitterAbsolutePointerGetState ().

Parameters
EventThe Event associated with callback.
ContextContext registered when Event was created.

Definition at line 4533 of file ConSplitter.c.

◆ ConSplitterAddGraphicsOutputMode()

EFI_STATUS ConSplitterAddGraphicsOutputMode ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private,
IN EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput,
IN EFI_UGA_DRAW_PROTOCOL UgaDraw 
)

Add Graphics Output modes into Consplitter Text Out list.

Parameters
PrivateText Out Splitter pointer.
GraphicsOutputGraphics Output protocol pointer.
UgaDrawUGA Draw protocol pointer.
Return values
EFI_SUCCESSOutput mode added successfully.
otherFailed to add output mode.

Definition at line 2747 of file ConSplitter.c.

◆ ConSplitterAddOutputMode()

EFI_STATUS ConSplitterAddOutputMode ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut 
)

Add new device's output mode to console splitter's mode list.

Parameters
PrivateText Out Splitter pointer
TextOutSimple Text Output protocol pointer.
Return values
EFI_SUCCESSDevice added successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 2339 of file ConSplitter.c.

◆ ConSplitterConInDriverBindingStart()

EFI_STATUS EFIAPI ConSplitterConInDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Start Console In Consplitter on device handle.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to bind driver to.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSConsole In Consplitter is added to ControllerHandle.
otherConsole In Consplitter does not support this device.

Definition at line 1171 of file ConSplitter.c.

◆ ConSplitterConInDriverBindingStop()

EFI_STATUS EFIAPI ConSplitterConInDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop Console In ConSplitter on ControllerHandle by closing Console In Device GUID.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 1561 of file ConSplitter.c.

◆ ConSplitterConInDriverBindingSupported()

EFI_STATUS EFIAPI ConSplitterConInDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if Console In Device could be supported on the Controller.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to test.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
otherThis driver does not support this device.

Definition at line 936 of file ConSplitter.c.

◆ ConSplitterConOutDriverBindingStart()

EFI_STATUS EFIAPI ConSplitterConOutDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Start Console Out Consplitter on device handle.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to bind driver to.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSConsole Out Consplitter is added to ControllerHandle.
otherConsole Out Consplitter does not support this device.

Definition at line 1329 of file ConSplitter.c.

◆ ConSplitterConOutDriverBindingStop()

EFI_STATUS EFIAPI ConSplitterConOutDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop Console Out ConSplitter on device handle by closing Console Out Devcie GUID.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 1733 of file ConSplitter.c.

◆ ConSplitterConOutDriverBindingSupported()

EFI_STATUS EFIAPI ConSplitterConOutDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if Console Out Device could be supported on the Controller.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to test.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
otherThis driver does not support this device.

Definition at line 1017 of file ConSplitter.c.

◆ ConSplitterDriverEntry()

EFI_STATUS EFIAPI ConSplitterDriverEntry ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The Entry Point for module ConSplitter. The user code starts with this function.

Installs driver module protocols and. Creates virtual device handles for ConIn, ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol, Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers. Installs Graphics Output protocol and/or UGA Draw protocol if needed.

Parameters
[in]ImageHandleThe firmware allocated handle for the EFI image.
[in]SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point is executed successfully.
otherSome error occurs when executing this entry point.

Definition at line 436 of file ConSplitter.c.

◆ ConSplitterGetIntersection()

VOID ConSplitterGetIntersection ( IN INT32 *  TextOutModeMap,
IN INT32 *  NewlyAddedMap,
IN UINTN  MapStepSize,
IN UINTN  NewMapStepSize,
IN OUT INT32 *  MaxMode,
IN OUT INT32 *  CurrentMode 
)

Reconstruct TextOutModeMap to get intersection of modes.

This routine reconstruct TextOutModeMap to get the intersection of modes for all console out devices. Because EFI/UEFI spec require mode 0 is 80x25, mode 1 is 80x50, this routine will not check the intersection for mode 0 and mode 1.

Parameters
TextOutModeMapCurrent text out mode map, begin with the mode 80x25
NewlyAddedMapNew text out mode map, begin with the mode 80x25
MapStepSizeMode step size for one console device
NewMapStepSizeNew Mode step size for one console device
MaxModeIN: Current max text mode, OUT: Updated max text mode.
CurrentModeIN: Current text mode, OUT: Updated current text mode.

Definition at line 2422 of file ConSplitter.c.

◆ ConSplitterGetIntersectionBetweenConOutAndStrErr()

EFI_STATUS ConSplitterGetIntersectionBetweenConOutAndStrErr ( VOID  )

Sync output device between ConOut and StdErr output.

Return values
EFI_SUCCESSSync implemented successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 2579 of file ConSplitter.c.

◆ ConSplitterGrowBuffer()

EFI_STATUS ConSplitterGrowBuffer ( IN UINTN  ElementSize,
IN OUT UINTN Count,
IN OUT VOID **  Buffer 
)

Take the passed in Buffer of size ElementSize and grow the buffer by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes. Copy the current data in Buffer to the new version of Buffer and free the old version of buffer.

Parameters
ElementSizeSize of element in array.
CountCurrent number of elements in array.
BufferBigger version of passed in Buffer with all the data.
Return values
EFI_SUCCESSBuffer size has grown.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 1834 of file ConSplitter.c.

◆ ConSplitterGrowMapTable()

EFI_STATUS ConSplitterGrowMapTable ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private)

Reallocate Text Out mode map.

Allocate new buffer and copy original buffer into the new buffer.

Parameters
PrivateConsplitter Text Out pointer.
Return values
EFI_SUCCESSBuffer size has grown
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 2247 of file ConSplitter.c.

◆ ConsplitterSetConsoleOutMode()

VOID ConsplitterSetConsoleOutMode ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private)

Set the current console out mode.

This routine will get the current console mode information (column, row) from ConsoleOutMode variable and set it; if the variable does not exist, set to user defined console mode.

Parameters
PrivateConsplitter Text Out pointer.

Definition at line 3051 of file ConSplitter.c.

◆ ConSplitterSimplePointerAddDevice()

EFI_STATUS ConSplitterSimplePointerAddDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_POINTER_PROTOCOL SimplePointer 
)

Add Simple Pointer Device in Consplitter Simple Pointer list.

Parameters
PrivateText In Splitter pointer.
SimplePointerSimple Pointer protocol pointer.
Return values
EFI_SUCCESSSimple Pointer Device added successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 2092 of file ConSplitter.c.

◆ ConSplitterSimplePointerDeleteDevice()

EFI_STATUS ConSplitterSimplePointerDeleteDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_POINTER_PROTOCOL SimplePointer 
)

Remove Simple Pointer Device from Consplitter Simple Pointer list.

Parameters
PrivateText In Splitter pointer.
SimplePointerSimple Pointer protocol pointer.
Return values
EFI_SUCCESSSimple Pointer Device removed successfully.
EFI_NOT_FOUNDNo Simple Pointer Device found.

Definition at line 2133 of file ConSplitter.c.

◆ ConSplitterSimplePointerDriverBindingStart()

EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Start Simple Pointer Consplitter on device handle.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to bind driver to.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSSimple Pointer Consplitter is added to ControllerHandle.
otherSimple Pointer Consplitter does not support this device.

Definition at line 1238 of file ConSplitter.c.

◆ ConSplitterSimplePointerDriverBindingStop()

EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing Simple Pointer protocol.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 1632 of file ConSplitter.c.

◆ ConSplitterSimplePointerDriverBindingSupported()

EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if Simple Pointer protocol could be supported on the Controller.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to test.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
otherThis driver does not support this device.

Definition at line 963 of file ConSplitter.c.

◆ ConSplitterSimplePointerGetState()

EFI_STATUS EFIAPI ConSplitterSimplePointerGetState ( IN EFI_SIMPLE_POINTER_PROTOCOL This,
IN OUT EFI_SIMPLE_POINTER_STATE State 
)

Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existance of a keystroke via WaitForEvent () call.

Parameters
ThisA pointer to protocol instance.
StateA pointer to state information on the pointer device
Return values
EFI_SUCCESSThe keystroke information was returned in State.
EFI_NOT_READYThere was no keystroke data availiable.
EFI_DEVICE_ERRORThe keydtroke information was not returned due to hardware errors.

Definition at line 4293 of file ConSplitter.c.

◆ ConSplitterSimplePointerPrivateGetState()

EFI_STATUS EFIAPI ConSplitterSimplePointerPrivateGetState ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN OUT EFI_SIMPLE_POINTER_STATE State 
)

Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call.

Parameters
PrivateProtocol instance pointer.
StateThe state information of simple pointer device.
Return values
EFI_SUCCESSThe keystroke information was returned.
EFI_NOT_READYThere was no keystroke data availiable.
EFI_DEVICE_ERRORThe keydtroke information was not returned due to hardware errors.

Definition at line 4219 of file ConSplitter.c.

◆ ConSplitterSimplePointerReset()

EFI_STATUS EFIAPI ConSplitterSimplePointerReset ( IN EFI_SIMPLE_POINTER_PROTOCOL This,
IN BOOLEAN  ExtendedVerification 
)

Reset the input device and optionally run diagnostics

Parameters
ThisProtocol instance pointer.
ExtendedVerificationDriver may perform diagnostics on reset.
Return values
EFI_SUCCESSThe device was reset.
EFI_DEVICE_ERRORThe device is not functioning properly and could not be reset.

Definition at line 4170 of file ConSplitter.c.

◆ ConSplitterSimplePointerWaitForInput()

VOID EFIAPI ConSplitterSimplePointerWaitForInput ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This event aggregates all the events of the ConIn devices in the spliter. If any events of physical ConIn devices are signaled, signal the ConIn spliter event. This will cause the calling code to call ConSplitterTextInReadKeyStroke ().

Parameters
EventThe Event associated with callback.
ContextContext registered when Event was created.

Definition at line 4319 of file ConSplitter.c.

◆ ConSplitterStart()

EFI_STATUS ConSplitterStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE  ConSplitterVirtualHandle,
IN EFI_GUID DeviceGuid,
IN EFI_GUID InterfaceGuid,
OUT VOID **  Interface 
)

Start ConSplitter on devcie handle by opening Console Device Guid on device handle and the console virtual handle. And Get the console interface on controller handle.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device.
ConSplitterVirtualHandleConsole virtual Handle.
DeviceGuidThe specified Console Device, such as ConInDev, ConOutDev.
InterfaceGuidThe specified protocol to be opened.
InterfaceProtocol interface returned.
Return values
EFI_SUCCESSThis driver supports this device.
otherFailed to open the specified Console Device Guid or specified protocol.

Definition at line 1075 of file ConSplitter.c.

◆ ConSplitterStdErrDriverBindingStart()

EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Start Standard Error Consplitter on device handle.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to bind driver to.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSStandard Error Consplitter is added to ControllerHandle.
otherStandard Error Consplitter does not support this device.

Definition at line 1445 of file ConSplitter.c.

◆ ConSplitterStdErrDriverBindingStop()

EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE ChildHandleBuffer 
)

Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to stop driver on
NumberOfChildrenNumber of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver.
ChildHandleBufferList of Child Handles to Stop.
Return values
EFI_SUCCESSThis driver is removed ControllerHandle
otherThis driver was not removed from this device

Definition at line 1783 of file ConSplitter.c.

◆ ConSplitterStdErrDriverBindingSupported()

EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL RemainingDevicePath 
)

Test to see if Standard Error Device could be supported on the Controller.

Parameters
ThisDriver Binding protocol instance pointer.
ControllerHandleHandle of device to test.
RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
otherThis driver does not support this device.

Definition at line 1044 of file ConSplitter.c.

◆ ConSplitterStop()

EFI_STATUS ConSplitterStop ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE  ConSplitterVirtualHandle,
IN EFI_GUID DeviceGuid,
IN EFI_GUID InterfaceGuid,
IN VOID **  Interface 
)

Stop ConSplitter on device handle by closing Console Device Guid on device handle and the console virtual handle.

Parameters
ThisProtocol instance pointer.
ControllerHandleHandle of device.
ConSplitterVirtualHandleConsole virtual Handle.
DeviceGuidThe specified Console Device, such as ConInDev, ConOutDev.
InterfaceGuidThe specified protocol to be opened.
InterfaceProtocol interface returned.
Return values
EFI_SUCCESSStop ConSplitter on ControllerHandle successfully.
otherFailed to Stop ConSplitter on ControllerHandle.

Definition at line 1503 of file ConSplitter.c.

◆ ConSplitterSupported()

EFI_STATUS ConSplitterSupported ( IN EFI_DRIVER_BINDING_PROTOCOL This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_GUID Guid 
)

Test to see if the specified protocol could be supported on the specified device.

Parameters
ThisDriver Binding protocol pointer.
ControllerHandleHandle of device to test.
GuidThe specified protocol.
Return values
EFI_SUCCESSThe specified protocol is supported on this device.
EFI_UNSUPPORTEDThe specified protocol attempts to be installed on virtual handle.
otherFailed to open specified protocol on this device.

Definition at line 876 of file ConSplitter.c.

◆ ConSplitterSyncOutputMode()

VOID ConSplitterSyncOutputMode ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut 
)

Sync the device's output mode to console splitter's mode list.

Parameters
PrivateText Out Splitter pointer.
TextOutSimple Text Output protocol pointer.

Definition at line 2490 of file ConSplitter.c.

◆ ConSplitterTextInAddDevice()

EFI_STATUS ConSplitterTextInAddDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn 
)

Add Text Input Device in Consplitter Text Input list.

Parameters
PrivateText In Splitter pointer.
TextInSimple Text Input protocol pointer.
Return values
EFI_SUCCESSText Input Device added successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 1872 of file ConSplitter.c.

◆ ConSplitterTextInConstructor()

EFI_STATUS ConSplitterTextInConstructor ( TEXT_IN_SPLITTER_PRIVATE_DATA ConInPrivate)

Construct console input devices' private data.

Parameters
ConInPrivateA pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA structure.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSText Input Device's private data has been constructed.
otherFailed to construct private data.

Definition at line 603 of file ConSplitter.c.

◆ ConSplitterTextInDeleteDevice()

EFI_STATUS ConSplitterTextInDeleteDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn 
)

Remove Text Input Device from Consplitter Text Input list.

Parameters
PrivateText In Splitter pointer.
TextInSimple Text protocol pointer.
Return values
EFI_SUCCESSSimple Text Device removed successfully.
EFI_NOT_FOUNDNo Simple Text Device found.

Definition at line 1918 of file ConSplitter.c.

◆ ConSplitterTextInExAddDevice()

EFI_STATUS ConSplitterTextInExAddDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx 
)

Add Text Input Ex Device in Consplitter Text Input Ex list.

Parameters
PrivateText In Splitter pointer.
TextInExSimple Text Input Ex Input protocol pointer.
Return values
EFI_SUCCESSText Input Ex Device added successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 1954 of file ConSplitter.c.

◆ ConSplitterTextInExDeleteDevice()

EFI_STATUS ConSplitterTextInExDeleteDevice ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx 
)

Remove Text Ex Device from Consplitter Text Input Ex list.

Parameters
PrivateText In Splitter pointer.
TextInExSimple Text Ex protocol pointer.
Return values
EFI_SUCCESSSimple Text Input Ex Device removed successfully.
EFI_NOT_FOUNDNo Simple Text Input Ex Device found.

Definition at line 2056 of file ConSplitter.c.

◆ ConSplitterTextInExDequeueKey()

EFI_STATUS ConSplitterTextInExDequeueKey ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
OUT EFI_KEY_DATA KeyData 
)

Dequeue the saved key from internal key queue.

Parameters
PrivateProtocol instance pointer.
KeyDataA pointer to a buffer that is filled in with the keystroke state data for the key that was pressed.
Return values
EFI_NOT_FOUNDQueue is empty.
EFI_SUCCESSFirst key is dequeued and returned.

Definition at line 3521 of file ConSplitter.c.

◆ ConSplitterTextInPrivateReadKeyStroke()

EFI_STATUS EFIAPI ConSplitterTextInPrivateReadKeyStroke ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private,
OUT EFI_INPUT_KEY Key 
)

Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call.

Parameters
PrivateProtocol instance pointer.
KeyDriver may perform diagnostics on reset.
Return values
EFI_SUCCESSThe keystroke information was returned.
EFI_NOT_READYThere was no keystroke data availiable.
EFI_DEVICE_ERRORThe keydtroke information was not returned due to hardware errors.
EFI_UNSUPPORTEDThe device does not support the ability to read keystroke data.

Definition at line 3560 of file ConSplitter.c.

◆ ConSplitterTextInReadKeyStroke()

EFI_STATUS EFIAPI ConSplitterTextInReadKeyStroke ( IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL This,
OUT EFI_INPUT_KEY Key 
)

Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call.

Parameters
ThisProtocol instance pointer.
KeyDriver may perform diagnostics on reset.
Return values
EFI_SUCCESSThe keystroke information was returned.
EFI_NOT_READYThere was no keystroke data availiable.
EFI_DEVICE_ERRORThe keydtroke information was not returned due to hardware errors.
EFI_UNSUPPORTEDThe device does not support the ability to read keystroke data.

Definition at line 3634 of file ConSplitter.c.

◆ ConSplitterTextInReadKeyStrokeEx()

EFI_STATUS EFIAPI ConSplitterTextInReadKeyStrokeEx ( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL This,
OUT EFI_KEY_DATA KeyData 
)

Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call.

Parameters
ThisProtocol instance pointer.
KeyDataA pointer to a buffer that is filled in with the keystroke state data for the key that was pressed.
Return values
EFI_SUCCESSThe keystroke information was returned.
EFI_NOT_READYThere was no keystroke data availiable.
EFI_DEVICE_ERRORThe keystroke information was not returned due to hardware errors.
EFI_INVALID_PARAMETERKeyData is NULL.
EFI_UNSUPPORTEDThe device does not support the ability to read keystroke data.

Definition at line 3818 of file ConSplitter.c.

◆ ConSplitterTextInRegisterKeyNotify()

EFI_STATUS EFIAPI ConSplitterTextInRegisterKeyNotify ( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL This,
IN EFI_KEY_DATA KeyData,
IN EFI_KEY_NOTIFY_FUNCTION  KeyNotificationFunction,
OUT VOID **  NotifyHandle 
)

Register a notification function for a particular keystroke for the input device.

Parameters
ThisProtocol instance pointer.
KeyDataA pointer to a buffer that is filled in with the keystroke information for the key that was pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState and KeyData.KeyState.KeyShiftState are 0, then any incomplete keystroke will trigger a notification of the KeyNotificationFunction.
KeyNotificationFunctionPoints to the function to be called when the key sequence is typed specified by KeyData. This notification function should be called at <=TPL_CALLBACK.
NotifyHandlePoints to the unique handle assigned to the registered notification.
Return values
EFI_SUCCESSThe notification function was registered successfully.
EFI_OUT_OF_RESOURCESUnable to allocate resources for necessary data structures.
EFI_INVALID_PARAMETERKeyData or KeyNotificationFunction or NotifyHandle is NULL.

Definition at line 4017 of file ConSplitter.c.

◆ ConSplitterTextInReset()

EFI_STATUS EFIAPI ConSplitterTextInReset ( IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL This,
IN BOOLEAN  ExtendedVerification 
)

Reset the input device and optionally run diagnostics

Parameters
ThisProtocol instance pointer.
ExtendedVerificationDriver may perform diagnostics on reset.
Return values
EFI_SUCCESSThe device was reset.
EFI_DEVICE_ERRORThe device is not functioning properly and could not be reset.

Definition at line 3472 of file ConSplitter.c.

◆ ConSplitterTextInResetEx()

EFI_STATUS EFIAPI ConSplitterTextInResetEx ( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL This,
IN BOOLEAN  ExtendedVerification 
)

Reset the input device and optionally run diagnostics

Parameters
ThisProtocol instance pointer.
ExtendedVerificationDriver may perform diagnostics on reset.
Return values
EFI_SUCCESSThe device was reset.
EFI_DEVICE_ERRORThe device is not functioning properly and could not be reset.

Definition at line 3760 of file ConSplitter.c.

◆ ConSplitterTextInSetState()

EFI_STATUS EFIAPI ConSplitterTextInSetState ( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL This,
IN EFI_KEY_TOGGLE_STATE KeyToggleState 
)

Set certain state for the input device.

Parameters
ThisProtocol instance pointer.
KeyToggleStateA pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device.
Return values
EFI_SUCCESSThe device state was set successfully.
EFI_DEVICE_ERRORThe device is not functioning correctly and could not have the setting adjusted.
EFI_UNSUPPORTEDThe device does not have the ability to set its state.
EFI_INVALID_PARAMETERKeyToggleState is NULL.

Definition at line 3945 of file ConSplitter.c.

◆ ConSplitterTextInUnregisterKeyNotify()

EFI_STATUS EFIAPI ConSplitterTextInUnregisterKeyNotify ( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL This,
IN VOID *  NotificationHandle 
)

Remove a registered notification function from a particular keystroke.

Parameters
ThisProtocol instance pointer.
NotificationHandleThe handle of the notification function being unregistered.
Return values
EFI_SUCCESSThe notification function was unregistered successfully.
EFI_INVALID_PARAMETERThe NotificationHandle is invalid.

Definition at line 4117 of file ConSplitter.c.

◆ ConSplitterTextInWaitForKey()

VOID EFIAPI ConSplitterTextInWaitForKey ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This event aggregates all the events of the ConIn devices in the spliter.

If any events of physical ConIn devices are signaled, signal the ConIn spliter event. This will cause the calling code to call ConSplitterTextInReadKeyStroke ().

Parameters
EventThe Event associated with callback.
ContextContext registered when Event was created.

Definition at line 3670 of file ConSplitter.c.

◆ ConSplitterTextOutAddDevice()

EFI_STATUS ConSplitterTextOutAddDevice ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut,
IN EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput,
IN EFI_UGA_DRAW_PROTOCOL UgaDraw 
)

Add Text Output Device in Consplitter Text Output list.

Parameters
PrivateText Out Splitter pointer.
TextOutSimple Text Output protocol pointer.
GraphicsOutputGraphics Output protocol pointer.
UgaDrawUGA Draw protocol pointer.
Return values
EFI_SUCCESSText Output Device added successfully.
EFI_OUT_OF_RESOURCESCould not grow the buffer size.

Definition at line 3140 of file ConSplitter.c.

◆ ConSplitterTextOutClearScreen()

EFI_STATUS EFIAPI ConSplitterTextOutClearScreen ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This)

Clears the output device(s) display to the currently selected background color.

Parameters
ThisProtocol instance pointer.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_DEVICE_ERRORThe device had an error and could not complete the request.
EFI_UNSUPPORTEDThe output device is not in a valid text mode.

Definition at line 4978 of file ConSplitter.c.

◆ ConSplitterTextOutConstructor()

EFI_STATUS ConSplitterTextOutConstructor ( TEXT_OUT_SPLITTER_PRIVATE_DATA ConOutPrivate)

Construct console output devices' private data.

Parameters
ConOutPrivateA pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA structure.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSText Input Devcie's private data has been constructed.

Definition at line 750 of file ConSplitter.c.

◆ ConSplitterTextOutDeleteDevice()

EFI_STATUS ConSplitterTextOutDeleteDevice ( IN TEXT_OUT_SPLITTER_PRIVATE_DATA Private,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut 
)

Remove Text Out Device in Consplitter Text Out list.

Parameters
PrivateText Out Splitter pointer.
TextOutSimple Text Output Pointer protocol pointer.
Return values
EFI_SUCCESSText Out Device removed successfully.
EFI_NOT_FOUNDNo Text Out Device found.

Definition at line 3337 of file ConSplitter.c.

◆ ConSplitterTextOutEnableCursor()

EFI_STATUS EFIAPI ConSplitterTextOutEnableCursor ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN BOOLEAN  Visible 
)

Makes the cursor visible or invisible

Parameters
ThisProtocol instance pointer.
VisibleIf TRUE, the cursor is set to be visible. If FALSE, the cursor is set to be invisible.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_DEVICE_ERRORThe device had an error and could not complete the request, or the device does not support changing the cursor mode.
EFI_UNSUPPORTEDThe output device is not in a valid text mode.

Definition at line 5110 of file ConSplitter.c.

◆ ConSplitterTextOutOutputString()

EFI_STATUS EFIAPI ConSplitterTextOutOutputString ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN CHAR16 *  WString 
)

Write a Unicode string to the output device.

Parameters
ThisProtocol instance pointer.
WStringThe NULL-terminated Unicode string to be displayed on the output device(s). All output devices must also support the Unicode drawing defined in this file.
Return values
EFI_SUCCESSThe string was output to the device.
EFI_DEVICE_ERRORThe device reported an error while attempting to output the text.
EFI_UNSUPPORTEDThe output device's mode is not currently in a defined text mode.
EFI_WARN_UNKNOWN_GLYPHThis warning code indicates that some of the characters in the Unicode string could not be rendered and were skipped.

Definition at line 4635 of file ConSplitter.c.

◆ ConSplitterTextOutQueryMode()

EFI_STATUS EFIAPI ConSplitterTextOutQueryMode ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN UINTN  ModeNumber,
OUT UINTN Columns,
OUT UINTN Rows 
)

Returns information for an available text mode that the output device(s) supports.

Parameters
ThisProtocol instance pointer.
ModeNumberThe mode number to return information on.
ColumnsReturns the columns of the text output device for the requested ModeNumber.
RowsReturns the rows of the text output device for the requested ModeNumber.
Return values
EFI_SUCCESSThe requested mode information was returned.
EFI_DEVICE_ERRORThe device had an error and could not complete the request.
EFI_UNSUPPORTEDThe mode number was not valid.

Definition at line 4788 of file ConSplitter.c.

◆ ConSplitterTextOutReset()

EFI_STATUS EFIAPI ConSplitterTextOutReset ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN BOOLEAN  ExtendedVerification 
)

Reset the text output device hardware and optionally run diagnostics

Parameters
ThisProtocol instance pointer.
ExtendedVerificationDriver may perform more exhaustive verification operation of the device during reset.
Return values
EFI_SUCCESSThe text output device was reset.
EFI_DEVICE_ERRORThe text output device is not functioning correctly and could not be reset.

Definition at line 4579 of file ConSplitter.c.

◆ ConSplitterTextOutSetAttribute()

EFI_STATUS EFIAPI ConSplitterTextOutSetAttribute ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN UINTN  Attribute 
)

Sets the background and foreground colors for the OutputString () and ClearScreen () functions.

Parameters
ThisProtocol instance pointer.
AttributeThe attribute to set. Bits 0..3 are the foreground color, and bits 4..6 are the background color. All other bits are undefined and must be zero. The valid Attributes are defined in this file.
Return values
EFI_SUCCESSThe attribute was set.
EFI_DEVICE_ERRORThe device had an error and could not complete the request.
EFI_UNSUPPORTEDThe attribute requested is not defined.

Definition at line 4927 of file ConSplitter.c.

◆ ConSplitterTextOutSetCursorPosition()

EFI_STATUS EFIAPI ConSplitterTextOutSetCursorPosition ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN UINTN  Column,
IN UINTN  Row 
)

Sets the current coordinates of the cursor position

Parameters
ThisProtocol instance pointer.
ColumnThe column position to set the cursor to. Must be greater than or equal to zero and less than the number of columns by QueryMode ().
RowThe row position to set the cursor to. Must be greater than or equal to zero and less than the number of rows by QueryMode ().
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_DEVICE_ERRORThe device had an error and could not complete the request.
EFI_UNSUPPORTEDThe output device is not in a valid text mode, or the cursor position is invalid for the current mode.

Definition at line 5032 of file ConSplitter.c.

◆ ConSplitterTextOutSetMode()

EFI_STATUS EFIAPI ConSplitterTextOutSetMode ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN UINTN  ModeNumber 
)

Sets the output device(s) to a specified mode.

Parameters
ThisProtocol instance pointer.
ModeNumberThe mode number to set.
Return values
EFI_SUCCESSThe requested text mode was set.
EFI_DEVICE_ERRORThe device had an error and could not complete the request.
EFI_UNSUPPORTEDThe mode number was not valid.

Definition at line 4847 of file ConSplitter.c.

◆ ConSplitterTextOutTestString()

EFI_STATUS EFIAPI ConSplitterTextOutTestString ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL This,
IN CHAR16 *  WString 
)

Verifies that all characters in a Unicode string can be output to the target device.

Parameters
ThisProtocol instance pointer.
WStringThe NULL-terminated Unicode string to be examined for the output device(s).
Return values
EFI_SUCCESSThe device(s) are capable of rendering the output string.
EFI_UNSUPPORTEDSome of the characters in the Unicode string cannot be rendered by one or more of the output devices mapped by the EFI handle.

Definition at line 4736 of file ConSplitter.c.

◆ IsKeyRegistered()

BOOLEAN IsKeyRegistered ( IN EFI_KEY_DATA RegsiteredData,
IN EFI_KEY_DATA InputData 
)

Test if the key has been registered on input device.

Parameters
RegsiteredDataA pointer to a buffer that is filled in with the keystroke state data for the key that was registered.
InputDataA pointer to a buffer that is filled in with the keystroke state data for the key that was pressed.
Return values
TRUEKey be pressed matches a registered key.
FALSEMatch failed.

Definition at line 3716 of file ConSplitter.c.

◆ ToggleStateSyncInitialization()

VOID ToggleStateSyncInitialization ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private)

Initialization for toggle state sync.

Parameters
PrivateText In Splitter pointer.

Definition at line 346 of file ConSplitter.c.

◆ ToggleStateSyncKeyNotify()

EFI_STATUS EFIAPI ToggleStateSyncKeyNotify ( IN EFI_KEY_DATA KeyData)

Key notify for toggle state sync.

Parameters
KeyDataA pointer to a buffer that is filled in with the keystroke information for the key that was pressed.
Return values
EFI_SUCCESSToggle state sync successfully.

Definition at line 313 of file ConSplitter.c.

◆ ToggleStateSyncReInitialization()

VOID ToggleStateSyncReInitialization ( IN TEXT_IN_SPLITTER_PRIVATE_DATA Private)

Re-initialization for toggle state sync.

Parameters
PrivateText In Splitter pointer.

Definition at line 390 of file ConSplitter.c.

Variable Documentation

◆ gConSplitterAbsolutePointerDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding
Initial value:
= {
0xa,
}
EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:990
EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: ConSplitter.c:1683
EFI_STATUS EFIAPI ConSplitterAbsolutePointerDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1283
#define NULL
Definition: Base.h:319

Definition at line 292 of file ConSplitter.c.

◆ gConSplitterConInDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding
Initial value:
= {
0xa,
}
EFI_STATUS EFIAPI ConSplitterConInDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1171
EFI_STATUS EFIAPI ConSplitterConInDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: ConSplitter.c:1561
EFI_STATUS EFIAPI ConSplitterConInDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:936

Definition at line 244 of file ConSplitter.c.

◆ gConSplitterConOutDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding
Initial value:
= {
0xa,
}
EFI_STATUS EFIAPI ConSplitterConOutDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1329
EFI_STATUS EFIAPI ConSplitterConOutDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: ConSplitter.c:1733
EFI_STATUS EFIAPI ConSplitterConOutDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1017

Definition at line 256 of file ConSplitter.c.

◆ gConSplitterSimplePointerDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding
Initial value:
= {
0xa,
}
EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:963
EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1238
EFI_STATUS EFIAPI ConSplitterSimplePointerDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: ConSplitter.c:1632

Definition at line 280 of file ConSplitter.c.

◆ gConSplitterStdErrDriverBinding

EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding
Initial value:
= {
0xa,
}
EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: ConSplitter.c:1783
EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1044
EFI_STATUS EFIAPI ConSplitterStdErrDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: ConSplitter.c:1445

Definition at line 268 of file ConSplitter.c.

◆ mConIn

◆ mConInIsConnect

BOOLEAN mConInIsConnect = FALSE

Definition at line 31 of file ConSplitter.c.

◆ mConOut

◆ mGraphicsOutputProtocolTemplate

Initial value:
= {
}
EFI_STATUS EFIAPI ConSplitterGraphicsOutputBlt(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)
EFI_STATUS EFIAPI ConSplitterGraphicsOutputSetMode(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber)
EFI_STATUS EFIAPI ConSplitterGraphicsOutputQueryMode(IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber, OUT UINTN *SizeOfInfo, OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info)

Definition at line 122 of file ConSplitter.c.

◆ mStdErr

◆ mUgaDrawProtocolTemplate

Initial value:
= {
}
EFI_STATUS EFIAPI ConSplitterUgaDrawGetMode(IN EFI_UGA_DRAW_PROTOCOL *This, OUT UINT32 *HorizontalResolution, OUT UINT32 *VerticalResolution, OUT UINT32 *ColorDepth, OUT UINT32 *RefreshRate)
EFI_STATUS EFIAPI ConSplitterUgaDrawBlt(IN EFI_UGA_DRAW_PROTOCOL *This, IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, IN EFI_UGA_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)
EFI_STATUS EFIAPI ConSplitterUgaDrawSetMode(IN EFI_UGA_DRAW_PROTOCOL *This, IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, IN UINT32 ColorDepth, IN UINT32 RefreshRate)

Definition at line 113 of file ConSplitter.c.