From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web08.6290.1613727656177028150 for ; Fri, 19 Feb 2021 01:40:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=UWld9Z8w; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0684958727=walon.li@hpe.com) Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11J9e2UE024295; Fri, 19 Feb 2021 09:40:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pps0720; bh=pZRXj+96wz9faylDmFg1xTFsJGv251xdvOpRcdvqTBY=; b=UWld9Z8wgYTOqGFco/Hx8XfEAELTgCNW0uGHi2RlxVPJwmBWpXUzzkYGSnh2n6tA34ub 5YN2ZPbxpZfWXzWnTsCecZ9JB2o5cJFoYKcQ8/eKj7F0mRQZPqDsgYK9i7rkOPQMEANP a2J4M++vGc6uRdvMN2DUFi+IsauA77tGNpdVTyqJtpBa/9myDKlMYouBECdq8hLEKxCF AmGsVOJg1UbUVXzcZTolYoY1wYeK/K9R31nZYIJQsuM/MSTevChtzk57IOtP9+v+0SQ/ zYzT8P/qlxVCgHN5nXlhn0wfkNavCwNbvkrR8IvoXT6a4WIIPXLJ2oLvNlwLLQmMMFLr OQ== Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 36su906uw6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 09:40:46 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id B989E5C; Fri, 19 Feb 2021 09:40:45 +0000 (UTC) Received: from KIDKMZDU3U.asiapacific.hpqcorp.net (unknown [16.169.10.224]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id E7DD84B; Fri, 19 Feb 2021 09:40:43 +0000 (UTC) From: "Li, Walon" To: devel@edk2.groups.io Cc: walon.li@hpe.com, sunnywang@hpe.com, lersek@redhat.com, ray.ni@intel.com, hao.a.wu@intel.com, gaoliming@byosoft.com.cn Subject: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Date: Fri, 19 Feb 2021 17:39:32 +0800 Message-Id: <20210219093931.1458-1-walon.li@hpe.com> X-Mailer: git-send-email 2.23.0.windows.1 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-19_04:2021-02-18,2021-02-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 suspectscore=0 mlxlogscore=861 mlxscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102190074 Content-Transfer-Encoding: quoted-printable REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3135 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/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index aff620ad52..6cc34d29c0 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -3,7 +3,7 @@ =0D Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.=0D Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
=0D -(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
=0D +(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu ( EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);=0D );=0D =0D - return EfiBootManagerAddLoadOptionVariable (BootOption, 0);=0D + return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1);=0D }=0D =0D /**=0D --=20 2.23.0.windows.1