MdeModulePkg: Skip registering BootManagerMenu if absent
This is a enhancement to support the case when platform firmware doesn't support Boot Manager Menu. For now, if BootManagerMenu FFS can not be retrieved from FV, BDS core code will still register a boot option for it. Then, this non-functional boot option will still be booted by user's request (like HotKey or Exit from shell) to cause additional boot time and error status code reported. Therefore, it would be good to skip BootManagerMenu boot option registration and then return error status and Invalid BootOption data for this case so that the BootManagerBoot() or other consumers can directly return without doing anything. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sunny Wang <sunnywang@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@ -418,12 +418,16 @@ EfiBootManagerBoot (
|
||||
);
|
||||
|
||||
/**
|
||||
Return the Boot Manager Menu.
|
||||
|
||||
Return the boot option corresponding to the Boot Manager Menu.
|
||||
It may automatically create one if the boot option hasn't been created yet.
|
||||
|
||||
@param BootOption Return the Boot Manager Menu.
|
||||
|
||||
@retval EFI_SUCCESS The Boot Manager Menu is successfully returned.
|
||||
@retval EFI_NOT_FOUND The Boot Manager Menu is not found.
|
||||
@retval EFI_NOT_FOUND The Boot Manager Menu cannot be found.
|
||||
@retval others Return status of gRT->SetVariable (). BootOption still points
|
||||
to the Boot Manager Menu even the Status is not EFI_SUCCESS
|
||||
and EFI_NOT_FOUND.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
Reference in New Issue
Block a user