OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
BdsConsole.c File Reference
#include <Guid/GlobalVariable.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/DuetBdsLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Functions

BOOLEAN IsNvNeed (IN CHAR16 *ConVarName)
 
BOOLEAN UpdateSystemTableConsole (IN CHAR16 *VarName, IN EFI_GUID *ConsoleGuid, IN OUT EFI_HANDLE *ConsoleHandle, IN OUT VOID **ProtocolInterface)
 
EFI_STATUS EFIAPI BdsLibUpdateConsoleVariable (IN CHAR16 *ConVarName, IN EFI_DEVICE_PATH_PROTOCOL *CustomizedConDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath)
 
EFI_STATUS EFIAPI BdsLibConnectConsoleVariable (IN CHAR16 *ConVarName)
 
VOID EFIAPI BdsLibConnectAllConsoles (VOID)
 
EFI_STATUS EFIAPI BdsLibConnectAllDefaultConsoles (VOID)
 

Detailed Description

BDS Lib functions which contain all the code to connect console device

Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file BdsConsole.c.

Function Documentation

◆ BdsLibConnectAllConsoles()

VOID EFIAPI BdsLibConnectAllConsoles ( VOID )

This function will search every simpletext device in current system, and make every simpletext device as a potential console device.

Definition at line 429 of file BdsConsole.c.

◆ BdsLibConnectAllDefaultConsoles()

EFI_STATUS EFIAPI BdsLibConnectAllDefaultConsoles ( VOID )

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

Return values
EFI_SUCCESSAt least one of the ConIn and ConOut device have been connected success.
EFI_STATUSReturn the status of BdsLibConnectConsoleVariable ().

Definition at line 506 of file BdsConsole.c.

◆ BdsLibConnectConsoleVariable()

EFI_STATUS EFIAPI BdsLibConnectConsoleVariable ( IN CHAR16 * ConVarName)

Connect the console device base on the variable ConVarName, if device path of the ConVarName is multi-instance device path and anyone of the instances is connected success, then this function will return success. If the handle associate with one device path node can not be created successfully, then still give chance to do the dispatch, which load the missing drivers if possible..

Parameters
ConVarNameConsole related variable name, ConIn, ConOut, 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 334 of file BdsConsole.c.

◆ BdsLibUpdateConsoleVariable()

EFI_STATUS EFIAPI BdsLibUpdateConsoleVariable ( IN CHAR16 * ConVarName,
IN EFI_DEVICE_PATH_PROTOCOL * CustomizedConDevicePath,
IN EFI_DEVICE_PATH_PROTOCOL * ExclusiveDevicePath )

This function update console variable based on ConVarName, it can add or remove one specific console device path from the variable

Parameters
ConVarNameConsole related variable name, ConIn, ConOut, ErrOut.
CustomizedConDevicePathThe console device path which will be added to the console variable ConVarName, this parameter can not be multi-instance.
ExclusiveDevicePathThe console device path which will be removed from the console variable ConVarName, this parameter can not be multi-instance.
Return values
EFI_UNSUPPORTEDThe added device path is same to the removed one.
EFI_SUCCESSSuccess add or remove the device path from the console variable.

Definition at line 198 of file BdsConsole.c.

◆ IsNvNeed()

BOOLEAN IsNvNeed ( IN CHAR16 * ConVarName)

Check if we need to save the EFI variable with "ConVarName" as name as NV type If ConVarName is NULL, then ASSERT().

Parameters
ConVarNameThe name of the EFI variable.
Return values
TRUESet the EFI variable as NV type.
FALSEEFI variable as NV type can be set NonNV.

Definition at line 35 of file BdsConsole.c.

◆ UpdateSystemTableConsole()

BOOLEAN UpdateSystemTableConsole ( 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 82 of file BdsConsole.c.