From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.15459.1597153728290653935 for ; Tue, 11 Aug 2020 06:48:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ray.ni@intel.com) IronPort-SDR: OXXwFM1VPw6Pj6r2gGzq97qn+8JH3neoXSnciUmBVy35vatO+4733JrXvnBfOcKvCgFUM0bdYV ITziv9FHufiw== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="153706061" X-IronPort-AV: E=Sophos;i="5.75,461,1589266800"; d="scan'208";a="153706061" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 06:48:47 -0700 IronPort-SDR: TNUZE5FXjEOhN7jcvXCiNH9uDL/kbrrpY6vYC7JgNkx5TSPYZE6cPK7LLBifUXUOASOL24bhZJ ASILP0+k4gvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,461,1589266800"; d="scan'208";a="495152131" Received: from unknown (HELO fmsmsx606.amr.corp.intel.com) ([10.18.84.216]) by fmsmga005.fm.intel.com with ESMTP; 11 Aug 2020 06:48:47 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 11 Aug 2020 06:48:46 -0700 Received: from fmsmsx103.amr.corp.intel.com (10.18.124.201) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 11 Aug 2020 06:48:46 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Aug 2020 06:48:46 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.70]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.32]) with mapi id 14.03.0439.000; Tue, 11 Aug 2020 21:48:43 +0800 From: "Ni, Ray" To: "Gao, Zhichao" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Wu, Hao A" , Gary Lin , Andrew Fish Subject: Re: [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check ahead of MBR Thread-Topic: [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check ahead of MBR Thread-Index: AQHWb6qzYeXAyAynkE+lNNOhF/k5iqkyjEOAgAAHhqCAAFhRMA== Date: Tue, 11 Aug 2020 13:48:42 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C6690F1@SHSMSX104.ccr.corp.intel.com> References: <20200811064302.33188-1-zhichao.gao@intel.com> <20200811064302.33188-2-zhichao.gao@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C66892B@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > > This would also solve the issue that ISO image with MBR would be treat > > as MBR device instead of CD/DVD. That would make the behavior of the > > image boot different. Can you please explain this in detail? It's ok to not provide the "root" cause of why the image boot behavior is d= ifferent. Saying the specific issue can help people to understand the issue in future= . > -----Original Message----- > From: Gao, Zhichao > Sent: Tuesday, August 11, 2020 4:34 PM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A ; > Gary Lin ; Andrew Fish > Subject: RE: [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check > ahead of MBR >=20 > Ray, >=20 > The MBR info is correct. The order change is to avoid the MBR being check= ed > before UDF/ISO 9660 check. > That is why I make the patch #3 in the last of the patch set. >=20 > Thanks, > Zhichao >=20 > > -----Original Message----- > > From: Ni, Ray > > Sent: Tuesday, August 11, 2020 4:04 PM > > To: Gao, Zhichao ; devel@edk2.groups.io > > Cc: Wang, Jian J ; Wu, Hao A ; > > Gary Lin ; Andrew Fish > > Subject: RE: [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check > ahead > > of MBR > > > > Zhichao, > > Can you also add notes in the commit message describing that for some I= SOs > > (better with more specific ISO info), the MBR information is not correc= t? > > > > Thanks, > > Ray > > > > > > > -----Original Message----- > > > From: Gao, Zhichao > > > Sent: Tuesday, August 11, 2020 2:43 PM > > > To: devel@edk2.groups.io > > > Cc: Wang, Jian J ; Wu, Hao A > > > ; Ni, Ray ; Gary Lin > > > ; Andrew Fish > > > Subject: [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check > > > ahead of MBR > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2823 > > > > > > Refer to UEFI spec 2.8, Section 13.3.2, a block device should be > > > scanned as below order: > > > 1. GPT > > > 2. ISO 9660 (El Torito) (UDF should aslo be here) 3. MBR 4. no > > > partition found > > > Note: UDF is using the same boot method as CD, so put it in the same > > > priority with ISO 9660. > > > > > > This would also solve the issue that ISO image with MBR would be trea= t > > > as MBR device instead of CD/DVD. That would make the behavior of the > > > image boot different. > > > > > > Cc: Jian J Wang > > > Cc: Hao A Wu > > > Cc: Ray Ni > > > Cc: Gary Lin > > > Cc: Andrew Fish > > > Signed-off-by: Zhichao Gao > > > --- > > > MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 10 +++++++++- > > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > > > diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > > b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > > index 6a43c3cafb..473e091320 100644 > > > --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > > +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c > > > @@ -35,11 +35,19 @@ EFI_DRIVER_BINDING_PROTOCOL > > > gPartitionDriverBinding =3D { > > > > > > // > > > // Prioritized function list to detect partition table. > > > +// Refer to UEFI Spec 13.3.2 Partition Discovery, the block device /= / > > > +should be scanned in below order: > > > +// 1. GPT > > > +// 2. ISO 9660 (El Torito) (or UDF) > > > +// 3. MBR > > > +// 4. no partiton found > > > +// Note: UDF is using a same method as booting from CD-ROM, so put i= t > > along > > > +// with CD-ROM check. > > > // > > > PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] =3D { > > > PartitionInstallGptChildHandles, > > > - PartitionInstallMbrChildHandles, > > > PartitionInstallUdfChildHandles, > > > + PartitionInstallMbrChildHandles, > > > NULL > > > }; > > > > > > -- > > > 2.21.0.windows.1 > > >=20