TianoCore EDK2 master
|
#include "Terminal.h"
Go to the source code of this file.
Produces Simple Text Input Protocol, Simple Text Input Extended Protocol and Simple Text Output Protocol upon Serial IO Protocol.
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Terminal.c.
EFI_STATUS InitializeControllerNameTable | ( | TERMINAL_TYPE | TerminalType, |
EFI_UNICODE_STRING_TABLE ** | ControllerNameTable | ||
) |
Initialize the controller name table.
TerminalType | The terminal type. |
ControllerNameTable | The controller name table. |
EFI_SUCCESS | The controller name table is initialized successfully. |
others | Return status of AddUnicodeString2 (). |
Definition at line 415 of file Terminal.c.
EFI_STATUS EFIAPI InitializeTerminal | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The user Entry Point for module Terminal. The user code starts with this function.
ImageHandle | The firmware allocated handle for the EFI image. |
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 1340 of file Terminal.c.
TERMINAL_CONSOLE_MODE_DATA * InitializeTerminalConsoleTextMode | ( | OUT INT32 * | TextModeCount | ) |
Initialize all the text modes which the terminal console supports.
It returns information for available text modes that the terminal can support.
[out] | TextModeCount | The total number of text modes that terminal console supports. |
Definition at line 315 of file Terminal.c.
BOOLEAN IsHotPlugDevice | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
Check if the device supports hot-plug through its device path.
This function could be updated to check more types of Hot Plug devices. Currently, it checks USB and PCCard device.
DevicePath | Pointer to device's device path. |
TRUE | The devcie is a hot-plug device |
FALSE | The devcie is not a hot-plug device. |
Definition at line 1376 of file Terminal.c.
BOOLEAN MatchDevicePaths | ( | IN EFI_DEVICE_PATH_PROTOCOL * | Multi, |
IN EFI_DEVICE_PATH_PROTOCOL * | Single | ||
) |
Compare a device path data structure to that of all the nodes of a second device path instance.
Multi | A pointer to a multi-instance device path data structure. |
Single | A pointer to a single-instance device path data structure. |
TRUE | If the Single is contained within Multi. |
FALSE | The Single is not match within Multi. |
Definition at line 1041 of file Terminal.c.
EFI_STATUS SetTerminalDevicePath | ( | IN TERMINAL_TYPE | TerminalType, |
IN EFI_DEVICE_PATH_PROTOCOL * | ParentDevicePath, | ||
OUT EFI_DEVICE_PATH_PROTOCOL ** | TerminalDevicePath | ||
) |
Build terminal device path according to terminal type.
TerminalType | The terminal type is PC ANSI, VT100, VT100+ or VT-UTF8. |
ParentDevicePath | Parent device path. |
TerminalDevicePath | Returned terminal device path, if building successfully. |
EFI_UNSUPPORTED | Terminal does not belong to the supported type. |
EFI_OUT_OF_RESOURCES | Generate terminal device path failed. |
EFI_SUCCESS | Build terminal device path successfully. |
Definition at line 1299 of file Terminal.c.
VOID StartTerminalStateMachine | ( | TERMINAL_DEV * | TerminalDevice | ) |
Start the terminal state machine.
TerminalDevice | The terminal device. |
Definition at line 373 of file Terminal.c.
VOID StopTerminalStateMachine | ( | TERMINAL_DEV * | TerminalDevice | ) |
Stop the terminal state machine.
TerminalDevice | The terminal device. |
Definition at line 353 of file Terminal.c.
EFI_STATUS EFIAPI TerminalDriverBindingStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Start this driver on Controller by opening a Serial IO protocol, reading Device Path, and creating a child handle with a Simple Text In, Simple Text In Ex and Simple Text Out protocol, and device path protocol. And store Console Device Environment Variables.
This | Protocol instance pointer. |
Controller | Handle of device to bind driver to |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver is added to Controller. |
EFI_ALREADY_STARTED | This driver is already running on Controller. |
other | This driver does not support this device. |
Definition at line 470 of file Terminal.c.
EFI_STATUS EFIAPI TerminalDriverBindingStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN UINTN | NumberOfChildren, | ||
IN EFI_HANDLE * | ChildHandleBuffer | ||
) |
Stop this driver on Controller by closing Simple Text In, Simple Text In Ex, Simple Text Out protocol, and removing parent device path from Console Device Environment Variables.
This | Protocol instance pointer. |
Controller | 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 Controller. |
other | This driver could not be removed from this device. |
Definition at line 904 of file Terminal.c.
EFI_STATUS EFIAPI TerminalDriverBindingSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | This, |
IN EFI_HANDLE | Controller, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath | ||
) |
Test to see if this driver supports Controller.
This | Protocol instance pointer. |
Controller | Handle of device to test |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device. |
EFI_ALREADY_STARTED | This driver is already running on this device. |
other | This driver does not support this device. |
Definition at line 161 of file Terminal.c.
EFI_STATUS TerminalFreeNotifyList | ( | IN OUT LIST_ENTRY * | ListHead | ) |
Free notify functions list.
ListHead | The list head |
EFI_SUCCESS | Free the notify list successfully. |
EFI_INVALID_PARAMETER | ListHead is NULL. |
Definition at line 279 of file Terminal.c.
VOID TerminalRemoveConsoleDevVariable | ( | IN CHAR16 * | VariableName, |
IN EFI_DEVICE_PATH_PROTOCOL * | ParentDevicePath | ||
) |
Remove terminal device path from Console Device Environment Variables.
VariableName | Console Device Environment Variables. |
ParentDevicePath | The terminal device path to be updated. |
Definition at line 1178 of file Terminal.c.
Convert the GUID representation of terminal type to enum type.
Guid | The GUID representation of terminal type. |
Definition at line 131 of file Terminal.c.
VOID TerminalUpdateConsoleDevVariable | ( | IN CHAR16 * | VariableName, |
IN EFI_DEVICE_PATH_PROTOCOL * | ParentDevicePath | ||
) |
Update terminal device path in Console Device Environment Variables.
VariableName | The Console Device Environment Variable. |
ParentDevicePath | The terminal device path to be updated. |
Definition at line 1080 of file Terminal.c.
EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding |
Definition at line 15 of file Terminal.c.
CHAR16* mSerialConsoleNames[] |
Definition at line 36 of file Terminal.c.
TERMINAL_CONSOLE_MODE_DATA mTerminalConsoleModeData[] |
Definition at line 114 of file Terminal.c.
TERMINAL_DEV mTerminalDevTemplate |
Definition at line 48 of file Terminal.c.
EFI_GUID* mTerminalType[] |
Definition at line 24 of file Terminal.c.