From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web09.6664.1614681972528859473 for ; Tue, 02 Mar 2021 02:46:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=LsX/jKX+; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: zhichao.gao@intel.com) IronPort-SDR: ggGOIW3NmuzZh7KXgv+11wF3hd6mXvXsrqvC71JFXlv+GvEYKkvE3NpE6nJUrWSMGeRaJmRR1x iFDKWMnRUOoA== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="173913546" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="173913546" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 02:46:11 -0800 IronPort-SDR: g9uaXjrNw4r2lSmIVmLtQLRhcKT50l5IFEDm9oUwMgfqV2B8sezwQdnZ82BxMOVZrg3jPiTW5r FLqWpfHfsW0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="406657797" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 02 Mar 2021 02:46:10 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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 02:46:10 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 02:46:10 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (192.55.55.68) 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 02:46:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T76IaroSGYPGgeFSircsqjeNLRZ/blhdQCfLOYzMiPl9oIQTCxjbL3A5DXs5dplUS0kwEyOG4EF4mlgxZdffSWbx76eRhXqGHaHkZFxZVErpnZmHl1ER2xkR0G6EeydMHkKXQdtBGU2JFlmHaB7wfUHfDXx4bSvwFrFRjKtUupToL54Y/amg3SRG0D5r4wQ48Csc3NTJtS5P0rLxlxXUwFQj5FsUVN/rJ4yA38NjsuuTi7dIXny9yaeUBV9oFY7wUYlXyXyVg0LkXkYZ3IH4SrG/wsHBjPNTWRPrzNEAyDSJZ3S0sECzdpH9ozw11LqZYqnThjwVN9re7QLXqG8z+w== 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=HGczHEimN+pGXOmuiiHXZw6yoQI4S58m7PE3xuRrEe4=; b=T1EEqLnFSL++0rXV9Pq8I2L58l3qjqS7zolAVOCXhLfnVV38t8ZBP0zZgMOy7Yf985OyjjvBLKrKiHhygPjZucCCG9p/QHvXMdNkR3Q+IEzaF6rxUb0c2jUr/4rB5jx0nGFVNXEMhee3OGnrJVaMF8YTfb3Bq9eFA6B5sL8nPqqqQgzTDVyHzEbpzPbS213uaeCaYyAPpnL+RdfcByiowA2eAd7QA9VEaa5Mv1uChPULZozNhmft3evrc0jwesPbDwr8Xy288Oe1Vy8eXdLfix4asZK9Uj6WV2HWxuWVdzUsfWBlx8hOH1do357FiIqpV/P7xXZtpsd1M1+yvWl+jA== 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=HGczHEimN+pGXOmuiiHXZw6yoQI4S58m7PE3xuRrEe4=; b=LsX/jKX+N54DJKLre8hKBjLHhhbsBbns7nFjdOsZt1RMGCKZEazyTaYyVXhZuY5KfiWH6eu2IRGnzDzd+iqiSaJVqHuEM9HgRxhSpzdCpQ+vid/52XjY1Bmq19wEdEhdNfrgoj1NcZRQSN2j+PY6X3VU3O1XPmRmRG05cxq+X6w= Received: from MWHPR11MB1647.namprd11.prod.outlook.com (2603:10b6:301:d::12) by MW3PR11MB4569.namprd11.prod.outlook.com (2603:10b6:303:54::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Tue, 2 Mar 2021 10:46:09 +0000 Received: from MWHPR11MB1647.namprd11.prod.outlook.com ([fe80::d573:14a0:f9c5:68b0]) by MWHPR11MB1647.namprd11.prod.outlook.com ([fe80::d573:14a0:f9c5:68b0%4]) with mapi id 15.20.3890.028; Tue, 2 Mar 2021 10:46:09 +0000 From: "Gao, Zhichao" To: "devel@edk2.groups.io" , "Ni, Ray" , "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: AQHXD0MF92rIekPxpkSN7/8ISZYTVapwaakAgAAYofA= Date: Tue, 2 Mar 2021 10:46:09 +0000 Message-ID: References: <20210302090342.130-1-zhiguang.liu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 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: [112.65.62.186] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e819c6cb-910e-4c94-3d53-08d8dd6863c6 x-ms-traffictypediagnostic: MW3PR11MB4569: x-ms-exchange-minimumurldomainage: groups.io#3767 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:586; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: c3RNrj1NlOjyGgVtkwv4tZIaDyCrNKDWTKsQ1i4IO8rbLYU3zIbfcRf2VRbMF3E9k97x6Bvo0kaTnZXHWxXQ4vjbTnGZCC5dpani+rcKuCtlx7k6v9uBP3LJPsa2vaeLtB9FpqcNQ2g1fWG7LFr9KePljtqNt5uACor6adaIi0REf5xFiaxA7mcUTec5OyNCYxPU6HUeT1hckfoILGnEps1I7ZNWVYWLZuTa5EXWBTVbEIpCQhkzpFckGtbEzVUpzdzFqjC7QZgAqyU7eZoZEOO9TPfR7Gos8a5PRJ18nbRAqxyIXE2OIV+rC1rxZrr4rN0zUorN467KjPhMP0OnKj/wadu2rJJmhMUynVOQ1VsqXEiy1xhLUUiADp8OUDCFQxj5pr49H/I9hrd6Jy4i7PFgbF/znsLwy7T/gTr0tv0VX08ZZO+Dhd9kOPDsAXfmdPYIcSNPPhFPJbiNZ3XqJQv2QWMf9Z1UHx3iL/eaWktd/utD5jfSbmmNdB3xUVQO+ntydJbrYB3evD7AkuY7XTcGeWH07xTz1BrOnOIvLtSX4shz9IEF59MpiRJ1Dilns+9c0CIz7ljItaI2rhlCnZ5HEt+fmEiJNkz5CkDoTQA= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1647.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(366004)(136003)(39860400002)(346002)(376002)(2906002)(4326008)(26005)(186003)(8936002)(478600001)(107886003)(66946007)(76116006)(66476007)(966005)(66446008)(7696005)(8676002)(6636002)(66556008)(64756008)(6506007)(86362001)(316002)(9686003)(54906003)(33656002)(5660300002)(53546011)(71200400001)(83380400001)(110136005)(55016002)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?nQ9sAyr3etq2RJUX2vIv26i93YLWweWZEWwmeYshG1igtQfmBQMxWsvsld8v?= =?us-ascii?Q?sLz+lSm4aLh9mp68pM8Y19qPmvmVbE/4zr+wO/B5TlvX0ODlp+DfEOs7BqqJ?= =?us-ascii?Q?DUH/4HBFVc5Lfyy2SxPl9+puX8hneyF8Xeg1NthpzxvaoMDSK1oaHdgmvcDM?= =?us-ascii?Q?pNyJP9LIbEYNUT8ghTtOHV1+EtfUUWxvSEFU39hXqjFwZzmr2/R1bnwbfgnd?= =?us-ascii?Q?IdozYkM/wpyy8MRKmpitZj3CRs9SRpSn9r2qAObA2pJpg7Vrsaf/3NaUqI/Y?= =?us-ascii?Q?s9OpjfcmYhnhN6uCGHcBrepwHK5rblZHbBTuzFUdGSs1FlqXXe1dx2lT4nXs?= =?us-ascii?Q?efZ7b+xT6Q+VlR++SiF1vZRskhrQWO8PdLw0IszL7qmeIB4Q3Q7ip3y/0tSW?= =?us-ascii?Q?a7v9LzrJVovhmBpKAUgX4KZhjTkVvYYay5o5o6PBchCbfDnYo/Fvqu80xB0q?= =?us-ascii?Q?dmFgE2BkxQsYG6LiOYJ5MVLGkwFTpMZYHOaEzjdLgXfsjwUbhFTqB7UPYVGD?= =?us-ascii?Q?ry72zNlAt7Ms+aYKUYBvGs2VLlt/mmvec2JcmrZjHGzAY4mfhfrmhtVg8s60?= =?us-ascii?Q?69SJKk3EcKfD0Zx+6LO0Yw7JE4cF5lWMS3Ukj0eM+/lzhsL3JICyF50lMzzy?= =?us-ascii?Q?gaHaNINowREsn1FK5wRPdLbLZmAO2M8oEUCjMFkIiMtrN3eD3dfJrBLu3tCq?= =?us-ascii?Q?JMTZaOXnVwyCLOpPEkPN/RLlDc4xRcnD+B+/pjFZFga5F+a81lmDCsUkJoQi?= =?us-ascii?Q?FiGK5AWwTXCIuc1AzsoB4Ti6fsejLsAW9d4HonaPmebpqRU5tPyhJrAxliqV?= =?us-ascii?Q?tghH7oC2xBvDfW7y/Nt1rfdUW0yFCo3uwdlb3DkVYu/ZBhhQQZaBWNJpLjkS?= =?us-ascii?Q?g48Wbkoq1H8wd0hnXJDvj/ankAd/i/JtL3PZljVu5OpqZEkrBNaOffkIc+Co?= =?us-ascii?Q?Ln7O6zuiPebs6xQ+SLwCE2IzLTsi77vRgkuujSUHbQiiokvfN/ExIqIdInSr?= =?us-ascii?Q?1LG3ogIGHFjOj5VGrrTsgJRUTSmyGsZ4Y2DQ6U5AvtNXtl/I07oQjF83TkJE?= =?us-ascii?Q?C1cqdsO9VAQLtx7YPpw+ia2ZHdDRZcsJgQUW7b1Ryopb8pZYDea4YmpJTiUx?= =?us-ascii?Q?2yX3tinC9grD01ArkdZybNWezBjDrtRnHtqyeOZUWeG5f9Ei4AACdnJg0ZHk?= =?us-ascii?Q?aHRTB2Sy8eEPtKQyoFe7AAaLD4ftN36If4hYJ6SvMnx3tweMNugJPEfT6Cmj?= =?us-ascii?Q?7pUSsd8yOuFeK/kF+rHXVzmVhdoUHc9smTlM7df96sTTRjMAfIV/ZiHlOtZR?= =?us-ascii?Q?aUzRpxGAj49e8ePKNNjdD2Jj?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1647.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e819c6cb-910e-4c94-3d53-08d8dd6863c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 10:46:09.1369 (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: 5ZcgUlnvLFtTzSmgCvbENqNJg887FdP/pZSEWIPXCsx1KQ9K/KU1QgqiHwG+3zL/6eiHBXDxo27DQOUPB6voOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4569 Return-Path: zhichao.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray, I just think of that if we always do the sort, it may cause the changed bo= ot order (by the user of the platform) resort again. That's unexpected. Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Tuesday, March 2, 2021 5:12 PM > 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 >=20 > Zhiguang, >=20 > Reviewed-by: Ray Ni >=20 > I think you can add a third reason in commit message: >=20 > 3. Below change in UefiBootManagerLib puts setup in the end > MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder > SHA-1: 7f34681c488aee2563eaa2afcc6a2c8aa7c5b912 >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of > > Zhiguang Liu > > 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: > > Always sort load option > > > > 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 s= ide. > > It shouldn't be hardcoded here. > > 2. Always sorting meets the needs that setup should not be the first > > priority > > > > Cc: Eric Dong > > Cc: Liming Gao > > Cc: Nate DeSimone > > Cc: Prince Agyeman > > > > Signed-off-by: Zhiguang Liu > > --- > > > > Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib. > > c | 35 +---------------------------------- > > 1 file changed, 1 insertion(+), 34 deletions(-) > > > > diff --git > > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLi > > b.c > > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLi > > b.c > > index d7612fb80a..60acf48dd6 100644 > > --- > > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLi > > b.c > > +++ > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHo > > +++ okLib.c > > @@ -992,37 +992,6 @@ ConnectSequence ( > > EfiBootManagerConnectAll (); > > > > } > > > > > > > > - > > > > -/** > > > > - The function is to consider the boot order which is not in our expe= ctation. > > > > - In the case that we need to re-sort the boot option. > > > > - > > > > - @retval TRUE Need to sort Boot Option. > > > > - @retval FALSE Don't need to sort Boot Option. > > > > -**/ > > > > -BOOLEAN > > > > -IsNeedSortBootOption ( > > > > - VOID > > > > - ) > > > > -{ > > > > - EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions; > > > > - UINTN BootOptionCount; > > > > - > > > > - BootOptions =3D EfiBootManagerGetLoadOptions (&BootOptionCount, > > LoadOptionTypeBoot); > > > > - > > > > - // > > > > - // If setup is the first priority in boot option, we need to sort b= oot option. > > > > - // > > > > - if ((BootOptionCount > 1) && > > > > - (((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L"E= nter > Setup"))) =3D=3D 0) || > > > > - ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", StrLe= n > (L"BootManagerMenuApp"))) =3D=3D 0))) { > > > > - return TRUE; > > > > - } > > > > - > > > > - return FALSE; > > > > -} > > > > - > > > > - > > > > /** > > > > Connects Root Bridge > > > > **/ > > > > @@ -1383,7 +1352,5 @@ BdsAfterConsoleReadyBeforeBootOptionCallback ( > > > > > > EfiBootManagerRefreshAllBootOption (); > > > > > > > > - if (IsNeedSortBootOption()) { > > > > - EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, > CompareBootOption); > > > > - } > > > > + EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, > > + CompareBootOption); > > > > } > > > > -- > > 2.30.0.windows.2 > > > > > > > > -=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 >=20 >=20 >=20 >=20