From nobody Tue Apr 30 13:56:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+72329+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+72329+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1614675843; cv=none; d=zohomail.com; s=zohoarc; b=Vf+nPBS0cgeGCDjXSTXnv5Zh23R62q/Md4Ey1axb9hYfKfTv/GNDyzD86+MBWe7CWcVucfdweaT0whq7Aagzz7QW5nIC6OMLbjy0E3rxaNlCUJW5ICiQVWtv9zkNtGe23riK2RPEm60nB0PJiwYirQYxtyf5w0tGV9G/9+UnmIE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614675843; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=cq6YssZ6i/a2ErIPF4zk24tom3v+sdk0ucElt4Tdwjk=; b=CcA5ZZ2a/idor3PDGjv/yT1rLaw+IGPpVEL8vgH1fK8wEOQ7bD6URfD3+AYJuY+XjWOu/wWh2xwO5yg05gLo6ycc69N/fyOQBdYO8/C2+ATPcwUaiF7PI0VUm5MYxoz4OaKmj511FDI6m2DL+HbbHgNv4YUcytd5H/eQZuvze6M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+72329+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1614675843264266.06108521971885; Tue, 2 Mar 2021 01:04:03 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id MYeNYY1788612x01QSv01B3x; Tue, 02 Mar 2021 01:04:02 -0800 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.6030.1614675837194438463 for ; Tue, 02 Mar 2021 01:03:57 -0800 IronPort-SDR: AIz4bxa0Jkya1fdQKMglsnPHiKs9gDi0LDMX7xdcKc6DuYIPLLoA2lG7UrVpAckaOj3PKqsC2M f6xMOVpssdXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="186867163" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="186867163" X-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:03:55 -0800 IronPort-SDR: 6aJDZYl8uDpzrrBdbSx4Dv/4sjbg3LsF/apwagPRQHbstNLppxdIv+grdnOvVTx+oXoygYge6J giV7awrTfljw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="506260177" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.158.144]) by fmsmga001.fm.intel.com with ESMTP; 02 Mar 2021 01:03:52 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Eric Dong , Liming Gao , Nate DeSimone , Prince Agyeman Subject: [edk2-devel] [PATCH] [edk2-platforms]Intel/BoardModulePkg: Always sort load option Date: Tue, 2 Mar 2021 17:03:42 +0800 Message-Id: <20210302090342.130-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com X-Gm-Message-State: 5IVW7pBmMuZocNuh1OUxxQr0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1614675842; bh=NB7yx9tVj9gJmQ+oUwgTJFxkc9EYS12nECaOk+jm3kw=; h=Cc:Date:From:Reply-To:Subject:To; b=s4yXWHMmBItRGO+iFfmIzbGjvHb1to+XaBeAwd18ZnUXKJ311+sWFD6jBfNgSuh7WYx j+l6Gb/1uaGfa3lByp7WQfdGa0cuKTaWWjhT67k2YaJBWn27CLuFFu2EJrood8YETymUG gHyD+ZZuuqtTqmFsoBuu9tVJbzKPbE1fHQY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Currently, load option is only sorted when setup is the first priority in b= oot 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 priori= ty Cc: Eric Dong Cc: Liming Gao Cc: Nate DeSimone Cc: Prince Agyeman Signed-off-by: Zhiguang Liu Reviewed-by: Ray Ni --- Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib.c | = 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBds= HookLib.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsH= ookLib.c index d7612fb80a..60acf48dd6 100644 --- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib= .c +++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBdsHookLib= .c @@ -992,37 +992,6 @@ ConnectSequence ( EfiBootManagerConnectAll (); } =20 - -/** - The function is to consider the boot order which is not in our expectati= on. - 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, LoadOpti= onTypeBoot); - - // - // If setup is the first priority in boot option, we need to sort boot o= ption. - // - if ((BootOptionCount > 1) && - (((StrnCmp (BootOptions->Description, L"Enter Setup", StrLen (L"Enter = Setup"))) =3D=3D 0) || - ((StrnCmp (BootOptions->Description, L"BootManagerMenuApp", StrLen (L"= BootManagerMenuApp"))) =3D=3D 0))) { - return TRUE; - } - - return FALSE; -} - - /** Connects Root Bridge **/ @@ -1383,7 +1352,5 @@ BdsAfterConsoleReadyBeforeBootOptionCallback ( =20 EfiBootManagerRefreshAllBootOption (); =20 - if (IsNeedSortBootOption()) { - EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootO= ption); - } + EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, CompareBootOpt= ion); } --=20 2.30.0.windows.2 -=3D-=3D-=3D-=3D-=3D-=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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-