TianoCore EDK2 master
|
#include "ConSplitter.h"
Go to the source code of this file.
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.
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.
Private | Text In Splitter pointer. |
AbsolutePointer | Absolute Pointer protocol pointer. |
EFI_SUCCESS | Absolute Pointer Device added successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 2169 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
AbsolutePointer | Absolute Pointer protocol pointer. |
EFI_SUCCESS | Absolute Pointer Device removed successfully. |
EFI_NOT_FOUND | No Absolute Pointer Device found. |
Definition at line 2210 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to bind driver to. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | Absolute Pointer Consplitter is added to ControllerHandle. |
other | Absolute Pointer Consplitter does not support this device. |
Definition at line 1283 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to stop driver on |
NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 1683 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to test. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
other | This driver does not support this device. |
Definition at line 990 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
State | A pointer to the state information on the pointer device. |
EFI_SUCCESS | The state of the pointer device was returned in State.. |
EFI_NOT_READY | The state of the pointer device has not changed since the last call to GetState(). |
EFI_DEVICE_ERROR | A device error occurred while attempting to retrieve the pointer device's current state. |
Definition at line 4414 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterAbsolutePointerReset | ( | IN EFI_ABSOLUTE_POINTER_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Resets the pointer device hardware.
This | Protocol instance pointer. |
ExtendedVerification | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning correctly and could not be reset. |
Definition at line 4363 of file ConSplitter.c.
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 ().
Event | The Event associated with callback. |
Context | Context registered when Event was created. |
Definition at line 4533 of file ConSplitter.c.
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.
Private | Text Out Splitter pointer. |
GraphicsOutput | Graphics Output protocol pointer. |
UgaDraw | UGA Draw protocol pointer. |
EFI_SUCCESS | Output mode added successfully. |
other | Failed to add output mode. |
Definition at line 2747 of file ConSplitter.c.
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.
Private | Text Out Splitter pointer |
TextOut | Simple Text Output protocol pointer. |
EFI_SUCCESS | Device added successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 2339 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to bind driver to. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | Console In Consplitter is added to ControllerHandle. |
other | Console In Consplitter does not support this device. |
Definition at line 1171 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to stop driver on |
NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 1561 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to test. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
other | This driver does not support this device. |
Definition at line 936 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to bind driver to. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | Console Out Consplitter is added to ControllerHandle. |
other | Console Out Consplitter does not support this device. |
Definition at line 1329 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to stop driver on |
NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 1733 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to test. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
other | This driver does not support this device. |
Definition at line 1017 of file ConSplitter.c.
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.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The entry point is executed successfully. |
other | Some error occurs when executing this entry point. |
Definition at line 436 of file ConSplitter.c.
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.
TextOutModeMap | Current text out mode map, begin with the mode 80x25 |
NewlyAddedMap | New text out mode map, begin with the mode 80x25 |
MapStepSize | Mode step size for one console device |
NewMapStepSize | New Mode step size for one console device |
MaxMode | IN: Current max text mode, OUT: Updated max text mode. |
CurrentMode | IN: Current text mode, OUT: Updated current text mode. |
Definition at line 2422 of file ConSplitter.c.
EFI_STATUS ConSplitterGetIntersectionBetweenConOutAndStrErr | ( | VOID | ) |
Sync output device between ConOut and StdErr output.
EFI_SUCCESS | Sync implemented successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 2579 of file ConSplitter.c.
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.
ElementSize | Size of element in array. |
Count | Current number of elements in array. |
Buffer | Bigger version of passed in Buffer with all the data. |
EFI_SUCCESS | Buffer size has grown. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 1834 of file ConSplitter.c.
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.
Private | Consplitter Text Out pointer. |
EFI_SUCCESS | Buffer size has grown |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 2247 of file ConSplitter.c.
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.
Private | Consplitter Text Out pointer. |
Definition at line 3051 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
SimplePointer | Simple Pointer protocol pointer. |
EFI_SUCCESS | Simple Pointer Device added successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 2092 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
SimplePointer | Simple Pointer protocol pointer. |
EFI_SUCCESS | Simple Pointer Device removed successfully. |
EFI_NOT_FOUND | No Simple Pointer Device found. |
Definition at line 2133 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to bind driver to. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | Simple Pointer Consplitter is added to ControllerHandle. |
other | Simple Pointer Consplitter does not support this device. |
Definition at line 1238 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to stop driver on |
NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 1632 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to test. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
other | This driver does not support this device. |
Definition at line 963 of file ConSplitter.c.
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.
This | A pointer to protocol instance. |
State | A pointer to state information on the pointer device |
EFI_SUCCESS | The keystroke information was returned in State. |
EFI_NOT_READY | There was no keystroke data availiable. |
EFI_DEVICE_ERROR | The keydtroke information was not returned due to hardware errors. |
Definition at line 4293 of file ConSplitter.c.
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.
Private | Protocol instance pointer. |
State | The state information of simple pointer device. |
EFI_SUCCESS | The keystroke information was returned. |
EFI_NOT_READY | There was no keystroke data availiable. |
EFI_DEVICE_ERROR | The keydtroke information was not returned due to hardware errors. |
Definition at line 4219 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterSimplePointerReset | ( | IN EFI_SIMPLE_POINTER_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Reset the input device and optionally run diagnostics
This | Protocol instance pointer. |
ExtendedVerification | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning properly and could not be reset. |
Definition at line 4170 of file ConSplitter.c.
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 ().
Event | The Event associated with callback. |
Context | Context registered when Event was created. |
Definition at line 4319 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device. |
ConSplitterVirtualHandle | Console virtual Handle. |
DeviceGuid | The specified Console Device, such as ConInDev, ConOutDev. |
InterfaceGuid | The specified protocol to be opened. |
Interface | Protocol interface returned. |
EFI_SUCCESS | This driver supports this device. |
other | Failed to open the specified Console Device Guid or specified protocol. |
Definition at line 1075 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to bind driver to. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | Standard Error Consplitter is added to ControllerHandle. |
other | Standard Error Consplitter does not support this device. |
Definition at line 1445 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to stop driver on |
NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 1783 of file ConSplitter.c.
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.
This | Driver Binding protocol instance pointer. |
ControllerHandle | Handle of device to test. |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
other | This driver does not support this device. |
Definition at line 1044 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
ControllerHandle | Handle of device. |
ConSplitterVirtualHandle | Console virtual Handle. |
DeviceGuid | The specified Console Device, such as ConInDev, ConOutDev. |
InterfaceGuid | The specified protocol to be opened. |
Interface | Protocol interface returned. |
EFI_SUCCESS | Stop ConSplitter on ControllerHandle successfully. |
other | Failed to Stop ConSplitter on ControllerHandle. |
Definition at line 1503 of file ConSplitter.c.
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.
This | Driver Binding protocol pointer. |
ControllerHandle | Handle of device to test. |
Guid | The specified protocol. |
EFI_SUCCESS | The specified protocol is supported on this device. |
EFI_UNSUPPORTED | The specified protocol attempts to be installed on virtual handle. |
other | Failed to open specified protocol on this device. |
Definition at line 876 of file ConSplitter.c.
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.
Private | Text Out Splitter pointer. |
TextOut | Simple Text Output protocol pointer. |
Definition at line 2490 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
TextIn | Simple Text Input protocol pointer. |
EFI_SUCCESS | Text Input Device added successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 1872 of file ConSplitter.c.
EFI_STATUS ConSplitterTextInConstructor | ( | TEXT_IN_SPLITTER_PRIVATE_DATA * | ConInPrivate | ) |
Construct console input devices' private data.
ConInPrivate | A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA structure. |
EFI_OUT_OF_RESOURCES | Out of resources. |
EFI_SUCCESS | Text Input Device's private data has been constructed. |
other | Failed to construct private data. |
Definition at line 603 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
TextIn | Simple Text protocol pointer. |
EFI_SUCCESS | Simple Text Device removed successfully. |
EFI_NOT_FOUND | No Simple Text Device found. |
Definition at line 1918 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
TextInEx | Simple Text Input Ex Input protocol pointer. |
EFI_SUCCESS | Text Input Ex Device added successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 1954 of file ConSplitter.c.
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.
Private | Text In Splitter pointer. |
TextInEx | Simple Text Ex protocol pointer. |
EFI_SUCCESS | Simple Text Input Ex Device removed successfully. |
EFI_NOT_FOUND | No Simple Text Input Ex Device found. |
Definition at line 2056 of file ConSplitter.c.
EFI_STATUS ConSplitterTextInExDequeueKey | ( | IN TEXT_IN_SPLITTER_PRIVATE_DATA * | Private, |
OUT EFI_KEY_DATA * | KeyData | ||
) |
Dequeue the saved key from internal key queue.
Private | Protocol instance pointer. |
KeyData | A pointer to a buffer that is filled in with the keystroke state data for the key that was pressed. |
EFI_NOT_FOUND | Queue is empty. |
EFI_SUCCESS | First key is dequeued and returned. |
Definition at line 3521 of file ConSplitter.c.
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.
Private | Protocol instance pointer. |
Key | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The keystroke information was returned. |
EFI_NOT_READY | There was no keystroke data availiable. |
EFI_DEVICE_ERROR | The keydtroke information was not returned due to hardware errors. |
EFI_UNSUPPORTED | The device does not support the ability to read keystroke data. |
Definition at line 3560 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
Key | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The keystroke information was returned. |
EFI_NOT_READY | There was no keystroke data availiable. |
EFI_DEVICE_ERROR | The keydtroke information was not returned due to hardware errors. |
EFI_UNSUPPORTED | The device does not support the ability to read keystroke data. |
Definition at line 3634 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
KeyData | A pointer to a buffer that is filled in with the keystroke state data for the key that was pressed. |
EFI_SUCCESS | The keystroke information was returned. |
EFI_NOT_READY | There was no keystroke data availiable. |
EFI_DEVICE_ERROR | The keystroke information was not returned due to hardware errors. |
EFI_INVALID_PARAMETER | KeyData is NULL. |
EFI_UNSUPPORTED | The device does not support the ability to read keystroke data. |
Definition at line 3818 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
KeyData | A 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. |
KeyNotificationFunction | Points to the function to be called when the key sequence is typed specified by KeyData. This notification function should be called at <=TPL_CALLBACK. |
NotifyHandle | Points to the unique handle assigned to the registered notification. |
EFI_SUCCESS | The notification function was registered successfully. |
EFI_OUT_OF_RESOURCES | Unable to allocate resources for necessary data structures. |
EFI_INVALID_PARAMETER | KeyData or KeyNotificationFunction or NotifyHandle is NULL. |
Definition at line 4017 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextInReset | ( | IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Reset the input device and optionally run diagnostics
This | Protocol instance pointer. |
ExtendedVerification | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning properly and could not be reset. |
Definition at line 3472 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextInResetEx | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Reset the input device and optionally run diagnostics
This | Protocol instance pointer. |
ExtendedVerification | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning properly and could not be reset. |
Definition at line 3760 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
KeyToggleState | A pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device. |
EFI_SUCCESS | The device state was set successfully. |
EFI_DEVICE_ERROR | The device is not functioning correctly and could not have the setting adjusted. |
EFI_UNSUPPORTED | The device does not have the ability to set its state. |
EFI_INVALID_PARAMETER | KeyToggleState is NULL. |
Definition at line 3945 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextInUnregisterKeyNotify | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
IN VOID * | NotificationHandle | ||
) |
Remove a registered notification function from a particular keystroke.
This | Protocol instance pointer. |
NotificationHandle | The handle of the notification function being unregistered. |
EFI_SUCCESS | The notification function was unregistered successfully. |
EFI_INVALID_PARAMETER | The NotificationHandle is invalid. |
Definition at line 4117 of file ConSplitter.c.
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 ().
Event | The Event associated with callback. |
Context | Context registered when Event was created. |
Definition at line 3670 of file ConSplitter.c.
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.
Private | Text Out Splitter pointer. |
TextOut | Simple Text Output protocol pointer. |
GraphicsOutput | Graphics Output protocol pointer. |
UgaDraw | UGA Draw protocol pointer. |
EFI_SUCCESS | Text Output Device added successfully. |
EFI_OUT_OF_RESOURCES | Could not grow the buffer size. |
Definition at line 3140 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextOutClearScreen | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This | ) |
Clears the output device(s) display to the currently selected background color.
This | Protocol instance pointer. |
EFI_SUCCESS | The operation completed successfully. |
EFI_DEVICE_ERROR | The device had an error and could not complete the request. |
EFI_UNSUPPORTED | The output device is not in a valid text mode. |
Definition at line 4978 of file ConSplitter.c.
EFI_STATUS ConSplitterTextOutConstructor | ( | TEXT_OUT_SPLITTER_PRIVATE_DATA * | ConOutPrivate | ) |
Construct console output devices' private data.
ConOutPrivate | A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA structure. |
EFI_OUT_OF_RESOURCES | Out of resources. |
EFI_SUCCESS | Text Input Devcie's private data has been constructed. |
Definition at line 750 of file ConSplitter.c.
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.
Private | Text Out Splitter pointer. |
TextOut | Simple Text Output Pointer protocol pointer. |
EFI_SUCCESS | Text Out Device removed successfully. |
EFI_NOT_FOUND | No Text Out Device found. |
Definition at line 3337 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextOutEnableCursor | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN BOOLEAN | Visible | ||
) |
Makes the cursor visible or invisible
This | Protocol instance pointer. |
Visible | If TRUE, the cursor is set to be visible. If FALSE, the cursor is set to be invisible. |
EFI_SUCCESS | The operation completed successfully. |
EFI_DEVICE_ERROR | The device had an error and could not complete the request, or the device does not support changing the cursor mode. |
EFI_UNSUPPORTED | The output device is not in a valid text mode. |
Definition at line 5110 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextOutOutputString | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN CHAR16 * | WString | ||
) |
Write a Unicode string to the output device.
This | Protocol instance pointer. |
WString | The 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. |
EFI_SUCCESS | The string was output to the device. |
EFI_DEVICE_ERROR | The device reported an error while attempting to output the text. |
EFI_UNSUPPORTED | The output device's mode is not currently in a defined text mode. |
EFI_WARN_UNKNOWN_GLYPH | This 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.
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.
This | Protocol instance pointer. |
ModeNumber | The mode number to return information on. |
Columns | Returns the columns of the text output device for the requested ModeNumber. |
Rows | Returns the rows of the text output device for the requested ModeNumber. |
EFI_SUCCESS | The requested mode information was returned. |
EFI_DEVICE_ERROR | The device had an error and could not complete the request. |
EFI_UNSUPPORTED | The mode number was not valid. |
Definition at line 4788 of file ConSplitter.c.
EFI_STATUS EFIAPI ConSplitterTextOutReset | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Reset the text output device hardware and optionally run diagnostics
This | Protocol instance pointer. |
ExtendedVerification | Driver may perform more exhaustive verification operation of the device during reset. |
EFI_SUCCESS | The text output device was reset. |
EFI_DEVICE_ERROR | The text output device is not functioning correctly and could not be reset. |
Definition at line 4579 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
Attribute | The 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. |
EFI_SUCCESS | The attribute was set. |
EFI_DEVICE_ERROR | The device had an error and could not complete the request. |
EFI_UNSUPPORTED | The attribute requested is not defined. |
Definition at line 4927 of file ConSplitter.c.
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
This | Protocol instance pointer. |
Column | The column position to set the cursor to. Must be greater than or equal to zero and less than the number of columns by QueryMode (). |
Row | The row position to set the cursor to. Must be greater than or equal to zero and less than the number of rows by QueryMode (). |
EFI_SUCCESS | The operation completed successfully. |
EFI_DEVICE_ERROR | The device had an error and could not complete the request. |
EFI_UNSUPPORTED | The 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.
EFI_STATUS EFIAPI ConSplitterTextOutSetMode | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN UINTN | ModeNumber | ||
) |
Sets the output device(s) to a specified mode.
This | Protocol instance pointer. |
ModeNumber | The mode number to set. |
EFI_SUCCESS | The requested text mode was set. |
EFI_DEVICE_ERROR | The device had an error and could not complete the request. |
EFI_UNSUPPORTED | The mode number was not valid. |
Definition at line 4847 of file ConSplitter.c.
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.
This | Protocol instance pointer. |
WString | The NULL-terminated Unicode string to be examined for the output device(s). |
EFI_SUCCESS | The device(s) are capable of rendering the output string. |
EFI_UNSUPPORTED | Some 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.
BOOLEAN IsKeyRegistered | ( | IN EFI_KEY_DATA * | RegsiteredData, |
IN EFI_KEY_DATA * | InputData | ||
) |
Test if the key has been registered on input device.
RegsiteredData | A pointer to a buffer that is filled in with the keystroke state data for the key that was registered. |
InputData | A pointer to a buffer that is filled in with the keystroke state data for the key that was pressed. |
TRUE | Key be pressed matches a registered key. |
FALSE | Match failed. |
Definition at line 3716 of file ConSplitter.c.
VOID ToggleStateSyncInitialization | ( | IN TEXT_IN_SPLITTER_PRIVATE_DATA * | Private | ) |
Initialization for toggle state sync.
Private | Text In Splitter pointer. |
Definition at line 346 of file ConSplitter.c.
EFI_STATUS EFIAPI ToggleStateSyncKeyNotify | ( | IN EFI_KEY_DATA * | KeyData | ) |
Key notify for toggle state sync.
KeyData | A pointer to a buffer that is filled in with the keystroke information for the key that was pressed. |
EFI_SUCCESS | Toggle state sync successfully. |
Definition at line 313 of file ConSplitter.c.
VOID ToggleStateSyncReInitialization | ( | IN TEXT_IN_SPLITTER_PRIVATE_DATA * | Private | ) |
Re-initialization for toggle state sync.
Private | Text In Splitter pointer. |
Definition at line 390 of file ConSplitter.c.
EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding |
Definition at line 292 of file ConSplitter.c.
EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding |
Definition at line 244 of file ConSplitter.c.
EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding |
Definition at line 256 of file ConSplitter.c.
EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding |
Definition at line 280 of file ConSplitter.c.
EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding |
Definition at line 268 of file ConSplitter.c.
Definition at line 36 of file ConSplitter.c.
BOOLEAN mConInIsConnect = FALSE |
Definition at line 31 of file ConSplitter.c.
Definition at line 132 of file ConSplitter.c.
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate |
Definition at line 122 of file ConSplitter.c.
Definition at line 188 of file ConSplitter.c.
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate |
Definition at line 113 of file ConSplitter.c.