From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.6588.1597197483629861880 for ; Tue, 11 Aug 2020 18:58:03 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: ray.ni@intel.com) IronPort-SDR: 5CmdTlh+ODEr7w7VZkHCFUBGeybcUfvMdEsfrGqRU3lMXx0yGHrIJdS7tZ8hMT+yZuFaYgK14t j4ugjufO9IKA== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="238708749" X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="238708749" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 18:58:01 -0700 IronPort-SDR: d0DWk3W3IpCmuX+T9/cgtBKAzX5cppA5LA/a2pItM7O3aRqPYTSq2HAnWaFJLK7QvVZfpAuEHM q1ECYihlSD0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="332670476" Received: from fmsmsx603-2.cps.intel.com (HELO fmsmsx603.amr.corp.intel.com) ([10.18.84.213]) by FMSMGA003.fm.intel.com with ESMTP; 11 Aug 2020 18:58:01 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 18:58:01 -0700 Received: from fmsmsx106.amr.corp.intel.com (10.18.124.204) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 18:58:01 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Aug 2020 18:58:01 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.70]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.141]) with mapi id 14.03.0439.000; Wed, 12 Aug 2020 09:57:58 +0800 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Gao, Zhichao" CC: "Wang, Jian J" , "Wu, Hao A" , Gary Lin , Andrew Fish Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check ahead of MBR Thread-Topic: [edk2-devel] [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check ahead of MBR Thread-Index: AQHWb6qzYeXAyAynkE+lNNOhF/k5iqkyjEOAgAAHhqCAAFhRMIAAtQ/ggAAXcJA= Date: Wed, 12 Aug 2020 01:57:57 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C66A5C0@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> <734D49CCEBEEF84792F5B80ED585239D5C6690F1@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action 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 Thanks. Good enough! > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gao, Zhic= hao > Sent: Wednesday, August 12, 2020 8:45 AM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Wang, Jian J ; Wu, Hao A = ; Gary Lin ; Andrew Fish > > Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the= UDF check ahead of MBR >=20 > OK. I would put the detail in next version patch. Let me put a sample he= re: >=20 > With patch #3 but without patch #1, the MBR table of ISO 9660 image can = be handled correctly, i.e. it would be treat as > MBR block device. We can find the bootable image thru MBR path FAT files= ystem. When boot Linux Distribution, it comes > into the grub console instead of the installation selection. >=20 > Thanks, > Zhichao >=20 > > -----Original Message----- > > From: Ni, Ray > > Sent: Tuesday, August 11, 2020 9:49 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 > > > > > > 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 behavio= r > > > > 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 different. > > Saying the specific issue can help people to understand the issue in f= uture. > > > > > -----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 chec= k > > > ahead of MBR > > > > > > Ray, > > > > > > The MBR info is correct. The order change is to avoid the MBR being > > > checked before UDF/ISO 9660 check. > > > That is why I make the patch #3 in the last of the patch set. > > > > > > Thanks, > > > Zhichao > > > > > > > -----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 ISOs (better with more specific ISO info), the MBR informatio= n is not > > correct? > > > > > > > > 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 chec= k > > > > > 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 > > > > > treat 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-RO= M, > > > > > +so put it > > > > along > > > > > +// with CD-ROM check. > > > > > // > > > > > PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] =3D { > > > > > PartitionInstallGptChildHandles, > > > > > - PartitionInstallMbrChildHandles, > > > > > PartitionInstallUdfChildHandles, > > > > > + PartitionInstallMbrChildHandles, > > > > > NULL > > > > > }; > > > > > > > > > > -- > > > > > 2.21.0.windows.1 > > > > > > > > > >=20 >=20 >=20