TianoCore EDK2 master
|
Go to the source code of this file.
Variables | |
EFI_HII_CONFIG_ACCESS_PROTOCOL | mDriverHealthManagerConfigAccess |
EFI_GUID | mDriverHealthManagerForm = DRIVER_HEALTH_MANAGER_FORMSET_GUID |
FORM_DEVICE_PATH | mDriverHealthManagerFormDevicePath |
EFI_HII_HANDLE | mDriverHealthManagerHiiHandle |
EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO * | mDriverHealthManagerHealthInfo = NULL |
UINTN | mDriverHealthManagerHealthInfoCount = 0 |
EFI_HII_DATABASE_PROTOCOL * | mDriverHealthManagerDatabase |
UINT8 | DriverHealthManagerVfrBin [] |
UINT8 | DriverHealthConfigureVfrBin [] |
This module produces two driver health manager forms. One will be used by BDS core to configure the Configured Required driver health instances, the other will be automatically included by firmware setup (UI).
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2018 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DriverHealthManagerDxe.c.
EFI_STATUS EFIAPI DriverHealthManagerCallback | ( | 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 Driver Health's Formset.
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 934 of file DriverHealthManagerDxe.c.
VOID DriverHealthManagerCleanDynamicString | ( | VOID | ) |
Called when the form is closing to remove the dynamicly added string from the HII package list.
Definition at line 878 of file DriverHealthManagerDxe.c.
EFI_STATUS EFIAPI DriverHealthManagerFakeExtractConfig | ( | 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 78 of file DriverHealthManagerDxe.c.
EFI_STATUS EFIAPI DriverHealthManagerFakeRouteConfig | ( | 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 111 of file DriverHealthManagerDxe.c.
EFI_STATUS DriverHealthManagerGetComponentNameWorker | ( | IN EFI_GUID * | ProtocolGuid, |
IN EFI_HANDLE | DriverBindingHandle, | ||
OUT EFI_COMPONENT_NAME_PROTOCOL ** | ComponentName, | ||
OUT CHAR8 ** | SupportedLanguage | ||
) |
This is an internal worker function to get the Component Name (2) protocol interface and the language it supports.
ProtocolGuid | A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID. |
DriverBindingHandle | The handle on which the Component Name (2) protocol instance is retrieved. |
ComponentName | A pointer to the Component Name (2) protocol interface. |
SupportedLanguage | The best suitable language that matches the SupportedLangues interface for the located Component Name (2) instance. |
EFI_SUCCESS | The Component Name (2) protocol instance is successfully located and we find the best matching language it support. |
EFI_UNSUPPORTED | The input Language is not supported by the Component Name (2) protocol. |
Other | Some error occurs when locating Component Name (2) protocol instance or finding the supported language. |
Definition at line 247 of file DriverHealthManagerDxe.c.
CHAR16 * DriverHealthManagerGetControllerName | ( | IN EFI_HANDLE | DriverBindingHandle, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_HANDLE | ChildHandle | ||
) |
This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward compatibility support.
DriverBindingHandle | The handle on which the Component Name (2) protocol instance is retrieved. |
ControllerHandle | The handle of a controller that the driver specified by DriverBindingHandle is managing. This handle specifies the controller whose name is to be returned. |
ChildHandle | The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for bus drivers that attempt to retrieve the name of the bus controller. It will not be NULL for a bus driver that attempts to retrieve the name of a child controller. |
Definition at line 463 of file DriverHealthManagerDxe.c.
EFI_STATUS DriverHealthManagerGetControllerNameWorker | ( | IN EFI_GUID * | ProtocolGuid, |
IN EFI_HANDLE | DriverBindingHandle, | ||
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_HANDLE | ChildHandle, | ||
OUT CHAR16 ** | ControllerName | ||
) |
This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward compatibility support.
ProtocolGuid | A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID. |
DriverBindingHandle | The handle on which the Component Name (2) protocol instance is retrieved. |
ControllerHandle | The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. |
ChildHandle | The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for bus drivers that attempt to retrieve the name of the bus controller. It will not be NULL for a bus driver that attempts to retrieve the name of a child controller. |
ControllerName | A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle. |
EFI_SUCCESS | The controller name is successfully retrieved from Component Name (2) protocol interface. |
Other | The controller name cannot be retrieved from Component Name (2) protocol. |
Definition at line 402 of file DriverHealthManagerDxe.c.
CHAR16 * DriverHealthManagerGetDriverName | ( | IN EFI_HANDLE | DriverBindingHandle | ) |
This function gets driver name from Component Name 2 protocol interface and Component Name protocol interface in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the driver name. If the attempt fails, it then gets the driver name from EFI 1.1 Component Name protocol for backward compatibility support.
DriverBindingHandle | The handle on which the Component Name (2) protocol instance is retrieved. |
Definition at line 352 of file DriverHealthManagerDxe.c.
EFI_STATUS DriverHealthManagerGetDriverNameWorker | ( | IN EFI_GUID * | ProtocolGuid, |
IN EFI_HANDLE | DriverBindingHandle, | ||
OUT CHAR16 ** | DriverName | ||
) |
This is an internal worker function to get driver name from Component Name (2) protocol interface.
ProtocolGuid | A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID. |
DriverBindingHandle | The handle on which the Component Name (2) protocol instance is retrieved. |
DriverName | A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This. |
EFI_SUCCESS | The driver name is successfully retrieved from Component Name (2) protocol interface. |
Other | The driver name cannot be retrieved from Component Name (2) protocol interface. |
Definition at line 301 of file DriverHealthManagerDxe.c.
EFI_STATUS DriverHealthManagerGetFormsetId | ( | IN EFI_HII_HANDLE | Handle, |
OUT EFI_GUID * | FormsetGuid | ||
) |
Look for the formset GUID which has the gEfiHiiDriverHealthFormsetGuid class GUID in the specified HII package list.
Handle | Handle to the HII package list. |
FormsetGuid | Return the formset GUID. |
EFI_SUCCESS | The formset is found successfully. |
EFI_NOT_FOUND | The formset cannot be found. |
Definition at line 535 of file DriverHealthManagerDxe.c.
VOID DriverHealthManagerProcessSingleControllerHealth | ( | IN EFI_DRIVER_HEALTH_PROTOCOL * | DriverHealth, |
IN EFI_HANDLE ControllerHandle | OPTIONAL, | ||
IN EFI_HANDLE ChildHandle | OPTIONAL, | ||
IN EFI_DRIVER_HEALTH_STATUS | HealthStatus, | ||
IN EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList | OPTIONAL, | ||
IN EFI_HII_HANDLE | FormHiiHandle | ||
) |
Processes a single controller using the EFI Driver Health Protocol associated with that controller.
DriverHealth | A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. |
ControllerHandle | The class guid specifies which form set will be displayed. |
ChildHandle | The handle of the child controller to retrieve the health status on. This is an optional parameter that may be NULL. |
HealthStatus | The health status of the controller. |
MessageList | An array of warning or error messages associated with the controller specified by ControllerHandle and ChildHandle. This is an optional parameter that may be NULL. |
FormHiiHandle | The HII handle for an HII form associated with the controller specified by ControllerHandle and ChildHandle. |
Definition at line 629 of file DriverHealthManagerDxe.c.
EFI_STATUS EFIAPI DriverHealthManagerRepairNotify | ( | IN UINTN | Value, |
IN UINTN | Limit | ||
) |
The repair notify function.
Value | A value between 0 and Limit that identifies the current progress of the repair operation. |
Limit | The maximum value of Value for the current repair operation. If Limit is 0, then the completion progress is indeterminate. For example, a driver that wants to specify progress in percent would use a Limit value of 100. |
EFI_SUCCESS | Successfully return from the notify function. |
Definition at line 516 of file DriverHealthManagerDxe.c.
CHAR8 * DriverHealthManagerSelectBestLanguage | ( | IN CHAR8 * | SupportedLanguages, |
IN BOOLEAN | Iso639Language | ||
) |
Select the best matching language according to front page policy for best user experience.
This function supports both ISO 639-2 and RFC 4646 language codes, but language code types may not be mixed in a single call to this function.
SupportedLanguages | A pointer to a Null-terminated ASCII string that contains a set of language codes in the format specified by Iso639Language. |
Iso639Language | If TRUE, then all language codes are assumed to be in ISO 639-2 format. If FALSE, then all language codes are assumed to be in RFC 4646 language format. |
NULL | The best matching language could not be found in SupportedLanguages. |
NULL | There are not enough resources available to return the best matching language. |
Other | A pointer to a Null-terminated ASCII string that is the best matching language in SupportedLanguages. |
Definition at line 204 of file DriverHealthManagerDxe.c.
VOID DriverHealthManagerUpdateForm | ( | BOOLEAN | ConfigureOnly | ) |
Update the form to include the driver health instances.
ConfigureOnly | Only include the configure required driver health instances when TRUE, include all the driver health instances otherwise. |
Definition at line 685 of file DriverHealthManagerDxe.c.
EFI_STATUS EFIAPI InitializeDriverHealthManager | ( | EFI_HANDLE | ImageHandle, |
EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Install the health manager forms. One will be used by BDS core to configure the Configured Required driver health instances, the other will be automatically included by firmware setup (UI).
ImageHandle | The image handle. |
SystemTable | The system table. |
EFI_SUCEESS | The health manager forms are successfully installed. |
Definition at line 141 of file DriverHealthManagerDxe.c.
EFI_HII_CONFIG_ACCESS_PROTOCOL mDriverHealthManagerConfigAccess |
Definition at line 16 of file DriverHealthManagerDxe.c.
EFI_HII_DATABASE_PROTOCOL* mDriverHealthManagerDatabase |
Definition at line 49 of file DriverHealthManagerDxe.c.
EFI_GUID mDriverHealthManagerForm = DRIVER_HEALTH_MANAGER_FORMSET_GUID |
Definition at line 22 of file DriverHealthManagerDxe.c.
FORM_DEVICE_PATH mDriverHealthManagerFormDevicePath |
Definition at line 24 of file DriverHealthManagerDxe.c.
EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO* mDriverHealthManagerHealthInfo = NULL |
Definition at line 47 of file DriverHealthManagerDxe.c.
UINTN mDriverHealthManagerHealthInfoCount = 0 |
Definition at line 48 of file DriverHealthManagerDxe.c.
EFI_HII_HANDLE mDriverHealthManagerHiiHandle |
Definition at line 46 of file DriverHealthManagerDxe.c.