From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.6014.1614676319503328743 for ; Tue, 02 Mar 2021 01:11:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=JTELDpM0; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: ray.ni@intel.com) IronPort-SDR: Dp93w638xWBDeuVlfqn4nCpB6DCnAF3mzOEgMIFVbIvA6EeVrGXBH7lEa9zve0qORiPfaXyURw GGjJi/2/wM/w== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="186869067" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="186869067" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 01:11:58 -0800 IronPort-SDR: kPzadapzKfpm6g1qx7DE2oRGxHjyejxeIxfNHGi+OzK9l3EyZwApxQRjQys2mlv7/sE4d2gEMb 5tm/owrnL4aA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="506262341" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga001.fm.intel.com with ESMTP; 02 Mar 2021 01:11:58 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 2 Mar 2021 01:11:57 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 2 Mar 2021 01:11:57 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 2 Mar 2021 01:11:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZenJ0k2e58wmfiV0XvKaG+7QJ2kdDCIjbjlramiG6VgnJ+O3Mt8XtuorTfEWZ69CVzVhhe/Gaop1H6nNEpeZ6CvMnDCabmgBoULlJyIWYz7CCsTsB5+bcta1pEYDbyRvBeu5SJj3RpgIuK7eRrg5ia7ObBq813GJ8UCP3j5bjXlezHL4FIkFoj7gluFTZY/5X20zcve2aYhco1wzu2HIn7MBlKb3iKhSARKQ/I6unodyKIGq9PmQIhgIq0qcWclk38WJGupaYXrP458pmyjs0JxZKx+yJlu5JqFyM2WHxit6sJqmYgu/3LDdjEyBAT4rhQd1BNwfMawCDPUi1+j15w== 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=4uV6Jlj9Nu77QMMMLg1EVD/uGlfW0brmLQLM97PvsBg=; b=fDAP0Kt9OTZJ3pGts0oUPMql4stv9tGgbsKDaEPTMrYz2tKm8wfAlGzXyzUjPD68tMKMJhhjeGLpnGTTMqCsYZIkeTBrqixJ1gcbFZaO6zMvwxyYa/tG0MZ0hiimyLe2+q5Tar9SAO0y+lkRq0JOaE72vxG8qtD5D4XjVJHV0YTIks7fUY/CjUKxPLRQNe/VAwxYF9jXPS1+0dWeyFZl1AlCfgCzyjXOmqPMzJ2LlUzkVZhZ/Z48CuQmHsX/n+gicDnL2KlUUHsBE2sgWBA4JlZEzwWYXjm6IowbqZEvimHT0vKXZu/dVxz66qrQlhCd/l4wQiL7bpdi156ceFBqfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4uV6Jlj9Nu77QMMMLg1EVD/uGlfW0brmLQLM97PvsBg=; b=JTELDpM0gErLOcbuoNvOQoHJccKnRbNsCtEehp7E8TBHKnAMdsjy1fN8II3kbynC4De1yJyv72EwjcjDYygbEK06M/SM7EtNdhDDYXKvVqQzDVUkLCVxNkZ07QiLJn8EXFltu0trXfYcDY6rXh+Ul8mihzWMTCn0yBKxEIGvWcY= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MW3PR11MB4714.namprd11.prod.outlook.com (2603:10b6:303:5d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Tue, 2 Mar 2021 09:11:56 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::8d64:91ed:c259:e95]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::8d64:91ed:c259:e95%7]) with mapi id 15.20.3890.028; Tue, 2 Mar 2021 09:11:56 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Liu, Zhiguang" CC: "Dong, Eric" , Liming Gao , "Desimone, Nathaniel L" , "Agyeman, Prince" Subject: Re: [edk2-devel] [PATCH] [edk2-platforms]Intel/BoardModulePkg: Always sort load option Thread-Topic: [edk2-devel] [PATCH] [edk2-platforms]Intel/BoardModulePkg: Always sort load option Thread-Index: AQHXD0MIMoXZG+88QEWyXbgA6LXTq6pwaQPw Date: Tue, 2 Mar 2021 09:11:56 +0000 Message-ID: References: <20210302090342.130-1-zhiguang.liu@intel.com> In-Reply-To: <20210302090342.130-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [124.77.195.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8bbd72fd-6be8-4e7a-8a56-08d8dd5b3a6c x-ms-traffictypediagnostic: MW3PR11MB4714: x-ms-exchange-minimumurldomainage: groups.io#3767 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:565; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: imPmw8pIoegxmw+hmsP4MOqv2IyII+Opu5Nx7mv0R9AYLajlGngK8qh9wxHBSeWjhxg9VLDXH65+nGHIlacNTdaKt2GBIBaT7t9jRUhathEVzAv5HTxLtiPIOOY+XFQTwI4CCb3AwrfKvOoAo1CgfgbAzUBmYj9sErrCmnPKn2lJRwGcRsBvYhPwRgausN+qj2DCoqhLnOiJ/PGgPyI0mWTmRAemowOozDjWRC2QsMfLcP1RhR3QglXtA8ETLXq+DAwqTs5eYrpHWNhoqk9sE/VPUnfZI6BvVT7A6I7Bw7rAsJfCMjtMtgwC0hQAlllYFMEyf20JSVfJfSdoqpOv0bZUS54XnA8AsrxMXDyHhSd/LCL7MjdNJKoo1eMauTp/9yWLdAgDv1QHsx2hkgHn6nOnGT2yCLwOeWHpW3iFJvHwYHOQG5SxndiLFnm19vTcScp1+FnMZmcxT+4yHbfKzGdbyeMR+QtFAsUl0JLkn/1SHflue6Im6ENqrRWDyBd5sOzQGY6mZaYoAFyCmG20kBB5MdUVEzKwvNQWciggoT35jOfCJGvh9EsHJnzUrTu6OYEz9+Qbd9TSLArBW2VjKixjYEmx25imfhS1R1Ll6WE= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(39860400002)(396003)(376002)(136003)(346002)(26005)(6636002)(4326008)(53546011)(33656002)(110136005)(186003)(966005)(8936002)(86362001)(5660300002)(55016002)(52536014)(76116006)(9686003)(107886003)(316002)(71200400001)(83380400001)(2906002)(478600001)(64756008)(66446008)(8676002)(66556008)(66946007)(66476007)(54906003)(7696005)(6506007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?DwiLJl4AhFyz+SEfHNJTUEZF+GXzwQSe4aipSUbkGqH5mBqTayYWFMA/rrde?= =?us-ascii?Q?VzaQ8PxzWC9Nejf5HyG7VWoMdzsvoME5Uv6cLSt2MMmNXSRNL89aFC5p6LMi?= =?us-ascii?Q?NrSWg8RivYGJKx6MrdMuD8q0ysenDXUWmB0r8nTM+6RVs1rGy8PfAH4nU7WJ?= =?us-ascii?Q?YUUnGXaaLOfu1q1fO3jzci1N26Z9dDtpoTY0KMODvDuxKQ1Bxrgm59lq2fUs?= =?us-ascii?Q?WQ4zMWRqEdKSBLb2hd/SCcVWStN3FQ7X/v8pQilweJSL9KDnZUmPjqjUTLXs?= =?us-ascii?Q?IH4dskr6sxy99yFukPQhvMU816h/JrznIPx1nsAdJq5GU0lOz3SBDNrQzCjP?= =?us-ascii?Q?RBCVyjGB0Rc+6hGMOz7jELjRk3zWxL2LPkZ36+0CfSh1fBxjs5QfXX2pBzR4?= =?us-ascii?Q?8tFsldhypC1OJpq4NesnCBYycOSPmMajOTj0FqZ40PuRE9k6LXobfhBETEbQ?= =?us-ascii?Q?stKvgPEpTBWs4KfCbq49VnYRUJUJduDl2Pi/U8nduNh2XseN16Q2lXPUIulT?= =?us-ascii?Q?qOC8FJzSjIraF/nMCrrF4m9PsqhQGIwSK+VX1gvOjuBIoZSvfaGqETkFK/GR?= =?us-ascii?Q?DfsLJDbrKZZeNvHVhCZ5wdnl8mOsGGgBGYWkfvH/tTqTZSpCPmAAwlRKeyk4?= =?us-ascii?Q?gfz/oi8gP5bHAAXN+h0007ALhRCjvLz7VOsjqPxHNS6/n0OYZV2OiIRBwlYM?= =?us-ascii?Q?3k88AMryJyNofpe5+8N5HW87ni53x5jIg7kRuA/N5dWv7ZMa9y/eeLwFW3WE?= =?us-ascii?Q?LIMvdfQZsRsMGLygwiqOfKXwovOlHkDbZ3TZxWguDovpUiiVXbx/yZUfx1/d?= =?us-ascii?Q?WsYeNvwtTPumHZDopnQl2EfM9NbpptcS0yu3rtqiM47kbFqWOfMi5uAIL35S?= =?us-ascii?Q?lx4gZnCH8D29jIzMVpXCUepllWtDrBIJlI5jlfv53MAkDtf+jGTH1WgHRuj8?= =?us-ascii?Q?tcplyupUnQ7D0cHkpU5a5n+QGYD6IpA2cGC/lnuyvykPp2YBhbG4oztrTYfT?= =?us-ascii?Q?mi4dQIO+t7yUoH93M+hqYw9gCdaoNfyodpWhULW4U1gIl/lT5lm0I3o71dIM?= =?us-ascii?Q?TSg/VrEkXE21UxWB0pBUcPqoWfzNvMFbls+JXEkNt0Z/bpEOQwzkfFJmwhF0?= =?us-ascii?Q?kpYiWXwajBUa4/DJDY439265Sl2cBEKtkRzRYR7/HfYNXbCbFYf/Fuc8XkBy?= =?us-ascii?Q?VrisCgS4iAU/BYG3Kg/tlwaM7lhTJBuOWuCRhR4ctiLOh7572rhyLnLXXBcf?= =?us-ascii?Q?EnQvTB7jKCUucPdkSJPGohgmEQ7hxqYoGBsJfHFLfoCKCG+5G01LHsTb9VBv?= =?us-ascii?Q?yjEfPhCvgb63XbANaRhWOjmG?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bbd72fd-6be8-4e7a-8a56-08d8dd5b3a6c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 09:11:56.3216 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YSxk+Yka+d7OnONAdvRx/RnJMtWV8H8JhT8T873wD5OLuAfnASj7XU7g2L7a337A94Ysje8oZg+NOooDEYw9sA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4714 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zhiguang, Reviewed-by: Ray Ni I think you can add a third reason in commit message: 3. Below change in UefiBootManagerLib puts setup in the end MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder SHA-1: 7f34681c488aee2563eaa2afcc6a2c8aa7c5b912 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Zhiguang L= iu > Sent: Tuesday, March 2, 2021 5:04 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Liming Gao ; Desimone, Nathaniel L > ; Agyeman, Prince > Subject: [edk2-devel] [PATCH] [edk2-platforms]Intel/BoardModulePkg: Alway= s sort load option >=20 > Currently, load option is only sorted when setup is the first priority in= boot option. > This condition is not needed because the below reasons: > 1. Setup option may have different string name depending on platform side= . > It shouldn't be hardcoded here. > 2. Always sorting meets the needs that setup should not be the first prio= rity >=20 > Cc: Eric Dong > Cc: Liming Gao > Cc: Nate DeSimone > Cc: Prince Agyeman >=20 > Signed-off-by: Zhiguang Liu > --- > Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c = | 35 +---------------------------------- > 1 file changed, 1 insertion(+), 34 deletions(-) >=20 > diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardB= dsHookLib.c > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c > index d7612fb80a..60acf48dd6 100644 > --- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookL= ib.c > +++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookL= ib.c > @@ -992,37 +992,6 @@ ConnectSequence ( > EfiBootManagerConnectAll (); >=20 > } >=20 >=20 >=20 > - >=20 > -/** >=20 > - The function is to consider the boot order which is not in our expecta= tion. >=20 > - In the case that we need to re-sort the boot option. >=20 > - >=20 > - @retval TRUE Need to sort Boot Option. >=20 > - @retval FALSE Don't need to sort Boot Option. >=20 > -**/ >=20 > -BOOLEAN >=20 > -IsNeedSortBootOption ( >=20 > - VOID >=20 > - ) >=20 > -{ >=20 > - EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions; >=20 > - UINTN BootOptionCount; >=20 > - >=20 > - BootOptions =3D EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOp= tionTypeBoot); >=20 > - >=20 > - // >=20 > - // If setup is the first priority in boot option, we need to sort boot= option. >=20 > - // >=20 > - if ((BootOptionCount > 1) && >=20 > - (((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L"Ente= r Setup"))) =3D=3D 0) || >=20 > - ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", StrLen (= L"BootManagerMenuApp"))) =3D=3D 0))) { >=20 > - return TRUE; >=20 > - } >=20 > - >=20 > - return FALSE; >=20 > -} >=20 > - >=20 > - >=20 > /** >=20 > Connects Root Bridge >=20 > **/ >=20 > @@ -1383,7 +1352,5 @@ BdsAfterConsoleReadyBeforeBootOptionCallback ( >=20 >=20 > EfiBootManagerRefreshAllBootOption (); >=20 >=20 >=20 > - if (IsNeedSortBootOption()) { >=20 > - EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBoo= tOption); >=20 > - } >=20 > + EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootO= ption); >=20 > } >=20 > -- > 2.30.0.windows.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#72329): https://edk2.groups.io/g/devel/message/72329 > Mute This Topic: https://groups.io/mt/81021303/1712937 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20