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.32934.1613986212867339598 for ; Mon, 22 Feb 2021 01:30:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=MbN9K6l1; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0687883a77=sunnywang@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11M9Oiab019849; Mon, 22 Feb 2021 09:29:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=Jn063kLyO/d6j5FhBaa1/3TOPNkeV6Tdg+cjRctnoRQ=; b=MbN9K6l1x8+BaBAAUsumWFO3w4DGN3+kMHu3GrE45hZJ/lFgoy8czYPnS9LcUeOoO3mq kLSytElXvgKF9eCZJdjmyUalDQNiGRUJeymVVmdAHi5tyXjoZj2LuxmSLwfK1NF/rjCU J+X7gRumqqXORk+yYtK6n+2OqNOGyP+PduhfjIDpOB7sCa1YTkFkEl2S0CfW4TzpVF/H VQN7IPJ/RHq5hZ3CNlJiE8b1yiYgLwkjVJwHWaiFihc8Zvfe11wGAnan0f4lO/XmLUb2 4v6mUGwh4vCOvcgWHO/5861Yl6E9T9KIjF4OeEb2f/NLPoaXNT6kkSbRlHzqVQSNb/h5 zw== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 36u11f2af0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Feb 2021 09:29:58 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 0A19A9A; Mon, 22 Feb 2021 09:29:57 +0000 (UTC) Received: from G4W9334.americas.hpqcorp.net (16.208.32.120) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 22 Feb 2021 09:29:57 +0000 Received: from G4W10204.americas.hpqcorp.net (2002:10cf:5210::10cf:5210) by G4W9334.americas.hpqcorp.net (2002:10d0:2078::10d0:2078) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 22 Feb 2021 09:29:56 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.241.52.11) by G4W10204.americas.hpqcorp.net (16.207.82.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 22 Feb 2021 09:29:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DSil9T3Vr+XtinYHKuIGYWlprniE+xCZcRGo/S++kGecJjvkMlrisD1TE0yvMxa00asttA03FVtL7BQZ6lptanHT2lZArK9NfeXzHhgn6Pud/3dOOlWx+JwULrsR+zcio32F6Jk7zGlVyka17r2o68gc1/b5bQvoVudnKe9RyJWD3kF/EfuCGej+wuo0f1AV3cULybIvUKrQeCmS/Fkx+Df2/Ag54Bnr3fXPHA56iUVuZgRy3MWJPGi1oJRU466G4BmNDmVsM5trRbYAzXpzChREoXNEvrnwEOK0t5ptavdujcL8+fu01QdV5yo3pXlwv29AwWwWbtpHYX3iwhvAKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jn063kLyO/d6j5FhBaa1/3TOPNkeV6Tdg+cjRctnoRQ=; b=iyOv3pN/9rSKsm+mSBGPkvJpN5jkOPMDux5CKE17ZFcatn4uGUZZXrxH6CRkYy65BOAmKJ29U30vhS2o/EpbUh2FGvxi8hl2s6YgNppFYMpG8G+NDrVOgOxaKoMHpRAyDNf7qpSqGPHzuCejruyqPpfRIjwwh9UcBCcIubC2a2vsj+6105hcBQfKRUzTtOBTLAOodDp/xDlVbONIW7Zyrzih9m9lhvAWa/gURVWvYq2OdItF9ZAiGP/xqtQkZeJTbKIqliVEqRqCQbvBpayadXeQxQ+P4gXD7pC6oBTORpdawXcfSd5un53XwsVIRuXvNo57AQ7YvC8giU1GL2tkLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from DF4PR8401MB0585.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7609::21) by DF4PR8401MB0458.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7606::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.30; Mon, 22 Feb 2021 09:29:55 +0000 Received: from DF4PR8401MB0585.NAMPRD84.PROD.OUTLOOK.COM ([fe80::49dc:20b6:1bf3:b73b]) by DF4PR8401MB0585.NAMPRD84.PROD.OUTLOOK.COM ([fe80::49dc:20b6:1bf3:b73b%4]) with mapi id 15.20.3868.033; Mon, 22 Feb 2021 09:29:55 +0000 From: "Wang, Sunny (HPS SW)" To: "Li, Walon" , "devel@edk2.groups.io" CC: "lersek@redhat.com" , "ray.ni@intel.com" , "hao.a.wu@intel.com" , "gaoliming@byosoft.com.cn" , "Wang, Sunny (HPS SW)" Subject: Re: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Thread-Topic: [PATCH v2] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Thread-Index: AQHXBqNZSSDiUeKOcE6ReHCSYHqKEapgueKQ Date: Mon, 22 Feb 2021 09:29:54 +0000 Message-ID: References: <20210219093931.1458-1-walon.li@hpe.com> In-Reply-To: <20210219093931.1458-1-walon.li@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [36.226.218.131] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 00007ffd-59ef-41c9-3088-08d8d7146a0d x-ms-traffictypediagnostic: DF4PR8401MB0458: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bxbOF0GJBg1+Sp1FaMSLXhO53mbs+30fxYmEskoKFB0hnPtzU0TW2UIMLb2La5rXjO1IlYGHLbclSjXo27lpk1GMbhbGIWY/MEKpdMoAxzuFMTsAJ/vfO/1LH5HHHmIbiYt+WCKkFP5xgWcgzJyHqAtvbbOhGhLaoGCECRTwacPH+uRSol58l79JaDNeg/+k4W67gwv6DMwsGtV3T8n2ZueABtNgsXm15JMwMlAARjavGBFSbuNUV4DahdO8z14eG/3yXWuqJvLO2UUDezSWooUiZvygoRA/SJupPk9ZlE5YvY3GNvhNxcKNCkidAheLGLBAVKub3TzzWIFKptqI1Z6eYdA70Ol1uo+pvYJqEL44PGwLRIJzUsjWG/YrS0WsMR8+YbcqLPfhAWkXohTzPgscAt+kSOn5jlTtvyWua63arcquazQ3y/YGNT3zqq+oocj8kIgEGyN+x+mYxTAvl4H0AioQYLWhMFAubAC/TZPrjVbtha7rYVGVAgmSOEwOFP8DXTrh7jYxOHJNxSByoBel1iadfZqmqMKder51Hn0H9ci199fbhp1lzZoeTUxkDdxwbYIe8Ua1gOQGDTMs7Ww47ROr9n0N+fccXM/g4mU= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0585.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(346002)(396003)(39860400002)(136003)(366004)(376002)(66476007)(64756008)(66556008)(66446008)(316002)(33656002)(5660300002)(54906003)(53546011)(6506007)(110136005)(7696005)(52536014)(83380400001)(8676002)(9686003)(55016002)(186003)(76116006)(26005)(86362001)(71200400001)(4326008)(478600001)(2906002)(66946007)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Y5/U8dOxUWGOtzfefTiHN4bYlsD/Rcm35QITQO+8IWThDun4GzDI4BGYKPa8?= =?us-ascii?Q?F2m9z5UyFKhPD17yaUdIWKAE4Er0gpdfyAJG92RrzOjC2smVQ4T/kEBXotoK?= =?us-ascii?Q?cESxxkY1Z5FX7vgrr0L0R+gbx8mkRTFtb274rSTx6dGC/2okami/XFHyFt7b?= =?us-ascii?Q?L0SfCdEaRwQpa4KmX1l7vCKrjMTAgNznOoo/SZz1nmo+aHt3N7LcMlc98bk8?= =?us-ascii?Q?9Nq4qT3416OwgScKjsN/1HDzgPu4sVtEZm8/q1ixwyqB3Xup7ozv0fCL74qQ?= =?us-ascii?Q?CUxt4UqnFPUV0JP/gy5sZAmVoCXrxj2yrNPl+83dJnltO53yn374goSH7LhJ?= =?us-ascii?Q?BJjw+zSGs5OoKFIoGSTEIOru1btRTqFPcneMiInLCgSM+/rkVlvHtrr6I2YY?= =?us-ascii?Q?XRcAFUwMNb7U1iXUJTH7i0NotQ0+esA1Osd7ltzw25GajK7pxv9ftGckYvBm?= =?us-ascii?Q?TNTR0c+pTrnXzHIrqWcn1xq4lHf2O9SDqlb9ppOBRVLfd1q6+yjfEJssMG1r?= =?us-ascii?Q?KeM7rzcDJ9T9Lxz121drn1OGCMASBt2ZyUWOLKISY3k2lHMLVpMSokVUSMQV?= =?us-ascii?Q?TMlEXRYF5ueOUZ/CBiugbFdboryKVfJyFiHKgBb2Kj40DlpF73CoCndEzFCd?= =?us-ascii?Q?nyDyMg/xrhP+DCpFZf4fDCp7qGeQhBLMv+H2IsEFD+9lhdLwhiWtL2cHHbj1?= =?us-ascii?Q?a/q5WolPVaqIKPsittKfRKFdSWgTnwHnNEgFEEuqYgi8rw4R1Z8c+lGevvsZ?= =?us-ascii?Q?heeB7/tu5AvZrmR/CsQydTKDsfl5ZAfUnMNLIouNg6++E96XQ6XnCW3vFKaA?= =?us-ascii?Q?jh3Rwggx6k4lt2j35IAuxwaWzQ0/4nWyYB1YMrn6Pgl5BtaDhiATJntIJ25O?= =?us-ascii?Q?fgZG9SH73EOGvP6N4AVEIhDvmXRyvfADw0pble0YT0kyylpyHtTJBzZdUIbC?= =?us-ascii?Q?hI9BYV45SrEmctf5FenG+0C91rbtuwmgYU7QbWrKspSNY56g4U9l1MTHVw5y?= =?us-ascii?Q?yH6NjAo6+PmDbkawegutQJPjj8PcwW4fbxjqH3EgkJHrU3/XDWvc+A9ynYnI?= =?us-ascii?Q?oEtON2ouKsjxSFouZs9Z+DTSQk1/IoDA7T8pAGTr7XLwV/M483+a8CRsDw9J?= =?us-ascii?Q?EpaecB70RjUEQEFaRrKwcthbXBDq575rHlXHDny72boVXhPhH0K5kSqEkW2p?= =?us-ascii?Q?nltBZkg7z14J6m7swgh5TX8ArrWhg9myKiaHIEKGOYQpR9LU2Jby9VmLHP0V?= =?us-ascii?Q?2lGLr+QavcSAvHLbKw4AYXScFW3eFal2GGIKPj+jIrrKfqttyc7KsMqnOltE?= =?us-ascii?Q?Wg+c4cciD3MAe2AC1wiTTPpG?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0585.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 00007ffd-59ef-41c9-3088-08d8d7146a0d X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Feb 2021 09:29:55.0342 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nXvrRC4bbFvtrE+Eo63vtP13gRoJctt3DSRnT/6jTIXLbH106vxx0rrlfRL7A+hfw5v4BFGircmI5vxXfu9pgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0458 X-OriginatorOrg: hpe.com 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-22_02:2021-02-18,2021-02-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 malwarescore=0 phishscore=0 priorityscore=1501 mlxscore=0 spamscore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102220085 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yeah, the problem is that always adding the Boot Menu to the top of BootOrd= er causes confusion to the users who manipulate the Boot Order under OS. Al= so, we can't find any reason why the Boot Menu needs to be always added to = the top of the Boot Order even if we check the change history and emails.=20 =20 Reviewed-by: Sunny Wang -----Original Message----- From: Li, Walon =20 Sent: Friday, February 19, 2021 5:40 PM To: devel@edk2.groups.io Cc: Li, Walon ; Wang, Sunny (HPS SW) ;= 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 en= d of BootOrder REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3135 When Boot Menu does not exist in the BootOrder, BmRegisterBootManagerMenu w= ill create one into list. However, it should be put at the "end" of BootOrd= er 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 @@ Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. Copyright (c= ) 2011 - 2020, Intel Corporation. All rights reserved.
-(C) Copyright 20= 15-2016 Hewlett Packard Enterprise Development LP
+(C) Copyright 2015-20= 21 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: B= SD-2-Clause-Patent **/@@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu ( EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); ); -= return EfiBootManagerAddLoadOptionVariable (BootOption, 0);+ return EfiB= ootManagerAddLoadOptionVariable (BootOption, (UINTN) -1); } /**--=20 2.23.0.windows.1