From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.28864.1620634564552872848 for ; Mon, 10 May 2021 01:16:04 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: zhiguang.liu@intel.com) IronPort-SDR: wWTfG0QS0wLAw8VxAxmptqXHyJ8jMzbGh4jlHGYfEpyB8BIZwyZaJZG6XrHi5Ac5emFOZ5jhtA fwnoJdk4siPw== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="196045049" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="196045049" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 01:16:03 -0700 IronPort-SDR: oZlxIWHtSurpkqDbFdO5XudqAg8n3pT4FusSUPCpwprVYVNYOBz19bvn4I9RZ4jZH1s/QXP/z/ t8eNx8BsQqVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="433709132" Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga008.fm.intel.com with ESMTP; 10 May 2021 01:16:01 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Zhichao Gao , Ray Ni Subject: [PATCH] MdeModulePkg: Retrive boot manager menu from any fv Date: Mon, 10 May 2021 16:15:32 +0800 Message-Id: <20210510081532.1073-1-zhiguang.liu@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3384 Currently, UefiBootManagerLib has the below assumption: Assume the BootManagerMenuFile is in the same FV as the module links to t= his library. It has some limitation now, so remove the assumption. Cc: Jian J Wang Cc: Hao A Wu Cc: Zhichao Gao Cc: Ray Ni Signed-off-by: Zhiguang Liu --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index 6cc34d29c0..b8df4d590f 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -2,7 +2,7 @@ Library functions which relates with booting.=0D =0D Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.=0D -Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
=0D (C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -2385,7 +2385,6 @@ EfiBootManagerRefreshAllBootOption ( This function is called to get or create the boot option for the Boot Ma= nager Menu.=0D =0D The Boot Manager Menu is shown after successfully booting a boot option.= =0D - Assume the BootManagerMenuFile is in the same FV as the module links to = this library.=0D =0D @param BootOption Return the boot option of the Boot Manager Menu=0D =0D @@ -2437,7 +2436,7 @@ BmRegisterBootManagerMenu ( =0D if (DevicePath =3D=3D NULL) {=0D Data =3D NULL;=0D - Status =3D GetSectionFromFv (=0D + Status =3D GetSectionFromAnyFv (=0D PcdGetPtr (PcdBootManagerMenuFile),=0D EFI_SECTION_PE32,=0D 0,=0D @@ -2455,7 +2454,7 @@ BmRegisterBootManagerMenu ( //=0D // Get BootManagerMenu application's description from EFI User Interfa= ce Section.=0D //=0D - Status =3D GetSectionFromFv (=0D + Status =3D GetSectionFromAnyFv (=0D PcdGetPtr (PcdBootManagerMenuFile),=0D EFI_SECTION_USER_INTERFACE,=0D 0,=0D --=20 2.30.0.windows.2