From nobody Sun May 19 09:08:41 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+74933+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+74933+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1620700253; cv=none; d=zohomail.com; s=zohoarc; b=cpiG+GpFyBLjtOPiQlxoHWmMo0RbdKGHJdViqYONQ2d4q8U2uVqOm2R00nrXDbYqQNSy7I336rFBLnqbHN8YWpv+FzUakWKO9asI9Adu0A8pS1sjEL1yxjMzrlVZEB4/KC0DxI7HyXAzt3waSHjv7SPnNs2uEqCasn7riYeycnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620700253; 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=MjU9toWVgtCW0f4x0NINcbBU9yEbIlbsF6ZC7Kilngk=; b=hQCmeSbPr5hf14vBFMaAXylFyDGFtr7GhbqMX3qOsnStjDAjZVP/4mQ9yBSMCRotdSSBh1uO7gnVUWmUuzotKM4zy2Sbjp6Nua6TjJ7sUDXG60e01ru5+1RUFWm1G5174vCsWEzKoYQqDsf95wfAjDYdaXXFcXs/+FIz00dnIo4= 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+74933+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 162070025384425.89544441088617; Mon, 10 May 2021 19:30:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id c5yGYY1788612xZ8KbBi7qk5; Mon, 10 May 2021 19:30:53 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.7294.1620700251470476148 for ; Mon, 10 May 2021 19:30:52 -0700 IronPort-SDR: 1zx7n1+Am8nvqv2jORP/TW/AKxQPwDys9hAGShYoNtyEe7SVlIOae9kvnck3FqGhPB8GUVKdz/ +lf/++fsXwiA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="178928663" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="178928663" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 19:30:36 -0700 IronPort-SDR: NqLEUKqcyN6CFmmqwB5F0q17dVS8i/vVt6TuzmSRy0f6vgVYmemGW1V2+ENDDnhFt0L9hgp4HU oHPJ4cOhZHTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="470982138" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by orsmga001.jf.intel.com with ESMTP; 10 May 2021 19:30:22 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Zhichao Gao , Ray Ni Subject: [edk2-devel] [Patch V2] MdeModulePkg: Retrive boot manager menu from any fv Date: Tue, 11 May 2021 10:30:09 +0800 Message-Id: <20210511023009.1744-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: 2ONWEpvBiAycf6Mf6GWFvmunx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620700253; bh=MoRsrzSlEbxfuG/GzeLrUH2F+O+kVyIzCH8GLWsFUIA=; h=Cc:Date:From:Reply-To:Subject:To; b=NXLV4HXQ4e2g3d9Xvj3NoLBCzFhmbpKM3nDGdgWyESovTHAsNCX1WrhqzE+zsNyb91a kqZGe7+GmttvTQ6RuXk/f+OM0+Oe10op1t8NCTcy61+77SZASTH0pWbMlbes3bWhcH/63 /Ot+Ms0yHhFd3RAuglWhIVr50otRxyMCt9A= 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 Signed-off-by: Zhiguang Liu --- 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 (#74933): https://edk2.groups.io/g/devel/message/74933 Mute This Topic: https://groups.io/mt/82737663/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-