TianoCore EDK2 master
Loading...
Searching...
No Matches
ConsoleOption.c File Reference

Go to the source code of this file.

Functions

BOOLEAN MatchDevicePaths (IN EFI_DEVICE_PATH_PROTOCOL *Multi, IN EFI_DEVICE_PATH_PROTOCOL *Single)
 
BOOLEAN IsIsaSerialNode (IN ACPI_HID_DEVICE_PATH *Acpi)
 
EFI_STATUS UpdateComAttributeFromVariable (EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS ChangeTerminalDevicePath (IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN ChangeTerminal)
 
VOID ChangeVariableDevicePath (IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
BOOLEAN RetrieveUartUid (IN EFI_HANDLE Handle, IN OUT UINT32 *AcpiUid)
 
VOID SortedUartHandle (IN EFI_HANDLE *Handles, IN UINTN NoHandles)
 
BOOLEAN IsTerminalDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT TYPE_OF_TERMINAL *Termi, OUT UINTN *Com)
 
EFI_STATUS LocateSerialIo (VOID)
 
EFI_STATUS GetConsoleMenu (IN UINTN ConsoleMenuType)
 
EFI_STATUS GetAllConsoles (VOID)
 
EFI_STATUS FreeAllConsoles (VOID)
 
VOID GetConsoleOutMode (IN BMM_CALLBACK_DATA *CallbackData)
 
VOID GetConsoleInCheck (IN BMM_CALLBACK_DATA *CallbackData)
 
VOID GetConsoleOutCheck (IN BMM_CALLBACK_DATA *CallbackData)
 
VOID GetConsoleErrCheck (IN BMM_CALLBACK_DATA *CallbackData)
 
VOID GetTerminalAttribute (IN BMM_CALLBACK_DATA *CallbackData)
 

Detailed Description

handles console redirection from boot manager

Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ConsoleOption.c.

Function Documentation

◆ ChangeTerminalDevicePath()

EFI_STATUS ChangeTerminalDevicePath ( IN OUT EFI_DEVICE_PATH_PROTOCOL DevicePath,
IN BOOLEAN  ChangeTerminal 
)

Update the multi-instance device path of Terminal Device based on the global TerminalMenu. If ChangeTernimal is TRUE, the terminal device path in the Terminal Device in TerminalMenu is also updated.

Parameters
DevicePathThe multi-instance device path.
ChangeTerminalTRUE, then device path in the Terminal Device in TerminalMenu is also updated; FALSE, no update.
Returns
EFI_SUCCESS The function completes successfully.

Definition at line 108 of file ConsoleOption.c.

◆ ChangeVariableDevicePath()

VOID ChangeVariableDevicePath ( IN OUT EFI_DEVICE_PATH_PROTOCOL DevicePath)

Update the device path that describing a terminal device based on the new BaudRate, Data Bits, parity and Stop Bits set.

Parameters
DevicePathterminal device's path

Definition at line 222 of file ConsoleOption.c.

◆ FreeAllConsoles()

EFI_STATUS FreeAllConsoles ( VOID  )

Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu

Return values
EFI_SUCCESSThe function always complete successfully.

Definition at line 876 of file ConsoleOption.c.

◆ GetAllConsoles()

EFI_STATUS GetAllConsoles ( VOID  )

Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu

Return values
EFI_SUCCESSThe function always complete successfully.

Definition at line 860 of file ConsoleOption.c.

◆ GetConsoleErrCheck()

VOID GetConsoleErrCheck ( IN BMM_CALLBACK_DATA CallbackData)

Initialize standard error output device check box to ConsoleErrCheck[MAX_MENU_NUMBER] in BMM_FAKE_NV_DATA structure.

Parameters
CallbackDataThe BMM context data.

Definition at line 1093 of file ConsoleOption.c.

◆ GetConsoleInCheck()

VOID GetConsoleInCheck ( IN BMM_CALLBACK_DATA CallbackData)

Initialize console input device check box to ConsoleInCheck[MAX_MENU_NUMBER] in BMM_FAKE_NV_DATA structure.

Parameters
CallbackDataThe BMM context data.

Definition at line 1018 of file ConsoleOption.c.

◆ GetConsoleMenu()

EFI_STATUS GetConsoleMenu ( IN UINTN  ConsoleMenuType)

Build up Console Menu based on types passed in. The type can be BM_CONSOLE_IN_CONTEXT_SELECT, BM_CONSOLE_OUT_CONTEXT_SELECT and BM_CONSOLE_ERR_CONTEXT_SELECT.

Parameters
ConsoleMenuTypeCan be BM_CONSOLE_IN_CONTEXT_SELECT, BM_CONSOLE_OUT_CONTEXT_SELECT and BM_CONSOLE_ERR_CONTEXT_SELECT.
Return values
EFI_UNSUPPORTEDThe type passed in is not in the 3 types defined.
EFI_NOT_FOUNDIf the EFI Variable defined in UEFI spec with name "ConOutDev", "ConInDev" or "ConErrDev" doesn't exists.
EFI_OUT_OF_RESOURCESNot enough resource to complete the operations.
EFI_SUCCESSFunction completes successfully.

Definition at line 747 of file ConsoleOption.c.

◆ GetConsoleOutCheck()

VOID GetConsoleOutCheck ( IN BMM_CALLBACK_DATA CallbackData)

Initialize console output device check box to ConsoleOutCheck[MAX_MENU_NUMBER] in BMM_FAKE_NV_DATA structure.

Parameters
CallbackDataThe BMM context data.

Definition at line 1056 of file ConsoleOption.c.

◆ GetConsoleOutMode()

VOID GetConsoleOutMode ( IN BMM_CALLBACK_DATA CallbackData)

Get mode number according to column and row

Parameters
CallbackDataThe BMM context data.

Definition at line 980 of file ConsoleOption.c.

◆ GetTerminalAttribute()

VOID GetTerminalAttribute ( IN BMM_CALLBACK_DATA CallbackData)

Initialize terminal attributes (baudrate, data rate, stop bits, parity and terminal type) to BMM_FAKE_NV_DATA structure.

Parameters
CallbackDataThe BMM context data.

Definition at line 1130 of file ConsoleOption.c.

◆ IsIsaSerialNode()

BOOLEAN IsIsaSerialNode ( IN ACPI_HID_DEVICE_PATH Acpi)

Check whether the device path node is ISA Serial Node.

Parameters
AcpiDevice path node to be checked
Return values
TRUEIt's ISA Serial Node.
FALSEIt's NOT ISA Serial Node.

Definition at line 71 of file ConsoleOption.c.

◆ IsTerminalDevicePath()

BOOLEAN IsTerminalDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath,
OUT TYPE_OF_TERMINAL *  Termi,
OUT UINTN Com 
)

