TianoCore EDK2 master
|
#include "DeviceManager.h"
Go to the source code of this file.
Macros | |
#define | MAX_MAC_ADDRESS_NODE_LIST_LEN 10 |
Functions | |
CHAR16 * | DmExtractDevicePathFromHiiHandle (IN EFI_HII_HANDLE Handle) |
BOOLEAN | GetMacAddressString (IN MAC_ADDR_DEVICE_PATH *MacAddressNode, OUT CHAR16 **PBuffer) |
BOOLEAN | AddIdToMacDeviceList (IN EFI_STRING MacAddrString) |
BOOLEAN | IsMacAddressDevicePath (IN VOID *Node, IN EFI_FORM_ID NextShowFormId, OUT BOOLEAN *NeedAddItem) |
BOOLEAN | IsNeedAddNetworkMenu (IN EFI_HII_HANDLE Handle, IN EFI_FORM_ID NextShowFormId, OUT UINTN *ItemCount) |
VOID | CreateDeviceManagerForm (IN EFI_FORM_ID NextShowFormId) |
EFI_STATUS EFIAPI | DeviceManagerExtractConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results) |
EFI_STATUS EFIAPI | DeviceManagerRouteConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress) |
EFI_STATUS EFIAPI | DeviceManagerCallback (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest) |
EFI_STATUS EFIAPI | DeviceManagerUiLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
EFI_STATUS EFIAPI | DeviceManagerUiLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
DEVICE_MANAGER_CALLBACK_DATA | gDeviceManagerPrivate |
EFI_GUID | mDeviceManagerGuid = DEVICE_MANAGER_FORMSET_GUID |
EFI_STRING | mSelectedMacAddrString |
MAC_ADDRESS_NODE_LIST | mMacDeviceList |
HII_VENDOR_DEVICE_PATH | mDeviceManagerHiiVendorDevicePath |
The device manager reference implementation
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DeviceManager.c.
#define MAX_MAC_ADDRESS_NODE_LIST_LEN 10 |
Definition at line 22 of file DeviceManager.c.
BOOLEAN AddIdToMacDeviceList | ( | IN EFI_STRING | MacAddrString | ) |
Save question id and prompt id to the mac device list. If the same mac address has saved yet, no need to add more.
MacAddrString | Mac address string. |
EFI_SUCCESS | Add the item is successful. |
Definition at line 203 of file DeviceManager.c.
VOID CreateDeviceManagerForm | ( | IN EFI_FORM_ID | NextShowFormId | ) |
Dynamic create Hii information for Device Manager.
NextShowFormId | The FormId which need to be show. |
Definition at line 505 of file DeviceManager.c.
EFI_STATUS EFIAPI DeviceManagerCallback | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN EFI_BROWSER_ACTION | Action, | ||
IN EFI_QUESTION_ID | QuestionId, | ||
IN UINT8 | Type, | ||
IN EFI_IFR_TYPE_VALUE * | Value, | ||
OUT EFI_BROWSER_ACTION_REQUEST * | ActionRequest | ||
) |
This function is invoked if user selected a interactive opcode from Device Manager's Formset. If user set VBIOS, the new value is saved to EFI variable.
This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
Action | Specifies the type of action taken by the browser. |
QuestionId | A unique value which is sent to the original exporting driver so that it can identify the type of data to expect. |
Type | The type of value for the question. |
Value | A pointer to the data being sent to the original exporting driver. |
ActionRequest | On return, points to the action requested by the callback function. |
EFI_SUCCESS | The callback successfully handled the action. |
EFI_INVALID_PARAMETER | The setup browser call this function with invalid parameters. |
Definition at line 840 of file DeviceManager.c.
EFI_STATUS EFIAPI DeviceManagerExtractConfig | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN CONST EFI_STRING | Request, | ||
OUT EFI_STRING * | Progress, | ||
OUT EFI_STRING * | Results | ||
) |
This function allows a caller to extract the current configuration for one or more named elements from the target driver.
This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
Request | A null-terminated Unicode string in <ConfigRequest> format. |
Progress | On return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent '&' before the first failing name/value pair (or the beginning of the string if the failure is in the first name/value pair) if the request was not successful. |
Results | A null-terminated Unicode string in <ConfigAltResp> format which has all values filled in for the names in the Request string. String to be allocated by the called function. |
EFI_SUCCESS | The Results is filled with the requested values. |
EFI_OUT_OF_RESOURCES | Not enough memory to store the results. |
EFI_INVALID_PARAMETER | Request is illegal syntax, or unknown name. |
EFI_NOT_FOUND | Routing data doesn't match any storage in this driver. |
Definition at line 775 of file DeviceManager.c.
EFI_STATUS EFIAPI DeviceManagerRouteConfig | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN CONST EFI_STRING | Configuration, | ||
OUT EFI_STRING * | Progress | ||
) |
This function processes the results of changes in configuration.
This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
Configuration | A null-terminated Unicode string in <ConfigResp> format. |
Progress | A pointer to a string filled in with the offset of the most recent '&' before the first failing name/value pair (or the beginning of the string if the failure is in the first name/value pair) or the terminating NULL if all was successful. |
EFI_SUCCESS | The Results is processed successfully. |
EFI_INVALID_PARAMETER | Configuration is NULL. |
EFI_NOT_FOUND | Routing data doesn't match any storage in this driver. |
Definition at line 807 of file DeviceManager.c.
EFI_STATUS EFIAPI DeviceManagerUiLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Install Boot Manager Menu driver.
ImageHandle | The image handle. |
SystemTable | The system table. |
EFI_SUCEESS | Install Boot manager menu success. |
Other | Return error status. |
Definition at line 892 of file DeviceManager.c.
EFI_STATUS EFIAPI DeviceManagerUiLibDestructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Unloads the application and its installed protocol.
ImageHandle | Handle that identifies the image to be unloaded. |
SystemTable | The system table. |
EFI_SUCCESS | The image has been unloaded. |
Definition at line 947 of file DeviceManager.c.
CHAR16 * DmExtractDevicePathFromHiiHandle | ( | IN EFI_HII_HANDLE | Handle | ) |
Extract device path for given HII handle and class guid.
Handle | The HII handle. |
NULL | Fail to get the device path string. |
Definition at line 73 of file DeviceManager.c.
BOOLEAN GetMacAddressString | ( | IN MAC_ADDR_DEVICE_PATH * | MacAddressNode, |
OUT CHAR16 ** | PBuffer | ||
) |
Get the mac address string from the device path. if the device path has the vlan, get the vanid also.
MacAddressNode | Device path begin with mac address |
PBuffer | Output string buffer contain mac address. |
Definition at line 106 of file DeviceManager.c.
BOOLEAN IsMacAddressDevicePath | ( | IN VOID * | Node, |
IN EFI_FORM_ID | NextShowFormId, | ||
OUT BOOLEAN * | NeedAddItem | ||
) |
Check the devcie path, try to find whether it has mac address path.
In this function, first need to check whether this path has mac address path. second, when the mac address device path has find, also need to deicide whether need to add this mac address relate info to the menu.
*Node | Input device which need to be check. |
NextShowFormId | FormId Which need to be show. |
*NeedAddItem | Whether need to add the menu in the network device list. |
TRUE | Has mac address device path. |
FALSE | NOT Has mac address device path. |
Definition at line 280 of file DeviceManager.c.
BOOLEAN IsNeedAddNetworkMenu | ( | IN EFI_HII_HANDLE | Handle, |
IN EFI_FORM_ID | NextShowFormId, | ||
OUT UINTN * | ItemCount | ||
) |
Check to see if the device path is for the network device.
Handle | The HII handle which include the mac address device path. |
NextShowFormId | The FormId of the form which will be show next time. |
ItemCount | The new add Mac address item count. |
TRUE | Need to add new item in the menu. |
Definition at line 358 of file DeviceManager.c.
DEVICE_MANAGER_CALLBACK_DATA gDeviceManagerPrivate |
Definition at line 11 of file DeviceManager.c.
EFI_GUID mDeviceManagerGuid = DEVICE_MANAGER_FORMSET_GUID |
Definition at line 24 of file DeviceManager.c.
HII_VENDOR_DEVICE_PATH mDeviceManagerHiiVendorDevicePath |
Definition at line 37 of file DeviceManager.c.
MAC_ADDRESS_NODE_LIST mMacDeviceList |
Definition at line 35 of file DeviceManager.c.
EFI_STRING mSelectedMacAddrString |
Definition at line 30 of file DeviceManager.c.