summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorZhiguang Liu <zhiguang.liu@intel.com>2021-04-26 16:25:39 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-05-18 13:52:06 +0000
commit42ec0a315b8a2f445b7a7d74b8d78965f1dff8f6 (patch)
treeac4c4eb22adb7d93e2ff231891745a4e7be6cdb3 /MdeModulePkg
parent29e300ff815283259e81822ed3cb926bb9ad6460 (diff)
downloadedk2-42ec0a315b8a2f445b7a7d74b8d78965f1dff8f6.tar.gz
edk2-42ec0a315b8a2f445b7a7d74b8d78965f1dff8f6.tar.bz2
edk2-42ec0a315b8a2f445b7a7d74b8d78965f1dff8f6.zip
MdeModulePkg: Retrieve boot manager menu from any fv
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3384 Currently, UefiBootManagerLib has the below assumption: Assume the BootManagerMenuFile is in the same FV as the module links to this library. It has some limitation now, so remove the assumption. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index 6cc34d29c0..bef41ae102 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -2,7 +2,7 @@
Library functions which relates with booting.
Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
-Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -2385,7 +2385,8 @@ EfiBootManagerRefreshAllBootOption (
This function is called to get or create the boot option for the Boot Manager Menu.
The Boot Manager Menu is shown after successfully booting a boot option.
- Assume the BootManagerMenuFile is in the same FV as the module links to this library.
+ This function will first try to search the BootManagerMenuFile is in the same FV as
+ the module links to this library. If fails, it will search in all FVs.
@param BootOption Return the boot option of the Boot Manager Menu
@@ -2437,7 +2438,7 @@ BmRegisterBootManagerMenu (
if (DevicePath == NULL) {
Data = NULL;
- Status = GetSectionFromFv (
+ Status = GetSectionFromAnyFv (
PcdGetPtr (PcdBootManagerMenuFile),
EFI_SECTION_PE32,
0,
@@ -2455,7 +2456,7 @@ BmRegisterBootManagerMenu (
//
// Get BootManagerMenu application's description from EFI User Interface Section.
//
- Status = GetSectionFromFv (
+ Status = GetSectionFromAnyFv (
PcdGetPtr (PcdBootManagerMenuFile),
EFI_SECTION_USER_INTERFACE,
0,