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.web10.8787.1671181413929639848 for ; Fri, 16 Dec 2022 01:03:34 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dBCcVAV2; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671181413; x=1702717413; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=enahVNZFAtYGDWcx7Sibr2LpviYCT6FoYJYFBJJstIs=; b=dBCcVAV2ZD3rpynhGnHcjjzT4togfUIro/Dw585nyOHRqxVFYVmfMXr1 95rvQGBmXG5YUCAbhUTPfeUOGuXpN7ZX5JsKHyPCTJTPaQm1ZB2ulJ8Gu 4F3Lf0oLwZeEJ2l9H9vLYWszMsrFRiUxrwo3nZu/Dmdtiw/8ebSo2sQsn EfqsEAqyEl0jTi3XC6SNyroDapdYV5+ZVnsfp/bYRQFKvftsSseTbP5Nu xIGWQc777eZaoi3gD8tVNl0EGYk4tRA9zDb0EfZKGv1ZRiHj9pGnKo+q4 /2xSF+rn7R0/LcYsINfbPA1cjrnbEpP/IwDwIoJIGOHJThfoP++g6vV1M w==; X-IronPort-AV: E=McAfee;i="6500,9779,10562"; a="306599530" X-IronPort-AV: E=Sophos;i="5.96,249,1665471600"; d="scan'208";a="306599530" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2022 01:03:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10562"; a="651873139" X-IronPort-AV: E=Sophos;i="5.96,249,1665471600"; d="scan'208";a="651873139" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga007.fm.intel.com with ESMTP; 16 Dec 2022 01:03:28 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.2507.16; Fri, 16 Dec 2022 01:03:27 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2507.16; Fri, 16 Dec 2022 01:03:27 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 16 Dec 2022 01:03:27 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.48) 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.2507.16; Fri, 16 Dec 2022 01:03:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AVuWeZxKcGpXanhvVl/kTHKjmgpxA2xLx3d19r+dtjY637Kxx8vjX2nfGddpIMT0u6InWGFz0ko77CCkmxsSwf+DLZGAOM+wBkPYqFZmncBucZw0aPqr4bXEo4BM3/eR3TKXtvYHvZ6W/KCM0YyXRZE8kYnM9yIBDtQaosH5L/jGlSMa2MEspRFudQw5F24ezywAEilr3DBSewmjLVDEzXmNdJk96HYWKvDtvkjSR31SA5wpWvcw6JJEMpmswzNEUvthYNrhSJ3ueJTGMiWmIk/2s4bSV8KCz2QGV5GtZoopv3abRAg3noLKIOKvOIJpnV+12hSlkMRcA31y08RmqQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TUmTBO67j1c3wuuA5utJOHEkuaMG1WGIFkK9o2JHv+Y=; b=I+peHsAv2GCl+6H5YuGaqKVBCWlKN0k1IN68tgjdsJZ+aa93QxvSP/GLAXak9ZTTKUkMqGxq1A0qdMwAteMt0cMJQzFNryNiJLhYOC6SUsNDQWRdU7EQGJsLRWV4wS/T082plaYNbBRAIyXIhzwcZQZXOUfe421jFdhl6242AgzhuH0smKAoumnYyTQdtJ0rwuEMAOjf+HVq4r5Bs2PFrRlHzVBMcj93aHTo+tRkqlMEl56+jmHkt3xam7Az/m28ksCuJgMlJBSukSc5IlgdTC54+K2suyuCQC/GtGiOUCYegsnD4Z8H6Gqdsfz/aKW0zzJ9n6RAe+HxVExWSk+2sQ== 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 Received: from CY4PR11MB1622.namprd11.prod.outlook.com (2603:10b6:910:e::10) by SN7PR11MB6849.namprd11.prod.outlook.com (2603:10b6:806:2a1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Fri, 16 Dec 2022 09:03:24 +0000 Received: from CY4PR11MB1622.namprd11.prod.outlook.com ([fe80::65ab:9c58:7ff6:a825]) by CY4PR11MB1622.namprd11.prod.outlook.com ([fe80::65ab:9c58:7ff6:a825%10]) with mapi id 15.20.5924.012; Fri, 16 Dec 2022 09:03:24 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Rhodes, Sean" CC: Matt DeVillier , "Wu, Hao A" , "Wang, Jian J" , "Gao, Liming" , "Gao, Zhichao" Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BmBoot: Skip removable media if it is not present Thread-Topic: [edk2-devel] [PATCH 1/3] MdeModulePkg/BmBoot: Skip removable media if it is not present Thread-Index: AQHZESySnTpg88PyrUG3pZ8n9KFIDq5wOBeQ Date: Fri, 16 Dec 2022 09:03:24 +0000 Message-ID: References: <7bad2974b731b7cd8323582aa89ae4ed9f10702c.1671181085.git.sean@starlabs.systems> In-Reply-To: <7bad2974b731b7cd8323582aa89ae4ed9f10702c.1671181085.git.sean@starlabs.systems> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CY4PR11MB1622:EE_|SN7PR11MB6849:EE_ x-ms-office365-filtering-correlation-id: acdba530-8bb8-44b6-aea7-08dadf446387 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rmx7DI+6hwxAcji86e0ry5yE9LP5pn3nfqpKaOTmypKyKYJxxKcyM95yTYvHXVQMg5Kk5ocMclT9ezp6R1zoup+O5ESI3PcrK/DgilbK4NQY361q6NFxF4yykSgp1m+PTbx57tTHs8G8SKoOOkLxFlh+u/aAor3yLVWcVeKZWumYmOs2WNUiq4xU8H1QyX8wCgfZYiCtJ50d2gdAq5ijU977Vq/00DI8fJWfca7BRIr8j/4e8BIrrWLD1QK6Ia7DJiF6wvDYGwjdfVSzj1CB8rAPwBCxmRxm61y9m36QFSL1wB4j/2eT3sB+UwO3cK6Cxv5vrEmHY3jqp0b5mJWscUUrI48jUaPdofj3is9Fgww1vIyktvEVy339FUciS8y2NIyHGW3P2gyLaA9xnJZ5Tpka6IFxN7I+WuBIePagyI5WAzw2NnHkpXD95MQ3hgzzw2HMQw1SLw/jjKOm1243BcASf7NTGCjL7+ITnK8OsFWMpdztRDr/GyPeIlB+p1tlLm0Hs+ZBYM5/iOhwYhAg7M/YlwPt384Gu9Ii0Wi44+FUEEFExMA4VJLtGy0JspssRil+rZtHrjlnw3dUPICrkyjslJAC/GqNtNLGFJsgIty+XtaH928lPr20YF93X7c9iY71azAPzoPTYPNfcPar4VMkGqG1AxU1qnbLiKx2of2BzBvNVt7OKoMYfsNP56aRKdEYFR8b0qRYwwI5jnnOBo78f6/dn1Kdz0xfqnwPfG2YutfV+isbsFjUF9nWs2Fg1ripcfrffMCOIwVY84wubg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1622.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(6029001)(136003)(396003)(366004)(346002)(376002)(39860400002)(451199015)(66446008)(64756008)(76116006)(8676002)(5660300002)(52536014)(66476007)(71200400001)(66946007)(4326008)(66556008)(966005)(7696005)(8936002)(26005)(186003)(107886003)(478600001)(53546011)(86362001)(9686003)(83380400001)(110136005)(33656002)(316002)(6506007)(41300700001)(54906003)(38100700002)(66899015)(82960400001)(38070700005)(55016003)(122000001)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nxueWVE+/Rr2gTEttDoEEvpcLU6U2XdeM8Te6w15t4NgszJWLOJ/sjCsJNPv?= =?us-ascii?Q?9sG9C8IYrUTl4ucvCHrVLr1J+W0wxnlrcjey6Hjp9hJoBR3wAJ7LFl7Y+gR8?= =?us-ascii?Q?Ak/2Z34/xdrBNyzHL6LzUKWPvf188MI2la+OP7VT5WeK5NJYXfCZptlANObI?= =?us-ascii?Q?MnvUMbfJSobjFQXdmabDGHKpphWD6NamCkipf5FbTJHNeJArEeQ12fFoMTAa?= =?us-ascii?Q?a04e/G+tuLRqSbSKJqCVBz4g43uugSvGDhbNaJqevhtgk7HiH/f2gZ32husa?= =?us-ascii?Q?6y5NcDzo/idPX3n8Ag0gEFKs0EK+19CkYhZ9hn+F/G9hDn/DitZFKvMN4zMb?= =?us-ascii?Q?CHhWS3786pupdVw010TUh5mvnX9SKhWESj2vnI/OkbkIcSUT16qXFGVO4YeM?= =?us-ascii?Q?jxZW299qnfSXdjRevr31grvMKts262DvyRkkDfNeS7ZlsiHXRth5iMuvDbRP?= =?us-ascii?Q?zIl0C0+s24jIeB6aFPjHxulkNmdmY/ILer36t6qXJIjoH08ClPiX2UJdAIvU?= =?us-ascii?Q?ohB48ei6sUknx8zATzcIw2wQSVIS3L50A4n15eBjaxLVJqQjg0L/em8kvwOo?= =?us-ascii?Q?VQDEOi1fbPUImF+tclECrDIIJvAnyfntQRTutrzsymN95XcsCObJUOV7h+wS?= =?us-ascii?Q?1PvMKPNJ79mboIiZrGN1LiHzGxNM9kB7o8AgIYMhidIGkYqcOVeNP/8yg06Y?= =?us-ascii?Q?RZDuSSGJLI0I3fmwGV0zQLjd/hdn9oHstpp9CDFG1mvbhhIwYcOJh2Ll6zO7?= =?us-ascii?Q?HJb94SBuNlJMvGNaNUuIWx9XJ4TIOI9XfG8sjhpreKRSnet2RQv/P/BSS5uN?= =?us-ascii?Q?xb3XJABMAVB+qPU+QfHhPM506ToyITl/KfM8Jvx8oXpCqV0l50sFMSwZrwpu?= =?us-ascii?Q?4q9/JUNW9Y34mTT7vvlx8DevnP0J7RQfkPoHzlvkRXIYEephVUI0qh7hTr04?= =?us-ascii?Q?cZahoyo2rL9dlv5e838o2914Ky8lRATwfOPyL6g5wRTzVoc291/gSpvBLMkS?= =?us-ascii?Q?q7h9eRl2IlIxBhneC6Dp3H0RERy51zgHQdKpBm+UlDcsWhssRFiP8/YjB5U5?= =?us-ascii?Q?an7zmW61s6PrYFWiPDwWMwD0Xg+mUxozOUO0PFMlcpkZcWc4uzCVbFRIluie?= =?us-ascii?Q?+ytGm5lQSpngV/gTm/DYeeEd/ef6YCcWysFInoNHj2w3XvY/4ZLuzm8ecTSW?= =?us-ascii?Q?aXBuTny+7+iPc5gi8MOh8Ol/XjyCIhgvtIYiGqJBFw8GNYMLIJaMb7ac9Vn3?= =?us-ascii?Q?Tofx5isDrwa044M/d5WE6sWJhWUu5Bu1L31piHJW2MYPuGAYRrtZ5GTzLEfU?= =?us-ascii?Q?sh01CjmqlLcRDl7HldBsXQKpAizl58SUr7KnrNqHbju2DVypxiYvrzStegvr?= =?us-ascii?Q?bkPHJocgwID717Vl5MFaZ8fK1DuBuO4fxrNQA5J0poz8pwfs0jQmphRUfUEc?= =?us-ascii?Q?84gSRyZwYOOWZTCbXAwh8pWiF+lkeaxmujbgZsfC1rRL4IKEdEVXCggU1+xe?= =?us-ascii?Q?J2VBJNFI+bDIzxgof/7ZOAlx21a80VpvyEP6F2UmPFOoPBB+/zKO8qd09cR2?= =?us-ascii?Q?ytBdzrQHWolFEQapNk9TMsdTzX25AM0+SRPG4KwA?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1622.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: acdba530-8bb8-44b6-aea7-08dadf446387 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2022 09:03:24.6796 (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: oZMO+A0WSRvpnIkvIU0imFKk13WpYYcL/BEybPwkJyTVA2JoPK/IENbGDL5jaJKIyi5mhoDI/sLtbWC9tkV/9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6849 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 Reviewed-by: Ray Ni > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sean Rhode= s > Sent: Friday, December 16, 2022 4:58 PM > To: devel@edk2.groups.io > Cc: Matt DeVillier ; Wu, Hao A ; Wang, Jian J ; > Gao, Liming ; Gao, Zhichao ; Ni, Ray ; Rhodes, > Sean > Subject: [edk2-devel] [PATCH 1/3] MdeModulePkg/BmBoot: Skip removable med= ia if it is not present >=20 > From: Matt DeVillier >=20 > Only enumerate devices that have media present. >=20 > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Liming Gao > Cc: Zhichao Gao > Cc: Ray Ni > Reviewed-by: Sean Rhodes > Signed-off-by: Matt DeVillier > Change-Id: I78a0b8be3e2f33edce2d43bbdd7670e6174d0ff8 > --- > MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > index 962892d38f..bde22fa659 100644 > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > @@ -2218,6 +2218,15 @@ BmEnumerateBootOptions ( > continue; >=20 > } >=20 >=20 >=20 > + // >=20 > + // Skip removable media if not present >=20 > + // >=20 > + if ((BlkIo->Media->RemovableMedia =3D=3D TRUE) && >=20 > + (BlkIo->Media->MediaPresent =3D=3D FALSE)) >=20 > + { >=20 > + continue; >=20 > + } >=20 > + >=20 > Description =3D BmGetBootDescription (Handles[Index]); >=20 > BootOptions =3D ReallocatePool ( >=20 > sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (*BootOpti= onCount), >=20 > -- > 2.37.2 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#97498): https://edk2.groups.io/g/devel/message/97498 > Mute This Topic: https://groups.io/mt/95706437/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