From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.11261.1613753354962113555 for ; Fri, 19 Feb 2021 08:49:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LzEiFAlO; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613753354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5gs4IdvhW1Vi9iqCeFjlwiqTKNlb4j+uwF/nynjxHzo=; b=LzEiFAlOM3clCI9vpoaZeluJ5Wjzq2J0Xn0Jppb3rIgWDT4Dg9Lrdf1XkTot2a+fxKQPr8 SUz5yazvCiK3jRWOk93DKq8i2ucUVy1hqiu0UeiO2+TdCfT0/4QXe/rBSdQnKafxEABzrp 5Hy61M6DolrAeQZ+WpZsHP4uNXj5CP4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-72-1VWoPPNVPcW4v5o8HaX0EA-1; Fri, 19 Feb 2021 11:49:10 -0500 X-MC-Unique: 1VWoPPNVPcW4v5o8HaX0EA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B6101005501; Fri, 19 Feb 2021 16:49:09 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-87.ams2.redhat.com [10.36.113.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4E9319801; Fri, 19 Feb 2021 16:49:07 +0000 (UTC) Subject: Re: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder To: Walon Li , devel@edk2.groups.io Cc: sunnywang@hpe.com, ray.ni@intel.com, hao.a.wu@intel.com, gaoliming@byosoft.com.cn References: <20210219093931.1458-1-walon.li@hpe.com> From: "Laszlo Ersek" Message-ID: <48a9a3dc-57b1-4d34-d51e-2a3418d1e696@redhat.com> Date: Fri, 19 Feb 2021 17:49:07 +0100 MIME-Version: 1.0 In-Reply-To: <20210219093931.1458-1-walon.li@hpe.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/19/21 10:39, Walon Li wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135 > > When Boot Menu does not exist in the BootOrder, BmRegisterBootManagerMenu > will create one into list. However, it should be put at the "end" of > BootOrder instead of "start" of BootOrder. Replace 0 by -1 to adjust > order of load options. > > Signed-off-by: Walon Li > --- > MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > index aff620ad52..6cc34d29c0 100644 > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > @@ -3,7 +3,7 @@ > > Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. > Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
> -(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
> +(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
> SPDX-License-Identifier: BSD-2-Clause-Patent > > **/ > @@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu ( > EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); > ); > > - return EfiBootManagerAddLoadOptionVariable (BootOption, 0); > + return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1); > } > > /** > Acked-by: Laszlo Ersek