mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 16:44:10 +02:00
MdeModulePkg/BdsDxe: Fix bug to run non-first PlatformRecovery####
The implementation doesn't check the LoadOptions[Index].Status but only depends on the Status returned from EfiBootManagerProcessLoadOption(), which results only the first PlatformRecovery#### runs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jie Lin <jie.lin@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
This commit is contained in:
parent
3fc46b79d8
commit
de67c35c8a
@ -443,17 +443,28 @@ ProcessLoadOptions (
|
|||||||
LoadOptionType = LoadOptions[Index].OptionType;
|
LoadOptionType = LoadOptions[Index].OptionType;
|
||||||
}
|
}
|
||||||
ASSERT (LoadOptionType == LoadOptions[Index].OptionType);
|
ASSERT (LoadOptionType == LoadOptions[Index].OptionType);
|
||||||
|
ASSERT (LoadOptionType != LoadOptionTypeBoot);
|
||||||
|
|
||||||
Status = EfiBootManagerProcessLoadOption (&LoadOptions[Index]);
|
Status = EfiBootManagerProcessLoadOption (&LoadOptions[Index]);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Status indicates whether the load option is loaded and executed
|
||||||
|
// LoadOptions[Index].Status is what the load option returns
|
||||||
|
//
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if (LoadOptionType == LoadOptionTypePlatformRecovery) {
|
//
|
||||||
//
|
// Stop processing if any PlatformRecovery#### returns success.
|
||||||
// Stop processing if any entry is successful
|
//
|
||||||
//
|
if ((LoadOptions[Index].Status == EFI_SUCCESS) &&
|
||||||
|
(LoadOptionType == LoadOptionTypePlatformRecovery)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT) != 0) {
|
|
||||||
|
//
|
||||||
|
// Only set ReconnectAll flag when the load option executes successfully.
|
||||||
|
//
|
||||||
|
if (!EFI_ERROR (LoadOptions[Index].Status) &&
|
||||||
|
(LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT) != 0) {
|
||||||
ReconnectAll = TRUE;
|
ReconnectAll = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user