Test whether DevicePath is a valid Terminal

Parameters
DevicePathDevicePath to be checked
TermiIf DevicePath is valid Terminal, terminal type is returned.
ComIf DevicePath is valid Terminal, Com Port type is returned.
Return values
TRUEIf DevicePath point to a Terminal.
FALSEIf DevicePath does not point to a Terminal.

Definition at line 900 of file ConsoleOption.c.

◆ LocateSerialIo()

EFI_STATUS LocateSerialIo ( VOID  )

Build a list containing all serial devices.

Return values
EFI_SUCCESSThe function complete successfully.
EFI_UNSUPPORTEDNo serial ports present.

Definition at line 405 of file ConsoleOption.c.

◆ MatchDevicePaths()

BOOLEAN MatchDevicePaths ( IN EFI_DEVICE_PATH_PROTOCOL Multi,
IN EFI_DEVICE_PATH_PROTOCOL Single 
)

Function compares a device path data structure to that of all the nodes of a second device path instance.

Parameters
MultiA pointer to a multi-instance device path data structure.
SingleA pointer to a single-instance device path data structure.
Return values
TRUEIf the Single device path is contained within Multi device path.
FALSEThe Single device path is not match within Multi device path.

Definition at line 25 of file ConsoleOption.c.

◆ RetrieveUartUid()

BOOLEAN RetrieveUartUid ( IN EFI_HANDLE  Handle,
IN OUT UINT32 *  AcpiUid 
)

Retrieve ACPI UID of UART from device path

Parameters
HandleThe handle for the UART device.
AcpiUidThe ACPI UID on output.
Return values
TRUEFind valid UID from device path
FALSECan't find

Definition at line 290 of file ConsoleOption.c.

◆ SortedUartHandle()

VOID SortedUartHandle ( IN EFI_HANDLE Handles,
IN UINTN  NoHandles 
)

Sort Uart handles array with Acpi->UID from low to high.

Parameters
HandlesEFI_SERIAL_IO_PROTOCOL handle buffer
NoHandlesEFI_SERIAL_IO_PROTOCOL handle count

Definition at line 338 of file ConsoleOption.c.

◆ UpdateComAttributeFromVariable()

EFI_STATUS UpdateComAttributeFromVariable ( EFI_DEVICE_PATH_PROTOCOL DevicePath)

Update Com Ports attributes from DevicePath

Parameters
DevicePathDevicePath that contains Com ports
Return values
EFI_SUCCESSThe update is successful.

Update Com Ports attributes from DevicePath

Parameters
DevicePathDevicePath that contains Com ports
Return values
EFI_SUCCESSThe update is successful.
EFI_NOT_FOUNDCan not find specific menu entry

Definition at line 622 of file ConsoleOption.c.