From nobody Sat May 18 08:46:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+74934+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+74934+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1620700335; cv=none; d=zohomail.com; s=zohoarc; b=jPjWOZ2xf86Am3s/7S5jXEvRolKl/f00O3EGt2hWYnW7UuiXxmpEy2+qZ5idNidbQCoahX84UmDVwsjTG8UGx44GUqSu6hBT693gJp9xf+WAp6lJi0QbHSIOqWUHrl6o512gosgzFbUNcL4mc7jBRdbnafcknB1ugHYhgtz9Ic4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620700335; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=b6e2vk4NUZqgUN7S1q0I/wyH2aAwJTP52bGcrVmHYyE=; b=MR7IguDjcg7MJ45zzPJcOOQLxmCP5sshOWjOKkHcO0O6KDFrd6L1uFmATQiMUaCxgoT2CmmED2+O9JPwVQ1qb2YJrsKMLd2o8aLQoxRfhOp81xnvByjNfd1/gIHUI81siFcOrvfLz1xuX89t/bbjxZSkunITXzb7FXVRJ4nFJUw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+74934+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620700335844518.6881808104805; Mon, 10 May 2021 19:32:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qnkJYY1788612xTfBEN29h8H; Mon, 10 May 2021 19:32:15 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.7260.1620700329127449426 for ; Mon, 10 May 2021 19:32:09 -0700 IronPort-SDR: xW2lyQlBcOpNWzUMLIZ5gJmWMCcUwEgELjbnu1po3sG+1lR0+3CgVlZN5hJ83SMd9Ht/uljn72 8L2775Fk+odQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="220291262" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="220291262" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 19:32:08 -0700 IronPort-SDR: KV1ZHUYU6A4hQOJ0kSxK95iAqJnhXvm3qVlb0p74wg/eoHmhWJfT4MqVTRj/zjX4OouelPRYDB vy4Uos6dHHlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="470982599" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by orsmga001.jf.intel.com with ESMTP; 10 May 2021 19:31:54 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Zhichao Gao , Ray Ni Subject: [edk2-devel] [Patch V3] MdeModulePkg: Retrive boot manager menu from any fv Date: Tue, 11 May 2021 10:31:49 +0800 Message-Id: <20210511023149.1201-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: BzjDKKPTcWTxHNuHr0wGEXfkx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620700335; bh=sdz6EUI7Nwr2/F0Pfd7tCWhhi2vWhlMDUF9pfRtyWf0=; h=Cc:Date:From:Reply-To:Subject:To; b=S5u80VatvruQ4Edf4Yh2ESwmuS469z8iUITNl5v6lFkUrzt6I8qZmyswL4ErV26v1ba WXyK0bO5UPwugHGRifnAiyPmBmObqf9klqXsWVjPi7PK3Bg61cx9m6YftluCGhm4MSa5V b9l9rN+tdVwgrXJYPZ9AKzJtaGa08Qv3Q3I= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Hao A Wu Signed-off-by: Zhiguang Liu Reviewed-by: Ray Ni --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/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. =20 Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. -Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -2385,7 +2385,8 @@ EfiBootManagerRefreshAllBootOption ( This function is called to get or create the boot option for the Boot Ma= nager Menu. =20 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. =20 @param BootOption Return the boot option of the Boot Manager Menu =20 @@ -2437,7 +2438,7 @@ BmRegisterBootManagerMenu ( =20 if (DevicePath =3D=3D NULL) { Data =3D NULL; - Status =3D GetSectionFromFv ( + Status =3D GetSectionFromAnyFv ( PcdGetPtr (PcdBootManagerMenuFile), EFI_SECTION_PE32, 0, @@ -2455,7 +2456,7 @@ BmRegisterBootManagerMenu ( // // Get BootManagerMenu application's description from EFI User Interfa= ce Section. // - Status =3D GetSectionFromFv ( + Status =3D GetSectionFromAnyFv ( PcdGetPtr (PcdBootManagerMenuFile), EFI_SECTION_USER_INTERFACE, 0, --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#74934): https://edk2.groups.io/g/devel/message/74934 Mute This Topic: https://groups.io/mt/82737690/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-