From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.5248.1670379845331891568 for ; Tue, 06 Dec 2022 18:24:05 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=iHqYFxgr; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670379845; x=1701915845; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=MY6aaG/VduKcGcJDk+ZHxekNUfxCC5OqWsDMPO9QMeg=; b=iHqYFxgrBT33Ll73QDMePYw5HmTvBU+wJ+U78w1U3MG9jzD4Ld1uGH4v 3YW4JwLiONFb5VuYjZOJlH94c/5I7JG6TAPJUzxhWGDL7Lqy6haw2ewDS 20HostZsRLuad7Cf7BsMOtm1pIcd5YMBEvptsVdL6TDhgg64mjtsaA5d5 PuWK2LTDU871e9w/jSai6afC2XLIK9MvCvYvtSUM8WIj4Hin49TdGrJCk ssm3B6vJOKnYAfRgjUCHIP0KCtqNu+LywEbn2esVrZwvvAABvaFICBk3t +oZhAofX0uMY/DujXDoe6Yr2hIYhlSX+dEjApT+9T0uoxsY+AYdK/N6rx g==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="296480025" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="296480025" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 18:24:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="788718892" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="788718892" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga001.fm.intel.com with ESMTP; 06 Dec 2022 18:24:02 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 6 Dec 2022 18:24:01 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 6 Dec 2022 18:24:01 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.105) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Tue, 6 Dec 2022 18:24:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dLC/b1yeXmgF7zXpIN7rb25HxW8osNC5E9Zp2wBPlwX1Z2qIrM20OnKEv+NXBRtKNxQpDMVFH1dL2VYVkIIALuQJNPR2paUOHRex78RQix5AHbR0wJHmkqhxN6pjw1mZeggFH0r8hmUfdBMYyAGdepbibemhgVthPLOdxrJ4/NX+GjgtIk9JQ0r99zHglqDNmNFLg7iix4ElpfxtToo0j2pCHdm9So8lEBhP5E8FS75Bo7XADwXTGwISnsZYC+M5SqF3dcMo3WjGrpib8hw92+yJ2IoC75KfHGT/XkaAYnb2qe/ZYojlRkKrz5YbaEa+OpU3tLQ68XkySWQJpDT4HQ== 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=vAUMyXW8JlrHWZFYv8/vlhtSBb+nainSQhsFUKt3z9I=; b=Yb/0xpH8sh5wGQ0N5LcE4XVrKnr3RQzDhy8G+RV40nlF1KLb+QNfDDQSlMPLIIVAvQc7chH+LgLDCP+lxkK87Iat9n8PVyFLEcmrxB+nz5rL97Kwpic4FSOHOgh7Zor6osHoIgLDCeKVyee31DYSFc7iVKGIhhz8NU1yZ73NcNStCckePWengNeP5O2BV/lxPiFpcb9fSGwOdbAyTU5BuEBunRnGSSX8v7yzeIy6h92Ke6w0S10oOnTs10yCZfXCzlTt5HKrPedCsc3O3yiAsJBk4hzFqPe1KQdSCQMzVGNhezk9lecK/ZYxfMg5efCXKEAKiRMqOx9rPDyfKkKYmw== 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 DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by CO1PR11MB5204.namprd11.prod.outlook.com (2603:10b6:303:6e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 02:23:59 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::6129:7158:18dd:761c]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::6129:7158:18dd:761c%3]) with mapi id 15.20.5880.013; Wed, 7 Dec 2022 02:23:59 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Rhodes, Sean" CC: Matt DeVillier , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 3/4] MdeModulePkg/BmBoot: Skip removable media if it is not present Thread-Topic: [edk2-devel] [PATCH 3/4] MdeModulePkg/BmBoot: Skip removable media if it is not present Thread-Index: AQHZCIqU+Hdxu07tTUOSflR/S7NzLK5gFCZg Date: Wed, 7 Dec 2022 02:23:59 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 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: DM6PR11MB4025:EE_|CO1PR11MB5204:EE_ x-ms-office365-filtering-correlation-id: 7bfe45e9-24b3-4502-045a-08dad7fa1946 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: ZRS0CPw0njiG4+EJ1a9RqEFzEN5wnAcQ/oXjd/uD3bCXT5bqkl2c5DY3nhBj42aiMxehfVPn+yFZ20XmTUM46+p2X0CTR5Yu+qPZYuucUJ+5/dtLqGt5AFqWluuPT+G0d4WPNakmKuBs9+FX3GmGaJkXuACYLoWC2zXa8QHGVznh1Q0Asn2MPIt66pYa+ajhg7In2a5nD0hWepVzuI86zaMIb5Gpdo+oIb2iMmybZ4OKI0VB/Etv3wLOKm5tAfb2EXDl7kJ3g18PDULJH8DzKxqs5Vzn3XnwSC4nimcgGU58PYnS8cJL25ZVnCydEuPYAArtV0pNqJZHqj+w/bD9qX6vO0s+sLDbWEMhZLSREoe11baW/FEedLEmJ0YKKIRS3lsTzGkUjQ29zt/IH3NOx1sTmeVh+/tvLi2Undtt+9zD5vRbgdC/0VmW/DLOBjdQfQXA7B/AijmunHkC0/GgCJFIm27+es/Pnre2BeLw+3cI8G+aTBqPhOwEdsF/glZtRMxeCLQqxI9iv6j1ESR4sYSKLQBF723aQjfGDG3ybTxbUMZpYxfuUz0KDiXnrsaKKzrrfvQEfZX3fbAfI/dOyEMbu/JAmnqS3Sz/A6xn2iW/vVKqUs2ktQ4NeXQRrjwpBgZtgxirvSwooIgAD5BVZrRXr/823yY8zZDaoTuEQxvrNqiIGX8OJJnb5NVLOCAjWpCcbH86rfL5fGDltR6Ond5/kU3pfGMxAqBFk+u1UlPyLVJqyaxgklGm1zg/vwCkkHkmcKw2AC3dRcXItvqFuQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(6029001)(39860400002)(376002)(346002)(136003)(366004)(396003)(451199015)(66899015)(6506007)(7696005)(33656002)(71200400001)(86362001)(53546011)(478600001)(38070700005)(966005)(55016003)(38100700002)(83380400001)(82960400001)(122000001)(9686003)(8676002)(41300700001)(186003)(5660300002)(26005)(107886003)(66476007)(66556008)(64756008)(76116006)(66446008)(66946007)(54906003)(8936002)(2906002)(316002)(4326008)(52536014)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GvavZvLhZCjSdQ7q94eqOrNu5x3JfSDzJDEzcQc6lbxiMS48LemRS+wNN7pK?= =?us-ascii?Q?/I1aS8SP0ClwEhUojZlAg5djwjoOXSh+7NBw0tmGHevT8sB6KmUS0+kH0qI0?= =?us-ascii?Q?AQlfWxEJNfHtwVG1q77Hn12n9nL4/pcMXGTDvnJuYo6vCKtWXxIHsT3ndd8H?= =?us-ascii?Q?x1+prhMxs2+hjjnQMtQUVzHtw8CBNOmlF0Kxn/yS1LgK56eZnS49MVYkhvwY?= =?us-ascii?Q?w1edAVYsMOobhWFgAFcPCrXeJm9yGGHAn7IzoHqNgz9Zlg9/1JwzJsS0wgDu?= =?us-ascii?Q?wkogJeXf4azfo9p8LBl3aJD7RwOGpJ/7stElbNs7sUtxLTEUeRPymibprLuK?= =?us-ascii?Q?iFHRNJLD3I4TbycEp5cmMmcFjooEHReq5+omQ96fq9swInr2BgIN1BuZP/uw?= =?us-ascii?Q?lRXEm8AsmVbsb3o8PAoQpt/GweGrZwiQT8jDMDmAKvpMEtJdebRP16x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V8NjH9og+MhpApBC5SG2tTQErABN9svf0tARdPb8PCr3aa5dx0O?= =?us-ascii?Q?bS3aYRHZSeVOtHCayhA6b2Je9o+Ct2Be1UKyXtSeTCu5MGZtxoUMyYxreM12?= =?us-ascii?Q?5RqBWEC4tF7mXfXAU65euArfWpiQ4OX89aB2uH6CqhVA4br+kJvgTyHNMTez?= =?us-ascii?Q?y45Oxpcy/RrlycjK4/8ISotX0MIHm/T8GhX9KaTnoPHjth6zYH899rf5nUKV?= =?us-ascii?Q?BkPsAuhLxkKcKf5FUJw8RPmssz7x7jElCm9HntAC?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7bfe45e9-24b3-4502-045a-08dad7fa1946 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2022 02:23:59.2005 (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: JVrMN9nIQVduGrcjz/u/SDkBimg0LcTqFzcFaUlWA2Qfxz3/pRZfWpz1WxjOwGvjat7aEpcHMfkCiROMMeBIWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5204 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Could you help to co-work with BDS modules reviewers for reviewing this pat= ch? py BaseTools/Scripts/GetMaintainer.py 294ce61c3b1a63c89bd16a78f8e8b40e889da= c5a MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c Jian J Wang Liming Gao Zhichao Gao Ray Ni devel@edk2.groups.io Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sean > Rhodes > Sent: Monday, December 5, 2022 5:18 PM > To: devel@edk2.groups.io > Cc: Matt DeVillier ; Wu, Hao A > ; Ni, Ray ; Rhodes, Sean > > Subject: [edk2-devel] [PATCH 3/4] MdeModulePkg/BmBoot: Skip removable > media if it is not present >=20 > From: Matt DeVillier >=20 > Only enumerate devices that have media present. >=20 > Cc: Hao A Wu > 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) * > (*BootOptionCount), >=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 (#96952): https://edk2.groups.io/g/devel/message/96952 > Mute This Topic: https://groups.io/mt/95465402/1768737 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D >=20