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.web12.1411.1597282724335899059 for ; Wed, 12 Aug 2020 18:38:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=sro5Z54j; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: zhichao.gao@intel.com) IronPort-SDR: 8EzeqTPgfxtvYlt2kKQ8upRj7LrDgFi39dredABWwNIypug8i2YZQ+JjEGo9bEHQAN2lIPjBUN CStMgddSMTeA== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="141982880" X-IronPort-AV: E=Sophos;i="5.76,306,1592895600"; d="scan'208";a="141982880" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 18:38:43 -0700 IronPort-SDR: zrpID2cksdLX0iScFJl9ivFvUOcwgGGPuTmY5oT7xnpPRAqrDuLF6ZvlmzMkJE/84B9VNOdW3j JnuweP+fkjdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,306,1592895600"; d="scan'208";a="495702919" Received: from orsmsx601-2.jf.intel.com (HELO ORSMSX601.amr.corp.intel.com) ([10.22.229.81]) by fmsmga005.fm.intel.com with ESMTP; 12 Aug 2020 18:38:42 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 12 Aug 2020 18:38:42 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 12 Aug 2020 18:38:42 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 12 Aug 2020 18:38:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XFc6a9xHyIJ3Syi8FUjryFiNdx7+ypa5YLpqa/lw2fw7wd+yYx1vXz9PzDe9/jV1yUsByFWTsg+YlplC8V13xz1/WXA+2UnxpPBINVz3UKUIMH7e3ujHuyHC9Vc/yelNs504Mj0OHQFoBEhQoO0yoI1KvExFGp7vnt+yDkxz+DOnoQWB+BOObbif+J6tKsD43eVmFOnm2pWSpIP9YwPTvHz4iXWyDsUTDJKGtClDs4RVA9rOl2CUwlwgBpaHq965fdz5qKsyU2n/6EMsPBtkbKCg0+6sYU+W1RZ7DDvljhHmF5k6R1i2PoTFjVuvLClsr05K5wOrZ/nUSnuTkvSetg== 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=bB/D/BJBdQKc5+dotWq+YtLtIb2AVoTZs8HsfwbHJbs=; b=S0TyCtmwjNY0sm1Gx30WDz54f+DKlggabFRki4U4qqJFeLElDmZ/tZ2FQrTd5fqdhu9CVy+++O+QbhUVy77hw2TQBMBOzMdc8O/lwJk/uGwJLMZoqcBPSKJNFjZSWFgekgLQfnHEy3vvVxDfJrBz7DJMSrBx2keHOTcDDbovT9DF4jpYRUsKRsWZ45dlB1ZWmXzKvCau9+8dNcXhCaiXV0HovVCOmbHQhESkZ3m9TYp0viWf+zlh46JKaxylz5iZkqSgH/kSR09zxSW0a8phrD+bcdAJUhWGuN4Bz5ZenW9k1yj0MqNGZolnhIT5gdM06EwwWaUvVUy0T0IMcyeAzA== 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=bB/D/BJBdQKc5+dotWq+YtLtIb2AVoTZs8HsfwbHJbs=; b=sro5Z54jxdXH+F4744O4MbD3s0y/vf5RPAlv5reBomfmVxoMkNt3whuPBhgt/LfCX0LJXTxFZ/vt9168qihVIX0b+FvyEoRnsVJsmfPt69UM/6QstgeaXXfA1JyfHh7ZbUHfbv4haXoVu//yVXBAWTZ2lZgKBbfDZFmyIH4lLk4= Received: from DM6PR11MB4425.namprd11.prod.outlook.com (2603:10b6:5:1d9::31) by DM5PR11MB2057.namprd11.prod.outlook.com (2603:10b6:3:d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19; Thu, 13 Aug 2020 01:38:31 +0000 Received: from DM6PR11MB4425.namprd11.prod.outlook.com ([fe80::8dc1:7146:874:83f7]) by DM6PR11MB4425.namprd11.prod.outlook.com ([fe80::8dc1:7146:874:83f7%6]) with mapi id 15.20.3283.016; Thu, 13 Aug 2020 01:38:31 +0000 From: "Gao, Zhichao" To: "Wu, Hao A" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Ni, Ray" , Gary Lin , Andrew Fish Subject: Re: [PATCH V2 3/3] MdeModulePkg/PartitionDxe: Fix the incorrect LBA size in child hander Thread-Topic: [PATCH V2 3/3] MdeModulePkg/PartitionDxe: Fix the incorrect LBA size in child hander Thread-Index: AQHWcEb3qECUdg++/k6LuUt5CtmXgqk0AmhAgAE9JVA= Date: Thu, 13 Aug 2020 01:38:30 +0000 Message-ID: References: <20200812012124.18220-1-zhichao.gao@intel.com> <20200812012124.18220-4-zhichao.gao@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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d336f4aa-28a9-4080-e8a2-08d83f2995ba x-ms-traffictypediagnostic: DM5PR11MB2057: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JSspY0o3u8Ix13WghPlWWF4Y6Sa/0BhS9ebGD7KlAgGuKhwXCyI58DVTuRh2AlwsC2RogMUGSzZV9rgMz5vOUb1bxt/00zbtEn56+HJPhrcGY3bPMhGbhyMlpgtaKDeQ0h5USH15ZI68mivFwyPwOG8vz9wlLUrZ4oiG+TVuAGe8C5GVg2j5gcM1fUjDbJQKlKGnkmUajEH85EFCMuwishuCAJ3XlxJdrsYFO1oblDzuzdjF87Ef7lDEJ0SwtWClz4jyzNTj7HyKHg88gsWrvOFsridzIzruo+m1gmhLC2XNtjHov+PnAGBuNcDbgFTknEDEJ4JnrpomJ2nv/rfNmdXic3TtcPzj2HcefhIfwony5NnwViJUF7az5sb9ETwSO2OnfQAbNexjvK4Gojdb4Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4425.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(396003)(366004)(346002)(39860400002)(376002)(4326008)(66556008)(8676002)(66476007)(52536014)(66446008)(86362001)(71200400001)(2906002)(186003)(33656002)(83380400001)(9686003)(54906003)(5660300002)(478600001)(6506007)(53546011)(26005)(64756008)(55016002)(8936002)(316002)(966005)(7696005)(76116006)(110136005)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: k4/DGcEtHLvvCnjsqJYAphgtBuKt3oz75+bvDQ6V0I64RU/Ly2qBqzrN9/rZZG7yobYtIrFMaroIeYEHK2mYb2DaiGTI7M6/4mq5BQUN0ZbI5KkB28uigs9hN+TDM51A90JTx3DPPBFt2T8kcrOLlP+p5idQypacv3qPQzUUgRtUzqULSlGxnizRACLjL/5U1hJkr3Ndy+bYC6pD1FV+VUiNcGQ7xEDPaVn0dehF+KTou7ThAr/LbfcoFnLxmiliQ9y6171deacV1H0zxGsOv4eVfX8/YxNm7sc+QBoRS+hf5u6ctEg5NfpW+x8lGOM+86fuz+fuAOTLDA2pGkgiMOwixKQr6TOGMj03dsq5OQk+daPyCTTGiF2afXSOLMPrBk5p4SqC2/v6W9YhDIbu+yUV4ZDmthS1eVTxVWxLdonOs4F7U/F4Pix20YMO9ocy2zQ9zUPMB/zdlwo+boQcrAVrRTA6QeWxCviQKpnph1hnR6cb2fo1BBdyiCieY85wmgETTviAwkeWN6eazp9HuTowL7z6m1EAbWOw/zlzFfrL2UOJvlOr8VkQ3hysjB4KbSA/rnqmKTRd34giiCF6zQPuiY6uB9Oq24o/ywQohyHZLkDwuzMul32Lxfox7fl/8NbAWf7Ga+GErDRgoz22Qw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4425.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d336f4aa-28a9-4080-e8a2-08d83f2995ba X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2020 01:38:30.9829 (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: MPZZiwm2UqJyO511Jk6jAGoKNzFtAkfo4xzVVSu5DtPQFiFNun0A+BbO31ARUmovY/3a5aiVntpg+VrHVm/crg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB2057 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 For additional info, I have test patch #3 without #1 and #2, and revert "MdeModulePkg/PartitionD= xe: Skip the MBR that add for CD-ROM". The CD's FAT can be observed with MB= R path and I can load the EFI application successfully. But the behavior is= different as I mention in patch #1 commit message. Test with open SUSE 15.= 2, RedHat 8.2, Ubuntu 18.04 and Fedora 20. Only Ubuntu can enter the installation selection but it output a "error: un= known filesystem". Anyway, CDROM's MBR can be checked and handled correctly. Thanks, Zhichao > -----Original Message----- > From: Wu, Hao A > Sent: Wednesday, August 12, 2020 2:35 PM > To: Gao, Zhichao ; devel@edk2.groups.io > Cc: Wang, Jian J ; Ni, Ray ; Gar= y Lin > ; Andrew Fish > Subject: RE: [PATCH V2 3/3] MdeModulePkg/PartitionDxe: Fix the incorrect = LBA > size in child hander >=20 > > -----Original Message----- > > From: Gao, Zhichao > > Sent: Wednesday, August 12, 2020 9:21 AM > > To: devel@edk2.groups.io > > Cc: Wang, Jian J ; Wu, Hao A > > ; Ni, Ray ; Gary Lin > > ; Andrew Fish > > Subject: [PATCH V2 3/3] MdeModulePkg/PartitionDxe: Fix the incorrect > > LBA size in child hander > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2843 > > > > PartitionInstallChildHandle's parameters Start and End is counted by > > the BlockSize, but in the implementation it uses the parent device's > > BlockSize to calculate the new Start, End and LastBlock. > > It would cause the driver report incorrect block scope and the file > > system would fail to be found with right block scope. > > So correct it to the right value. > > > > Cc: Jian J Wang > > Cc: Hao A Wu > > Cc: Ray Ni > > Cc: Gary Lin > > Cc: Andrew Fish > > Signed-off-by: Zhichao Gao > > Reviewed-by: Ray Ni > > --- > > MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 12 > > +++--------- > > 1 file changed, 3 insertions(+), 9 deletions(-) > > > > diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > index 473e091320..f10ce7c65b 100644 > > --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > @@ -1149,8 +1149,8 @@ PartitionInstallChildHandle ( > > > > Private->Signature =3D PARTITION_PRIVATE_DATA_SIGNATURE; > > > > - Private->Start =3D MultU64x32 (Start, ParentBlockIo->Medi= a- > > >BlockSize); > > - Private->End =3D MultU64x32 (End + 1, ParentBlockIo->Me= dia- > > >BlockSize); > > + Private->Start =3D MultU64x32 (Start, BlockSize); > > + Private->End =3D MultU64x32 (End + 1, BlockSize); >=20 >=20 > For function PartitionInstallChildHandle(), the input parameters 'Start' = and 'End' > (which denote the block index) should be of unit indicated by the input p= arameter > 'BlockSize'. >=20 > I checked all the callers of PartitionInstallChildHandle(), it looks to m= e that GPT, > MBR and UDF follow the above rule. While I am not able to get a straight- > forward match for the El Torito case. It seems fine with me, but I am not= sure. > Anyway, if the CDROM content can be properly identified then I think the = change > will be good. >=20 > Reviewed-by: Hao A Wu >=20 > Best Regards, > Hao Wu >=20 >=20 > > > > Private->BlockSize =3D BlockSize; > > Private->ParentBlockIo =3D ParentBlockIo; > > @@ -1187,13 +1187,7 @@ PartitionInstallChildHandle ( > > > > Private->Media.IoAlign =3D 0; > > Private->Media.LogicalPartition =3D TRUE; > > - Private->Media.LastBlock =3D DivU64x32 ( > > - MultU64x32 ( > > - End - Start + 1, > > - ParentBlockIo->Media->BlockSize > > - ), > > - BlockSize > > - ) - 1; > > + Private->Media.LastBlock =3D End - Start; > > > > Private->Media.BlockSize =3D (UINT32) BlockSize; > > > > -- > > 2.21.0.windows.1