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

Go to the source code of this file.

Functions

CHAR16 * BmGetControllerName (IN EFI_HANDLE DriverHealthHandle, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle)
 
VOID BmDisplayMessages (IN EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo)
 
EFI_STATUS EFIAPI BmRepairNotify (IN UINTN Value, IN UINTN Limit)
 
EFI_STATUS BmGetSingleControllerHealthStatus (IN OUT EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO **DriverHealthInfo, IN OUT UINTN *Count, IN EFI_HANDLE DriverHealthHandle, IN EFI_HANDLE ControllerHandle OPTIONAL, IN EFI_HANDLE ChildHandle OPTIONAL)
 
EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *EFIAPI EfiBootManagerGetDriverHealthInfo (UINTN *Count)
 
EFI_STATUS EFIAPI EfiBootManagerFreeDriverHealthInfo (EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo, UINTN Count)
 
VOID BmRepairAllControllers (UINTN ReconnectRepairCount)
 

Variables

GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 * mBmHealthStatusText []
 

Detailed Description

Library functions which relates with driver health.

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

Definition in file BmDriverHealth.c.

Function Documentation

◆ BmDisplayMessages()

VOID BmDisplayMessages ( IN EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO DriverHealthInfo)

Display a set of messages returned by the GetHealthStatus () service of the EFI Driver Health Protocol

Parameters
DriverHealthInfoPointer to the Driver Health information entry.

Definition at line 113 of file BmDriverHealth.c.

◆ BmGetControllerName()

CHAR16 * BmGetControllerName ( IN EFI_HANDLE  DriverHealthHandle,
IN EFI_HANDLE  ControllerHandle,
IN EFI_HANDLE  ChildHandle 
)

Return the controller name.

Parameters
DriverHealthHandleThe handle on which the Driver Health protocol instance is retrieved.
ControllerHandleThe handle of a controller that the driver specified by DriverBindingHandle is managing. This handle specifies the controller whose name is to be returned.
ChildHandleThe 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.
Returns
A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle.

Definition at line 39 of file BmDriverHealth.c.

◆ BmGetSingleControllerHealthStatus()

EFI_STATUS BmGetSingleControllerHealthStatus ( IN OUT EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO **  DriverHealthInfo,
IN OUT UINTN Count,
IN EFI_HANDLE  DriverHealthHandle,
IN EFI_HANDLE ControllerHandle  OPTIONAL,
IN EFI_HANDLE ChildHandle  OPTIONAL 
)

Collect the Driver Health status of a single controller.

Parameters
DriverHealthInfoA pointer to the array containing all of the platform driver health information.
CountReturn the updated array count.
DriverHealthHandleThe handle on which the Driver Health protocol instance is retrieved.
ControllerHandleThe handle of the controller..
ChildHandleThe handle of the child controller to retrieve the health status on. This is an optional parameter that may be NULL.
Return values
StatusThe status returned from GetHealthStatus.
EFI_ABORTEDThe health status is healthy so no further query is needed.

Definition at line 192 of file BmDriverHealth.c.

◆ BmRepairAllControllers()

VOID BmRepairAllControllers ( UINTN  ReconnectRepairCount)

Repair all the controllers according to the Driver Health status queried.

Parameters
ReconnectRepairCountTo record the number of recursive call of this function itself.

Definition at line 429 of file BmDriverHealth.c.

◆ BmRepairNotify()

EFI_STATUS EFIAPI BmRepairNotify ( IN UINTN  Value,
IN UINTN  Limit 
)

The repair notify function.

Parameters
ValueA value between 0 and Limit that identifies the current progress of the repair operation.
LimitThe 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.
Return values
EFI_SUCCESSSuccessfully return from the notify function.

Definition at line 166 of file BmDriverHealth.c.

◆ EfiBootManagerFreeDriverHealthInfo()

EFI_STATUS EFIAPI EfiBootManagerFreeDriverHealthInfo ( EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO DriverHealthInfo,
UINTN  Count 
)

Free the Driver Health information array.

Parameters
DriverHealthInfoPointer to array of the Driver Health information.
CountCount of the array.
Return values
EFI_SUCCESSThe array is freed.
EFI_INVALID_PARAMETERThe array is NULL.

Definition at line 406 of file BmDriverHealth.c.

◆ EfiBootManagerGetDriverHealthInfo()

EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *EFIAPI EfiBootManagerGetDriverHealthInfo ( UINTN Count)

Return all the Driver Health information.

When the cumulative health status of all the controllers managed by the driver who produces the EFI_DRIVER_HEALTH_PROTOCOL is healthy, only one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry is created for such EFI_DRIVER_HEALTH_PROTOCOL instance. Otherwise, every controller creates one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry. Additionally every child controller creates one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry if the driver is a bus driver.

Parameters
CountReturn the count of the Driver Health information.
Return values
NULLNo Driver Health information is returned.
!NULLPointer to the Driver Health information array.

Definition at line 288 of file BmDriverHealth.c.

Variable Documentation

◆ mBmHealthStatusText

GLOBAL_REMOVE_IF_UNREFERENCED CHAR16* mBmHealthStatusText[]
Initial value:
= {
L"Healthy",
L"Repair Required",
L"Configuration Required",
L"Failed",
L"Reconnect Required",
L"Reboot Required"
}

Definition at line 14 of file BmDriverHealth.c.