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

Go to the source code of this file.

Functions

EFI_STATUS FindHiiHandleViaDevPath (IN CONST EFI_DEVICE_PATH_PROTOCOL *DevPath1, OUT EFI_HII_HANDLE *HiiHandle, IN EFI_HII_DATABASE_PROTOCOL *HiiDb)
 
EFI_STATUS ConvertHandleToHiiHandle (IN CONST EFI_HANDLE Handle, OUT EFI_HII_HANDLE *HiiHandle, IN EFI_HII_DATABASE_PROTOCOL *HiiDb)
 
SHELL_STATUS ConfigToFile (IN CONST EFI_HANDLE Handle, IN CONST CHAR16 *FileName)
 
SHELL_STATUS ConfigFromFile (IN EFI_HANDLE Handle, IN CONST CHAR16 *FileName)
 
EFI_STATUS ShellCmdDriverConfigurationProcessActionRequired (EFI_HANDLE DriverImageHandle, EFI_HANDLE ControllerHandle, EFI_HANDLE ChildHandle, EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED ActionRequired)
 
SHELL_STATUS PreHiiDrvCfg (IN CONST CHAR8 *Language, IN BOOLEAN ForceDefaults, IN UINT32 DefaultType, IN BOOLEAN AllChildren, IN BOOLEAN ValidateOptions, IN BOOLEAN SetOptions, IN EFI_HANDLE DriverImageHandle, IN EFI_HANDLE DeviceHandle, IN EFI_HANDLE ChildHandle)
 
SHELL_STATUS PrintConfigInfoOnAll (IN CONST BOOLEAN ChildrenToo, IN CONST CHAR8 *Language, IN CONST BOOLEAN UseHii)
 
