* [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-15 6:33 [RFC MdeModulePkg/UefiBootManagerLib v1 0/1] " Ming Huang
@ 2018-09-15 6:33 ` Ming Huang
0 siblings, 0 replies; 9+ messages in thread
From: Ming Huang @ 2018-09-15 6:33 UTC (permalink / raw)
To: huangming23, edk2-devel
When some type raid cards is not healthy, such as Broadcom 3108/3508
raid card, board will enter endless loop in BmRepairAllControllers()
and can't show configuration formset which need to repair raid card.
DriverHealthManagerDxe is added to platform dsc/fdf, driver health
manager menu can show drivers which are not healthy, but raid card
can not be repaired by the menus under Device Manager. This modification
of BmRepairAllControllers() can show configuration formset for repair
when booting an option.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 2 +
MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c | 48 +++++++++++++++++++-
2 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
index 228b91033695..b9f96c763ff6 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
@@ -89,6 +89,8 @@ [Guids]
gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
gEfiDiskInfoSdMmcInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
+ gEfiHiiDriverHealthFormsetGuid
+ gEfiHiiPlatformSetupFormsetGuid
[Protocols]
gEfiPciRootBridgeIoProtocolGuid ## CONSUMES
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
index ecd01bbb81e3..fd47651ec937 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
@@ -421,6 +421,47 @@ EfiBootManagerFreeDriverHealthInfo (
return gBS->FreePool (DriverHealthInfo);
}
+STATIC
+VOID
+ShowConfigureForm (
+ EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2,
+ EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo
+ )
+{
+ EFI_STATUS Status;
+ EFI_HII_HANDLE FormHiiHandle;
+ EFI_DRIVER_HEALTH_STATUS HealthStatus;
+
+ if (DriverHealthInfo != NULL) {
+ Status = DriverHealthInfo->DriverHealth->GetHealthStatus (
+ DriverHealthInfo->DriverHealth,
+ DriverHealthInfo->ControllerHandle,
+ DriverHealthInfo->ChildHandle,
+ &HealthStatus,
+ NULL,
+ &FormHiiHandle
+ );
+ if (!EFI_ERROR (Status) &&
+ (HealthStatus == EfiDriverHealthStatusConfigurationRequired) &&
+ (FormHiiHandle != NULL)) {
+ Status = FormBrowser2->SendForm (
+ FormBrowser2,
+ &FormHiiHandle,
+ 1,
+ &gEfiHiiPlatformSetupFormsetGuid,
+ 0,
+ NULL,
+ NULL
+ );
+ if (EFI_ERROR (Status)) {
+ Print (L"Show configurae menu:%r\n", Status);
+ }
+ }
+ }
+
+ return;
+}
+
/**
Repair all the controllers according to the Driver Health status queried.
@@ -434,6 +475,7 @@ BmRepairAllControllers (
{
EFI_STATUS Status;
EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo;
+ EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *InfoConfigurationRequired;
EFI_DRIVER_HEALTH_STATUS HealthStatus;
UINTN Count;
UINTN Index;
@@ -462,6 +504,7 @@ BmRepairAllControllers (
do {
RepairRequired = FALSE;
ConfigurationRequired = FALSE;
+ InfoConfigurationRequired = NULL;
//
// Deal with Repair Required
@@ -470,6 +513,7 @@ BmRepairAllControllers (
for (Index = 0; Index < Count; Index++) {
if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusConfigurationRequired) {
ConfigurationRequired = TRUE;
+ InfoConfigurationRequired = &DriverHealthInfo[Index];
}
if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusRepairRequired) {
@@ -494,6 +538,7 @@ BmRepairAllControllers (
);
if (!EFI_ERROR (Status) && (HealthStatus == EfiDriverHealthStatusConfigurationRequired)) {
ConfigurationRequired = TRUE;
+ InfoConfigurationRequired = &DriverHealthInfo[Index];
}
}
}
@@ -507,12 +552,13 @@ BmRepairAllControllers (
FormBrowser2,
&HiiHandles[Index],
1,
- PcdGetPtr (PcdDriverHealthConfigureForm),
+ &gEfiHiiDriverHealthFormsetGuid,
0,
NULL,
NULL
);
if (!EFI_ERROR (Status)) {
+ ShowConfigureForm (FormBrowser2, InfoConfigurationRequired);
break;
}
}
--
2.18.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [RFC MdeModulePkg/UefiBootManagerLib v1 0/1] Fix raid card repair fail issue
@ 2018-09-15 6:36 Ming Huang
2018-09-15 6:36 ` [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: " Ming Huang
0 siblings, 1 reply; 9+ messages in thread
From: Ming Huang @ 2018-09-15 6:36 UTC (permalink / raw)
To: linaro-uefi, edk2-devel, star.zeng, eric.dong
Cc: leif.lindholm, ard.biesheuvel, michael.d.kinney, liming.gao,
wanghuiqiang, huangming23, zhangjinsong2, huangdaode, waip23,
Ming Huang
When some type raid cards is not healthy, such as Broadcom 3108/3508
raid card, board will enter endless loop in BmRepairAllControllers()
and can't show configuration formset which need to repair raid card.
Ming Huang (1):
MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
.../UefiBootManagerLib/UefiBootManagerLib.inf | 2 +
.../UefiBootManagerLib/BmDriverHealth.c | 48 ++++++++++++++++++-
2 files changed, 49 insertions(+), 1 deletion(-)
--
2.18.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-15 6:36 [RFC MdeModulePkg/UefiBootManagerLib v1 0/1] Fix raid card repair fail issue Ming Huang
@ 2018-09-15 6:36 ` Ming Huang
2018-09-18 9:40 ` Ni, Ruiyu
2018-09-26 5:00 ` Ni, Ruiyu
0 siblings, 2 replies; 9+ messages in thread
From: Ming Huang @ 2018-09-15 6:36 UTC (permalink / raw)
To: linaro-uefi, edk2-devel, star.zeng, eric.dong
Cc: leif.lindholm, ard.biesheuvel, michael.d.kinney, liming.gao,
wanghuiqiang, huangming23, zhangjinsong2, huangdaode, waip23,
Ming Huang
When some type raid cards is not healthy, such as Broadcom 3108/3508
raid card, board will enter endless loop in BmRepairAllControllers()
and can't show configuration formset which need to repair raid card.
DriverHealthManagerDxe is added to platform dsc/fdf, driver health
manager menu can show drivers which are not healthy, but raid card
can not be repaired by the menus under Device Manager. This modification
of BmRepairAllControllers() can show configuration formset for repair
when booting an option.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>
---
MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 2 +
MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c | 48 +++++++++++++++++++-
2 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
index 228b91033695..b9f96c763ff6 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
@@ -89,6 +89,8 @@ [Guids]
gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
gEfiDiskInfoSdMmcInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
+ gEfiHiiDriverHealthFormsetGuid
+ gEfiHiiPlatformSetupFormsetGuid
[Protocols]
gEfiPciRootBridgeIoProtocolGuid ## CONSUMES
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
index ecd01bbb81e3..fd47651ec937 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
@@ -421,6 +421,47 @@ EfiBootManagerFreeDriverHealthInfo (
return gBS->FreePool (DriverHealthInfo);
}
+STATIC
+VOID
+ShowConfigureForm (
+ EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2,
+ EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo
+ )
+{
+ EFI_STATUS Status;
+ EFI_HII_HANDLE FormHiiHandle;
+ EFI_DRIVER_HEALTH_STATUS HealthStatus;
+
+ if (DriverHealthInfo != NULL) {
+ Status = DriverHealthInfo->DriverHealth->GetHealthStatus (
+ DriverHealthInfo->DriverHealth,
+ DriverHealthInfo->ControllerHandle,
+ DriverHealthInfo->ChildHandle,
+ &HealthStatus,
+ NULL,
+ &FormHiiHandle
+ );
+ if (!EFI_ERROR (Status) &&
+ (HealthStatus == EfiDriverHealthStatusConfigurationRequired) &&
+ (FormHiiHandle != NULL)) {
+ Status = FormBrowser2->SendForm (
+ FormBrowser2,
+ &FormHiiHandle,
+ 1,
+ &gEfiHiiPlatformSetupFormsetGuid,
+ 0,
+ NULL,
+ NULL
+ );
+ if (EFI_ERROR (Status)) {
+ Print (L"Show configurae menu:%r\n", Status);
+ }
+ }
+ }
+
+ return;
+}
+
/**
Repair all the controllers according to the Driver Health status queried.
@@ -434,6 +475,7 @@ BmRepairAllControllers (
{
EFI_STATUS Status;
EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo;
+ EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *InfoConfigurationRequired;
EFI_DRIVER_HEALTH_STATUS HealthStatus;
UINTN Count;
UINTN Index;
@@ -462,6 +504,7 @@ BmRepairAllControllers (
do {
RepairRequired = FALSE;
ConfigurationRequired = FALSE;
+ InfoConfigurationRequired = NULL;
//
// Deal with Repair Required
@@ -470,6 +513,7 @@ BmRepairAllControllers (
for (Index = 0; Index < Count; Index++) {
if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusConfigurationRequired) {
ConfigurationRequired = TRUE;
+ InfoConfigurationRequired = &DriverHealthInfo[Index];
}
if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusRepairRequired) {
@@ -494,6 +538,7 @@ BmRepairAllControllers (
);
if (!EFI_ERROR (Status) && (HealthStatus == EfiDriverHealthStatusConfigurationRequired)) {
ConfigurationRequired = TRUE;
+ InfoConfigurationRequired = &DriverHealthInfo[Index];
}
}
}
@@ -507,12 +552,13 @@ BmRepairAllControllers (
FormBrowser2,
&HiiHandles[Index],
1,
- PcdGetPtr (PcdDriverHealthConfigureForm),
+ &gEfiHiiDriverHealthFormsetGuid,
0,
NULL,
NULL
);
if (!EFI_ERROR (Status)) {
+ ShowConfigureForm (FormBrowser2, InfoConfigurationRequired);
break;
}
}
--
2.18.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-15 6:36 ` [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: " Ming Huang
@ 2018-09-18 9:40 ` Ni, Ruiyu
2018-09-19 2:10 ` Ming Huang
2018-09-26 5:00 ` Ni, Ruiyu
1 sibling, 1 reply; 9+ messages in thread
From: Ni, Ruiyu @ 2018-09-18 9:40 UTC (permalink / raw)
To: Ming Huang, linaro-uefi, edk2-devel, star.zeng, eric.dong
Cc: huangming23, zhangjinsong2, liming.gao, michael.d.kinney, waip23,
wanghuiqiang, huangdaode
On 9/15/2018 2:36 PM, Ming Huang wrote:
> When some type raid cards is not healthy, such as Broadcom 3108/3508
> raid card, board will enter endless loop in BmRepairAllControllers()
> and can't show configuration formset which need to repair raid card.
>
> DriverHealthManagerDxe is added to platform dsc/fdf, driver health
> manager menu can show drivers which are not healthy, but raid card
> can not be repaired by the menus under Device Manager. This modification
> of BmRepairAllControllers() can show configuration formset for repair
> when booting an option.
I developed that driver and the driver health related code in BDS
library. But I a bit forgot the details.
Can you explain why the driver health manager driver cannot handle such
case?
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang <ming.huang@linaro.org>
> ---
> MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 2 +
> MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c | 48 +++++++++++++++++++-
> 2 files changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> index 228b91033695..b9f96c763ff6 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> @@ -89,6 +89,8 @@ [Guids]
> gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
> gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
> gEfiDiskInfoSdMmcInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
> + gEfiHiiDriverHealthFormsetGuid
> + gEfiHiiPlatformSetupFormsetGuid
>
> [Protocols]
> gEfiPciRootBridgeIoProtocolGuid ## CONSUMES
> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
> index ecd01bbb81e3..fd47651ec937 100644
> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
> @@ -421,6 +421,47 @@ EfiBootManagerFreeDriverHealthInfo (
> return gBS->FreePool (DriverHealthInfo);
> }
>
> +STATIC
> +VOID
> +ShowConfigureForm (
> + EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2,
> + EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo
> + )
> +{
> + EFI_STATUS Status;
> + EFI_HII_HANDLE FormHiiHandle;
> + EFI_DRIVER_HEALTH_STATUS HealthStatus;
> +
> + if (DriverHealthInfo != NULL) {
> + Status = DriverHealthInfo->DriverHealth->GetHealthStatus (
> + DriverHealthInfo->DriverHealth,
> + DriverHealthInfo->ControllerHandle,
> + DriverHealthInfo->ChildHandle,
> + &HealthStatus,
> + NULL,
> + &FormHiiHandle
> + );
> + if (!EFI_ERROR (Status) &&
> + (HealthStatus == EfiDriverHealthStatusConfigurationRequired) &&
> + (FormHiiHandle != NULL)) {
> + Status = FormBrowser2->SendForm (
> + FormBrowser2,
> + &FormHiiHandle,
> + 1,
> + &gEfiHiiPlatformSetupFormsetGuid,
> + 0,
> + NULL,
> + NULL
> + );
> + if (EFI_ERROR (Status)) {
> + Print (L"Show configurae menu:%r\n", Status);
> + }
> + }
> + }
> +
> + return;
> +}
> +
> /**
> Repair all the controllers according to the Driver Health status queried.
>
> @@ -434,6 +475,7 @@ BmRepairAllControllers (
> {
> EFI_STATUS Status;
> EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo;
> + EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *InfoConfigurationRequired;
> EFI_DRIVER_HEALTH_STATUS HealthStatus;
> UINTN Count;
> UINTN Index;
> @@ -462,6 +504,7 @@ BmRepairAllControllers (
> do {
> RepairRequired = FALSE;
> ConfigurationRequired = FALSE;
> + InfoConfigurationRequired = NULL;
>
> //
> // Deal with Repair Required
> @@ -470,6 +513,7 @@ BmRepairAllControllers (
> for (Index = 0; Index < Count; Index++) {
> if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusConfigurationRequired) {
> ConfigurationRequired = TRUE;
> + InfoConfigurationRequired = &DriverHealthInfo[Index];
> }
>
> if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusRepairRequired) {
> @@ -494,6 +538,7 @@ BmRepairAllControllers (
> );
> if (!EFI_ERROR (Status) && (HealthStatus == EfiDriverHealthStatusConfigurationRequired)) {
> ConfigurationRequired = TRUE;
> + InfoConfigurationRequired = &DriverHealthInfo[Index];
> }
> }
> }
> @@ -507,12 +552,13 @@ BmRepairAllControllers (
> FormBrowser2,
> &HiiHandles[Index],
> 1,
> - PcdGetPtr (PcdDriverHealthConfigureForm),
> + &gEfiHiiDriverHealthFormsetGuid,
> 0,
> NULL,
> NULL
> );
> if (!EFI_ERROR (Status)) {
> + ShowConfigureForm (FormBrowser2, InfoConfigurationRequired);
> break;
> }
> }
>
--
Thanks,
Ray
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-18 9:40 ` Ni, Ruiyu
@ 2018-09-19 2:10 ` Ming Huang
0 siblings, 0 replies; 9+ messages in thread
From: Ming Huang @ 2018-09-19 2:10 UTC (permalink / raw)
To: Ni, Ruiyu, linaro-uefi, edk2-devel, star.zeng, eric.dong
Cc: huangming23, zhangjinsong2, liming.gao, michael.d.kinney, waip23,
wanghuiqiang, huangdaode
On 9/18/2018 5:40 PM, Ni, Ruiyu wrote:
> On 9/15/2018 2:36 PM, Ming Huang wrote:
>> When some type raid cards is not healthy, such as Broadcom 3108/3508
>> raid card, board will enter endless loop in BmRepairAllControllers()
>> and can't show configuration formset which need to repair raid card.
>>
>> DriverHealthManagerDxe is added to platform dsc/fdf, driver health
>> manager menu can show drivers which are not healthy, but raid card
>> can not be repaired by the menus under Device Manager. This modification
>> of BmRepairAllControllers() can show configuration formset for repair
>> when booting an option.
>
> I developed that driver and the driver health related code in BDS library. But I a bit forgot the details.
>
> Can you explain why the driver health manager driver cannot handle such case?
For Device Manager:
When DriverHealthManagerDxe is added, I find a not healthy case of 3108/3508
raid caid that can not repair by DeviceManager menu:
1 enter the "AVAGO MegaRAID <SAS3108> Driver Health Protocal Utility" menu,
2 show a form "Press any key to continue, or 'C' to load the configuration utility"
3 Press 'C', then no more form be show.
This is not enouth to repair the card. The card is not healthy after reset board.
For repair card, the "AVAGO MegaRAID <SAS3108> Configuration Utility" should be show
to user to change some items, then card can be repaired after reset board.
For BmRepairAllControllers():
When card is no healthy and boot an option, BmRepairAllControllers() is invoked,
then show the "Driver Health Manager" menu, but Esc can not exit from this menu,
and repair form can not be show, nothing can do here except reset the board.
Thanks,
Ming
>
>
>
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ming Huang <ming.huang@linaro.org>
>> ---
>> MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 2 +
>> MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c | 48 +++++++++++++++++++-
>> 2 files changed, 49 insertions(+), 1 deletion(-)
>>
>> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>> index 228b91033695..b9f96c763ff6 100644
>> --- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>> +++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>> @@ -89,6 +89,8 @@ [Guids]
>> gEfiDiskInfoIdeInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
>> gEfiDiskInfoScsiInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
>> gEfiDiskInfoSdMmcInterfaceGuid ## SOMETIMES_CONSUMES ## GUID
>> + gEfiHiiDriverHealthFormsetGuid
>> + gEfiHiiPlatformSetupFormsetGuid
>> [Protocols]
>> gEfiPciRootBridgeIoProtocolGuid ## CONSUMES
>> diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
>> index ecd01bbb81e3..fd47651ec937 100644
>> --- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
>> +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
>> @@ -421,6 +421,47 @@ EfiBootManagerFreeDriverHealthInfo (
>> return gBS->FreePool (DriverHealthInfo);
>> }
>> +STATIC
>> +VOID
>> +ShowConfigureForm (
>> + EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2,
>> + EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo
>> + )
>> +{
>> + EFI_STATUS Status;
>> + EFI_HII_HANDLE FormHiiHandle;
>> + EFI_DRIVER_HEALTH_STATUS HealthStatus;
>> +
>> + if (DriverHealthInfo != NULL) {
>> + Status = DriverHealthInfo->DriverHealth->GetHealthStatus (
>> + DriverHealthInfo->DriverHealth,
>> + DriverHealthInfo->ControllerHandle,
>> + DriverHealthInfo->ChildHandle,
>> + &HealthStatus,
>> + NULL,
>> + &FormHiiHandle
>> + );
>> + if (!EFI_ERROR (Status) &&
>> + (HealthStatus == EfiDriverHealthStatusConfigurationRequired) &&
>> + (FormHiiHandle != NULL)) {
>> + Status = FormBrowser2->SendForm (
>> + FormBrowser2,
>> + &FormHiiHandle,
>> + 1,
>> + &gEfiHiiPlatformSetupFormsetGuid,
>> + 0,
>> + NULL,
>> + NULL
>> + );
>> + if (EFI_ERROR (Status)) {
>> + Print (L"Show configurae menu:%r\n", Status);
>> + }
>> + }
>> + }
>> +
>> + return;
>> +}
>> +
>> /**
>> Repair all the controllers according to the Driver Health status queried.
>> @@ -434,6 +475,7 @@ BmRepairAllControllers (
>> {
>> EFI_STATUS Status;
>> EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo;
>> + EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *InfoConfigurationRequired;
>> EFI_DRIVER_HEALTH_STATUS HealthStatus;
>> UINTN Count;
>> UINTN Index;
>> @@ -462,6 +504,7 @@ BmRepairAllControllers (
>> do {
>> RepairRequired = FALSE;
>> ConfigurationRequired = FALSE;
>> + InfoConfigurationRequired = NULL;
>> //
>> // Deal with Repair Required
>> @@ -470,6 +513,7 @@ BmRepairAllControllers (
>> for (Index = 0; Index < Count; Index++) {
>> if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusConfigurationRequired) {
>> ConfigurationRequired = TRUE;
>> + InfoConfigurationRequired = &DriverHealthInfo[Index];
>> }
>> if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusRepairRequired) {
>> @@ -494,6 +538,7 @@ BmRepairAllControllers (
>> );
>> if (!EFI_ERROR (Status) && (HealthStatus == EfiDriverHealthStatusConfigurationRequired)) {
>> ConfigurationRequired = TRUE;
>> + InfoConfigurationRequired = &DriverHealthInfo[Index];
>> }
>> }
>> }
>> @@ -507,12 +552,13 @@ BmRepairAllControllers (
>> FormBrowser2,
>> &HiiHandles[Index],
>> 1,
>> - PcdGetPtr (PcdDriverHealthConfigureForm),
>> + &gEfiHiiDriverHealthFormsetGuid,
>> 0,
>> NULL,
>> NULL
>> );
>> if (!EFI_ERROR (Status)) {
>> + ShowConfigureForm (FormBrowser2, InfoConfigurationRequired);
>> break;
>> }
>> }
>>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-15 6:36 ` [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: " Ming Huang
2018-09-18 9:40 ` Ni, Ruiyu
@ 2018-09-26 5:00 ` Ni, Ruiyu
2018-09-28 6:18 ` Ming Huang
1 sibling, 1 reply; 9+ messages in thread
From: Ni, Ruiyu @ 2018-09-26 5:00 UTC (permalink / raw)
To: Ming Huang, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org,
Zeng, Star, Dong, Eric
Cc: huangming23@huawei.com, zhangjinsong2@huawei.com, Gao, Liming,
Kinney, Michael D, waip23@126.com, wanghuiqiang@huawei.com,
huangdaode@hisilicon.com
> @@ -507,12 +552,13 @@ BmRepairAllControllers (
> FormBrowser2,
> &HiiHandles[Index],
> 1,
> - PcdGetPtr (PcdDriverHealthConfigureForm),
> + &gEfiHiiDriverHealthFormsetGuid,
I still don't quite understand the changes.
But the above specific change removes the PcdDriverHealthConfigureForm form pop up.
Instead it pops up each driver health form one by one.
Why?
> 0,
> NULL,
> NULL
> );
> if (!EFI_ERROR (Status)) {
> + ShowConfigureForm (FormBrowser2,
> + InfoConfigurationRequired);
> break;
> }
> }
> --
> 2.18.0
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-26 5:00 ` Ni, Ruiyu
@ 2018-09-28 6:18 ` Ming Huang
2018-10-08 6:39 ` Ni, Ruiyu
0 siblings, 1 reply; 9+ messages in thread
From: Ming Huang @ 2018-09-28 6:18 UTC (permalink / raw)
To: Ni, Ruiyu, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org,
Zeng, Star, Dong, Eric
Cc: huangming23@huawei.com, zhangjinsong2@huawei.com, Gao, Liming,
Kinney, Michael D, waip23@126.com, wanghuiqiang@huawei.com,
huangdaode@hisilicon.com
On 9/26/2018 1:00 PM, Ni, Ruiyu wrote:
>> @@ -507,12 +552,13 @@ BmRepairAllControllers (
>> FormBrowser2,
>> &HiiHandles[Index],
>> 1,
>> - PcdGetPtr (PcdDriverHealthConfigureForm),
>> + &gEfiHiiDriverHealthFormsetGuid,
>
> I still don't quite understand the changes.
> But the above specific change removes the PcdDriverHealthConfigureForm form pop up.
> Instead it pops up each driver health form one by one.
> Why?
This change is refer to the below function:
ProcessSingleControllerHealth (IntelFrameworkModulePkg/Universal/Bdsdxe/DeviceMngr/DeviceManager.c).
I don't real understand it also, but it works.
>
>> 0,
>> NULL,
>> NULL
>> );
>> if (!EFI_ERROR (Status)) {
>> + ShowConfigureForm (FormBrowser2,
>> + InfoConfigurationRequired);
>> break;
>> }
>> }
>> --
>> 2.18.0
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-09-28 6:18 ` Ming Huang
@ 2018-10-08 6:39 ` Ni, Ruiyu
2018-10-08 12:15 ` Laszlo Ersek
0 siblings, 1 reply; 9+ messages in thread
From: Ni, Ruiyu @ 2018-10-08 6:39 UTC (permalink / raw)
To: Ming Huang, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org,
Zeng, Star, Dong, Eric
Cc: huangming23@huawei.com, Gao, Liming, zhangjinsong2@huawei.com,
Kinney, Michael D, waip23@126.com, wanghuiqiang@huawei.com,
huangdaode@hisilicon.com
On 9/28/2018 2:18 PM, Ming Huang wrote:
>
>
> On 9/26/2018 1:00 PM, Ni, Ruiyu wrote:
>>> @@ -507,12 +552,13 @@ BmRepairAllControllers (
>>> FormBrowser2,
>>> &HiiHandles[Index],
>>> 1,
>>> - PcdGetPtr (PcdDriverHealthConfigureForm),
>>> + &gEfiHiiDriverHealthFormsetGuid,
>>
>> I still don't quite understand the changes.
>> But the above specific change removes the PcdDriverHealthConfigureForm form pop up.
>> Instead it pops up each driver health form one by one.
>> Why?
>
> This change is refer to the below function:
> ProcessSingleControllerHealth (IntelFrameworkModulePkg/Universal/Bdsdxe/DeviceMngr/DeviceManager.c).
> I don't real understand it also, but it works.
>
I am sorry. I cannot review the changes if you cannot explain it:)
Fix should be based on the thoroughly understanding to the issue.
>>
>>> 0,
>>> NULL,
>>> NULL
>>> );
>>> if (!EFI_ERROR (Status)) {
>>> + ShowConfigureForm (FormBrowser2,
>>> + InfoConfigurationRequired);
>>> break;
>>> }
>>> }
>>> --
>>> 2.18.0
>>>
>>> _______________________________________________
>>> edk2-devel mailing list
>>> edk2-devel@lists.01.org
>>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
>
--
Thanks,
Ray
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: Fix raid card repair fail issue
2018-10-08 6:39 ` Ni, Ruiyu
@ 2018-10-08 12:15 ` Laszlo Ersek
0 siblings, 0 replies; 9+ messages in thread
From: Laszlo Ersek @ 2018-10-08 12:15 UTC (permalink / raw)
To: Ni, Ruiyu, Ming Huang, linaro-uefi@lists.linaro.org,
edk2-devel@lists.01.org, Zeng, Star, Dong, Eric
Cc: huangming23@huawei.com, zhangjinsong2@huawei.com, Gao, Liming,
Kinney, Michael D, waip23@126.com, wanghuiqiang@huawei.com,
huangdaode@hisilicon.com
On 10/08/18 08:39, Ni, Ruiyu wrote:
> On 9/28/2018 2:18 PM, Ming Huang wrote:
>>
>>
>> On 9/26/2018 1:00 PM, Ni, Ruiyu wrote:
>>>> @@ -507,12 +552,13 @@ BmRepairAllControllers (
>>>> FormBrowser2,
>>>> &HiiHandles[Index],
>>>> 1,
>>>> - PcdGetPtr
>>>> (PcdDriverHealthConfigureForm),
>>>> + &gEfiHiiDriverHealthFormsetGuid,
>>>
>>> I still don't quite understand the changes.
>>> But the above specific change removes the
>>> PcdDriverHealthConfigureForm form pop up.
>>> Instead it pops up each driver health form one by one.
>>> Why?
>>
>> This change is refer to the below function:
>> ProcessSingleControllerHealth
>> (IntelFrameworkModulePkg/Universal/Bdsdxe/DeviceMngr/DeviceManager.c).
>> I don't real understand it also, but it works.
>>
>
> I am sorry. I cannot review the changes if you cannot explain it:)
> Fix should be based on the thoroughly understanding to the issue.
Could it be that the RAID card driver is buggy?
Thanks
Laszlo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-10-08 12:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-15 6:36 [RFC MdeModulePkg/UefiBootManagerLib v1 0/1] Fix raid card repair fail issue Ming Huang
2018-09-15 6:36 ` [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: " Ming Huang
2018-09-18 9:40 ` Ni, Ruiyu
2018-09-19 2:10 ` Ming Huang
2018-09-26 5:00 ` Ni, Ruiyu
2018-09-28 6:18 ` Ming Huang
2018-10-08 6:39 ` Ni, Ruiyu
2018-10-08 12:15 ` Laszlo Ersek
-- strict thread matches above, loose matches on Subject: below --
2018-09-15 6:33 [RFC MdeModulePkg/UefiBootManagerLib v1 0/1] " Ming Huang
2018-09-15 6:33 ` [RFC MdeModulePkg/UefiBootManagerLib v1 1/1] MdeModulePkg/UefiBootManagerLib: " Ming Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox