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

Go to the source code of this file.

Functions

EFI_HANDLE BmGetVideoController (VOID)
 
EFI_DEVICE_PATH_PROTOCOL *EFIAPI EfiBootManagerGetGopDevicePath (IN EFI_HANDLE VideoController)
 
EFI_STATUS EFIAPI EfiBootManagerConnectVideoController (EFI_HANDLE VideoController OPTIONAL)
 
BOOLEAN BmUpdateSystemTableConsole (IN CHAR16 *VarName, IN EFI_GUID *ConsoleGuid, IN OUT EFI_HANDLE *ConsoleHandle, IN OUT VOID **ProtocolInterface)
 
EFI_STATUS EFIAPI EfiBootManagerUpdateConsoleVariable (IN CONSOLE_TYPE ConsoleType, IN EFI_DEVICE_PATH_PROTOCOL *CustomizedConDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath)
 
EFI_STATUS EFIAPI EfiBootManagerConnectConsoleVariable (IN CONSOLE_TYPE ConsoleType)
 
VOID EFIAPI EfiBootManagerConnectAllConsoles (VOID)
 
EFI_STATUS EFIAPI EfiBootManagerConnectAllDefaultConsoles (VOID)
 

Variables

CHAR16 * mConVarName []
 

Detailed Description

Library functions which contain all the code to connect console device.

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

Definition in file BmConsole.c.

Function Documentation

◆ BmGetVideoController()

EFI_HANDLE BmGetVideoController ( VOID  )

Search out the video controller.

Returns
PCI device path of the video controller.

Definition at line 27 of file BmConsole.c.

◆ BmUpdateSystemTableConsole()

BOOLEAN BmUpdateSystemTableConsole ( IN CHAR16 *  VarName,
IN EFI_GUID ConsoleGuid,
IN OUT EFI_HANDLE ConsoleHandle,
IN OUT VOID **  ProtocolInterface 
)

Fill console handle in System Table if there are no valid console handle in.

Firstly, check the validation of console handle in System Table. If it is invalid, update it by the first console device handle from EFI console variable.

Parameters
VarNameThe name of the EFI console variable.
ConsoleGuidSpecified Console protocol GUID.
ConsoleHandleOn IN, console handle in System Table to be checked. On OUT, new console handle in system table.
ProtocolInterfaceOn IN, console protocol on console handle in System Table to be checked. On OUT, new console protocol on new console handle in system table.
Return values
TRUESystem Table has been updated.
FALSESystem Table hasn't been updated.

Definition at line 289 of file BmConsole.c.

◆ EfiBootManagerConnectAllConsoles()

VOID EFIAPI EfiBootManagerConnectAllConsoles ( VOID  )

This function will search every input/output device in current system, and make every input/output device as potential console device.

Definition at line 636 of file BmConsole.c.

◆ EfiBootManagerConnectAllDefaultConsoles()

EFI_STATUS EFIAPI EfiBootManagerConnectAllDefaultConsoles ( VOID  )

This function will connect all the console devices base on the console device variable ConIn, ConOut and ErrOut.

Return values
EFI_DEVICE_ERRORAll the consoles were not connected due to an error.
EFI_SUCCESSSuccess connect any one instance of the console device path base on the variable ConVarName.

Definition at line 712 of file BmConsole.c.

◆ EfiBootManagerConnectConsoleVariable()

EFI_STATUS EFIAPI EfiBootManagerConnectConsoleVariable ( IN CONSOLE_TYPE  ConsoleType)

Connect the console device base on the variable ConsoleType.

Parameters
ConsoleTypeConIn, ConOut or ErrOut.
Return values
EFI_NOT_FOUNDThere is not any console devices connected success
EFI_SUCCESSSuccess connect any one instance of the console device path base on the variable ConVarName.

Definition at line 521 of file BmConsole.c.

◆ EfiBootManagerConnectVideoController()

EFI_STATUS EFIAPI EfiBootManagerConnectVideoController ( EFI_HANDLE VideoController  OPTIONAL)

Connect the platform active active video controller.

Parameters
VideoControllerPCI handle of video controller.
Return values
EFI_NOT_FOUNDThere is no active video controller.
EFI_SUCCESSThe video controller is connected.

Definition at line 232 of file BmConsole.c.

◆ EfiBootManagerGetGopDevicePath()

EFI_DEVICE_PATH_PROTOCOL *EFIAPI EfiBootManagerGetGopDevicePath ( IN EFI_HANDLE  VideoController)

Query all the children of VideoController and return the device paths of all the children that support GraphicsOutput protocol.

Parameters
VideoControllerPCI handle of video controller.
Returns
Device paths of all the children that support GraphicsOutput protocol.

Definition at line 117 of file BmConsole.c.

◆ EfiBootManagerUpdateConsoleVariable()

EFI_STATUS EFIAPI EfiBootManagerUpdateConsoleVariable ( IN CONSOLE_TYPE  ConsoleType,
IN EFI_DEVICE_PATH_PROTOCOL CustomizedConDevicePath,
IN EFI_DEVICE_PATH_PROTOCOL ExclusiveDevicePath 
)

This function updates the console variable based on ConVarName. It can add or remove one specific console device path from the variable

Parameters
ConsoleTypeConIn, ConOut, ErrOut, ConInDev, ConOutDev or ErrOutDev.
CustomizedConDevicePathThe console device path to be added to the console variable. Cannot be multi-instance.
ExclusiveDevicePathThe console device path to be removed from the console variable. Cannot be multi-instance.
Return values
EFI_UNSUPPORTEDThe added device path is the same as a removed one.
EFI_SUCCESSSuccessfully added or removed the device path from the console variable.
othersReturn status of RT->SetVariable().

Definition at line 418 of file BmConsole.c.

Variable Documentation

◆ mConVarName

CHAR16* mConVarName[]
Initial value:
= {
L"ConIn",
L"ConOut",
L"ErrOut",
L"ConInDev",
L"ConOutDev",
L"ErrOutDev"
}

Definition at line 12 of file BmConsole.c.