SHELL_STATUS EFIAPI ShellCommandRunDrvCfg (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC CONST EFI_GUIDCfgGuidList [] = { &gEfiDriverConfigurationProtocolGuid, &gEfiDriverConfiguration2ProtocolGuid, NULL }
 
STATIC CONST SHELL_PARAM_ITEM ParamListHii []
 
STATIC CONST SHELL_PARAM_ITEM ParamListPreHii []
 

Detailed Description

Main file for DrvCfg shell Driver1 function.

(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DrvCfg.c.

Function Documentation

◆ ConfigFromFile()

SHELL_STATUS ConfigFromFile ( IN EFI_HANDLE  Handle,
IN CONST CHAR16 *  FileName 
)

Function to read in HII configuration information from a file.

Parameters
[in]HandleThe handle to get info for.
[in]FileNameThe filename to read the info from.

Definition at line 304 of file DrvCfg.c.

◆ ConfigToFile()

SHELL_STATUS ConfigToFile ( IN CONST EFI_HANDLE  Handle,
IN CONST CHAR16 *  FileName 
)

Function to print out all HII configuration information to a file.

Parameters
[in]HandleThe handle to get info on. NULL to do all handles.
[in]FileNameThe filename to rwite the info to.

Definition at line 163 of file DrvCfg.c.

◆ ConvertHandleToHiiHandle()

EFI_STATUS ConvertHandleToHiiHandle ( IN CONST EFI_HANDLE  Handle,
OUT EFI_HII_HANDLE HiiHandle,
IN EFI_HII_DATABASE_PROTOCOL HiiDb 
)

Convert a EFI_HANDLE to a EFI_HII_HANDLE.

Parameters
[in]HandleThe EFI_HANDLE to convert.
[out]HiiHandleThe EFI_HII_HANDLE after the converstion.
[in]HiiDbThe Hii database protocol
Return values
EFI_SUCCESSThe operation was successful.

Definition at line 128 of file DrvCfg.c.

◆ FindHiiHandleViaDevPath()

EFI_STATUS FindHiiHandleViaDevPath ( IN CONST EFI_DEVICE_PATH_PROTOCOL DevPath1,
OUT EFI_HII_HANDLE HiiHandle,
IN EFI_HII_DATABASE_PROTOCOL HiiDb 
)

Find the EFI_HII_HANDLE by device path.

Parameters
[in]DevPath1The Device Path to match.
[out]HiiHandleThe EFI_HII_HANDLE after the converstion.
[in]HiiDbThe Hii database protocol
Return values
EFI_SUCCESSThe operation was successful.
EFI_NOT_FOUNDThere was no EFI_HII_HANDLE found for that deviec path.

Definition at line 27 of file DrvCfg.c.

◆ PreHiiDrvCfg()

SHELL_STATUS PreHiiDrvCfg ( IN CONST CHAR8 *  Language,
IN BOOLEAN  ForceDefaults,
IN UINT32  DefaultType,
IN BOOLEAN  AllChildren,
IN BOOLEAN  ValidateOptions,
IN BOOLEAN  SetOptions,
IN EFI_HANDLE  DriverImageHandle,
IN EFI_HANDLE  DeviceHandle,
IN EFI_HANDLE  ChildHandle 
)

Do the configuration in an environment without HII.

Parameters
[in]LanguageThe language code.
[in]ForceDefaultsTRUE to force defaults, FALSE otherwise.
[in]DefaultTypeIf ForceDefaults is TRUE, specifies the default type.
[in]AllChildrenTRUE to configure all children, FALSE otherwise.
[in]ValidateOptionsTRUE to validate existing options, FALSE otherwise.
[in]SetOptionsTRUE to set options, FALSE otherwise.
[in]DriverImageHandleThe handle for the driver to configure.
[in]DeviceHandleThe handle of the device being managed by the Driver specified.
[in]ChildHandleThe handle of a child device of the specified device.
Return values
SHELL_NOT_FOUNDA specified handle could not be found.
SHELL_INVALID_PARAMETERA parameter has a invalid value.

Definition at line 651 of file DrvCfg.c.

◆ PrintConfigInfoOnAll()

SHELL_STATUS PrintConfigInfoOnAll ( IN CONST BOOLEAN  ChildrenToo,
IN CONST CHAR8 *  Language,
IN CONST BOOLEAN  UseHii 
)

Function to print out configuration information on all configurable handles.

Parameters
[in]ChildrenTooTRUE to tewst for children.
[in]LanguageASCII string for language code.
[in]UseHiiTRUE to check for Hii and DPC, FALSE for DCP only.
Return values
SHELL_SUCCESSThe operation was successful.

Definition at line 1183 of file DrvCfg.c.

◆ ShellCmdDriverConfigurationProcessActionRequired()

EFI_STATUS ShellCmdDriverConfigurationProcessActionRequired ( EFI_HANDLE  DriverImageHandle,
EFI_HANDLE  ControllerHandle,
EFI_HANDLE  ChildHandle,
EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED  ActionRequired 
)

Present a requested action to the user.

Parameters
[in]DriverImageHandleThe handle for the driver to configure.
[in]ControllerHandleThe handle of the device being managed by the Driver specified.
[in]ChildHandleThe handle of a child device of the specified device.
[in]ActionRequiredThe required HII action.
Return values
SHELL_INVALID_PARAMETERA parameter has a invalid value.

Definition at line 584 of file DrvCfg.c.

◆ ShellCommandRunDrvCfg()

SHELL_STATUS EFIAPI ShellCommandRunDrvCfg ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'drvcfg' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 1267 of file DrvCfg.c.

Variable Documentation

◆ CfgGuidList

STATIC CONST EFI_GUID* CfgGuidList[] = { &gEfiDriverConfigurationProtocolGuid, &gEfiDriverConfiguration2ProtocolGuid, NULL }

Definition at line 14 of file DrvCfg.c.

◆ ParamListHii

STATIC CONST SHELL_PARAM_ITEM ParamListHii[]
Initial value:
= {
{ L"-s", TypeFlag },
{ L"-l", TypeValue },
{ L"-f", TypeValue },
{ L"-o", TypeValue },
{ L"-i", TypeValue },
{ NULL, TypeMax }
}
#define NULL
Definition: Base.h:319
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
Definition: ShellLib.h:700
@ TypeFlag
A flag that is present or not present only (IE "-a").
Definition: ShellLib.h:699

Definition at line 1242 of file DrvCfg.c.

◆ ParamListPreHii

STATIC CONST SHELL_PARAM_ITEM ParamListPreHii[]
Initial value:
= {
{ L"-c", TypeFlag },
{ L"-s", TypeFlag },
{ L"-v", TypeFlag },
{ L"-l", TypeValue },
{ L"-f", TypeValue },
{ NULL, TypeMax }
}

Definition at line 1250 of file DrvCfg.c.