From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.8817.1614693270012220262 for ; Tue, 02 Mar 2021 05:54:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=NiXzOdZg; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: ray.ni@intel.com) IronPort-SDR: CZpgRO9Gh5o4iSxhcXRYFD9u6sLt0S5V/dtiHu2p3tfY329R3NMTOhWyrafr6WJLd37hetoliE 0U6aFyLUGnJw== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="271820687" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="271820687" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 05:53:19 -0800 IronPort-SDR: nDyan3wRC/X+NFAPYI36skPHf57der5/91jEJxUiJU8WfSdQzPg+WoQNi7l+RggzFyAf5MF8Oi Okb56t/Esilw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="399029565" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga008.fm.intel.com with ESMTP; 02 Mar 2021 05:53:19 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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 05:53:19 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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 05:53:18 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 05:53:18 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.70) 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 05:53:18 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JGqXtuGJQF6hhZ+ex/K3tAhBwI0mjLpv3rRAE+WNGJR6qPuqw0OTSJtmOvNG4uMfouzC5CyP3oXW2JAqgN2Nk3deD0wuiFsXT/fqH/CMzCE9/SB8lvYkaqYHbIEoFsQJ/pfLJyZFzECIMJXnfej6R/upHJmZY6xJsQnQTVEguVExjtudTOlE0eAiQMLJZ82MR3uMJj6kmPrj1lYKCMms/WA7LPEFhg9d5iy4+mBdQGaGnPhxDXZja8wx5eICUnfykv1Qm0ohyPk+EVAzazNBrlH+SeCbnU57N2bhaieCRHcVx+Ya9oT4pXYG0GvUMNbMNwwt6IDcr62rfGF7nG5XmA== 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=tXG6gvO3h2wIu3hRmdG9lWi8VE0lIGEVYULLSPXIBGw=; b=NhTfLkf+AB/LbMREEamwmuLQypA0m1S+80OsMll637TqJmf2f2c690heibxiQCn2D1Sl6daN077sr7RS78sW5UUktycSpIWewk2hRoQNuCOsYyscZ3gPI4azgfil2JKysE0zIMmKJtZ0zwD1oiKmMwE9++PWI21aHR63QA6Ee6Hmy1PAbq46buczKtGRL4kjHgOMRvjj9wSwhTsJurBisqJ2TGIwr4T9aDZafS2QlC6iiiCT9yvpYaVfDPcY8HCjHgNoeV9O76r+ux3dxeKKKH2HTAB9Z7fAaSta0L8xncH6gBzWxgXae/+VwgaP5CkhFALzfqVDkD4mvdFCy9krCg== 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=tXG6gvO3h2wIu3hRmdG9lWi8VE0lIGEVYULLSPXIBGw=; b=NiXzOdZgrpeMw0L/ar3gW6TjA7dYr6gkdWydiW/FbkNtuSvaYWqtNe7eX50RTpmlg3K8JeMgzYZlYedjqtYt3cZUiCO04cDcAsIh8dHznFwvSx2HGAU4+k60BW2BPpMVSkK7KXTMiUPCTEJVNf+mXjYuHfMEe4aPM8bhIKBDu9Y= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MWHPR11MB2016.namprd11.prod.outlook.com (2603:10b6:300:26::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 13:53:15 +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 13:53:15 +0000 From: "Ni, Ray" To: "Gao, Zhichao" , "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+88QEWyXbgA6LXTq6pwaQPwgAAa+YCAADNr8A== Date: Tue, 2 Mar 2021 13:53:14 +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-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; 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: 9c8e8fd6-e81a-46e5-868a-08d8dd8286d5 x-ms-traffictypediagnostic: MWHPR11MB2016: 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: W9C0q4Gxgg7BTEyVUsV2u5CqB1kdqSns3sLfsORjh8ehGp+m0TFjFYPd4NL0cMAiyA+rGEeD4qVNKFS2mYvOw9+7b5ZU3s+Z6z43h6eix5nrlEBstLCZzNw4XZVJtraf66w8LfJWCNppjcFosBU0+Rc7wQ67pcX9c/qXbqlspku5vxfTxqbQGeLqLKWRrBn25hvLWcOxmsgoRYuTem3WahCEyszWwZEELdaoV0C8LLeRFbyqajDsWAB7QXoEwAkr3CiZTRf/AY8NGka0vgkm+VFwjD3kqUt0/N5Zs22CmPVBHNloeJ+hsoiPxlIf8vbis7QWiSghm2ZDEQMyoB5KrpxH6vBC5U+Rskm4k37I/JcUpf8S6MgKlYJM5YHaBzvO+oNH9o0pygEQ2V87dFhNK0zJ7gZxoIh+xy85Wyec/2dM8ewTwzhMiNP5fXtSoS+2ybFaSV/QDvC2Dvl08ihPvtIsRapi49aVl/XbynJ3pHHtXQbR097cSJ45UdCr5OQPWbaO5qMjMf3rs7XRQOPKuXzhjQy/LNd/bENGb3VoaFsjm/y6mgFDyijh6F8o7f3Pe/O3+CWcH4i9DgiJOvfOA/kO/Einx+mAaluJzToqsSc= 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:(346002)(39860400002)(366004)(396003)(376002)(136003)(86362001)(4326008)(316002)(107886003)(54906003)(7696005)(110136005)(6506007)(53546011)(478600001)(5660300002)(966005)(52536014)(33656002)(76116006)(66556008)(66946007)(64756008)(83380400001)(66446008)(66476007)(8676002)(71200400001)(55016002)(9686003)(2906002)(26005)(186003)(8936002)(6636002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?/q5F1VTXOHSc44UXhucRwlYGeCz5grPva/421dW2wOmcJQyHxxq7h6D5OKi6?= =?us-ascii?Q?Q1uVPfBGIgihyvXltnCdRqQK8rgmwzLPlumx2VySM3pv1QE0CHySES0NHb3n?= =?us-ascii?Q?oaMH7tRPpjwRbLqtiaXyvgvO+f2T3/yluiJs7UzQg3VuClvKP1+0CpqAB1+0?= =?us-ascii?Q?EkpVMi85tS05vEaG9mO6yJtfe6zb9WVonyJUKow+h5rrdoZ7ZTGGkAfGJuaa?= =?us-ascii?Q?Srv4vSDkeQ4WSL9pn6Qkh+T6z9Hqox+YpmEvXVHvHeAxT8T5xNuhKsGHtcYf?= =?us-ascii?Q?WB25tn2zo01+qOeV2y+zMzGZ4YWNYzFjxJ3MWcEdZwmf1UfRFfOTH6yrTIt/?= =?us-ascii?Q?qHdjuwNwfbpiutzXE6+sVmWtl29hGHaKsP738MdDBIqrTZrGDOdwkBllLXNc?= =?us-ascii?Q?ioWneCVreFQDW6ESRdj57HaML6zSVOOZtOztHFX+t908019CR9gp7LpAmwqK?= =?us-ascii?Q?ok1kNdJdFxDAaae6/Z430vBJf2/QjGNFRc9SjQDPmqWnOqueXO5LWxEKiRUQ?= =?us-ascii?Q?quqodYfHz1UnTMUxaCPUrItFtaDlpOxgtWldwfZ1Zjqrc3LrxZQ/9NfzEswL?= =?us-ascii?Q?JaWugv6JCGW5MKW3RTLONM5i7uPJ4BrB3OFOAot1E3SFvi/6/rP85XyGH46v?= =?us-ascii?Q?4Qoe7o24WZH/Uw4YxN/86y5xcCzdrE/2oaqa+N+kHzytYewqkPCPZ26MCEPQ?= =?us-ascii?Q?+F7q25iVoyjstihQFYtZsDigJzlo+JCupNkpilsUrNKk94F3cVnnS6KmWpUi?= =?us-ascii?Q?MRFZCbim7dZkFSOix03PY+Z5WGasucnwMf2MTfXHAU57g5DWADsYZdVmffmj?= =?us-ascii?Q?QHLwGGO1c9QsEEO2JEUlEUWdH8/44HDkFYFgLvyFQhS0rMoUMDmzitfmhyfF?= =?us-ascii?Q?JqJtjE3Ez59zBujxHpqN7KnVdmTI+EDglnZRxeHEl13xISQQt/oqOkmfsbbC?= =?us-ascii?Q?bARU8z0BJf8OefDXTlW117qWLsoUSdwYYbWHP7qVaMx5CJOXwyVC5hK6f1Wz?= =?us-ascii?Q?HEnrUNEROCg4MWWsqdp05DobnTUhYevwIlsCRguMEjxHS5H5C/7b/gJBLH0b?= =?us-ascii?Q?kG+8GUiZHq3gyvFIjJvFrGw5noj5fh9c0rmUhEr8unYX/W6wlHTxpuvQC0j7?= =?us-ascii?Q?bsTGwD8hSRD0IqAfI0rRXyrlukXpLDRdbu0aZGDXXTEI5xJtorO85HO5RfqN?= =?us-ascii?Q?HEprgJ0jj+vCtRPo4ec4JYTg9KKDrt2ZH63I7Z9f5SrYARM79PfzIbolsDcY?= =?us-ascii?Q?WaktzmuRpWLerQU5wjGXwdIfMG+l0ZWUdT35R1UOUSDN2vR8RUKdIXaVyE4u?= =?us-ascii?Q?7NGhdeMZQ5HSHxue/sUfr6s4?= 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: 9c8e8fd6-e81a-46e5-868a-08d8dd8286d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 13:53:14.9965 (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: 4y15oO42to4y9Cav3pF+zzhM5UpE2WhrA0nMLWCy5Su3D6FY6zpQ7bXrT4IHVxr82Izn/hV+GUWFVWm/aw82hQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB2016 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 Good catch. BdsAfterConsoleReadyBeforeBootOptionCallback() in BoardModulePkg is not im= plemented properly. It should only do the boot option sort either: 1. in the first boot after flashing the firmware, or 2. in BOOT_WITH_FULL_CONFIGURATION boot path if the platform PEI can corre= ctly changes the boot mode to other boot modes when no configuration change= s. Thanks, Ray > -----Original Message----- > From: Gao, Zhichao > Sent: Tuesday, March 2, 2021 6:46 PM > 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 >=20 > Hi Ray, >=20 > I just think of that if we always do the sort, it may cause the changed = boot order (by the user of the platform) resort again. > That's unexpected. >=20 > Thanks, > Zhichao >=20 > > -----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 > > > > 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 BootOrde= r > > SHA-1: 7f34681c488aee2563eaa2afcc6a2c8aa7c5b912 > > > > > -----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 priori= ty 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 > > > priority > > > > > > Cc: Eric Dong > > > Cc: Liming Gao > > > Cc: Nate DeSimone > > > Cc: Prince Agyeman > > > > > > Signed-off-by: Zhiguang Liu > > > --- > > > > > > Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLi= b. > > > c | 35 +---------------------------------- > > > 1 file changed, 1 insertion(+), 34 deletions(-) > > > > > > diff --git > > > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook= Li > > > b.c > > > b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook= Li > > > b.c > > > index d7612fb80a..60acf48dd6 100644 > > > --- > > > a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHook= Li > > > 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 ex= pectation. > > > > > > - 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= boot option. > > > > > > - // > > > > > > - if ((BootOptionCount > 1) && > > > > > > - (((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L= "Enter > > Setup"))) =3D=3D 0) || > > > > > > - ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", Str= Len > > (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 > >