From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.5433.1597193149507554982 for ; Tue, 11 Aug 2020 17:45:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=qbM0nLq/; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: zhichao.gao@intel.com) IronPort-SDR: 3lsldngoTvgtDOKhhHvcvlvKWJWZCLs0O93jwLAShJwOkiIcp7ceRQ0OlsneEdX7S1inr2Kwsp 3kk0X2ZbvI3w== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="154984405" X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="154984405" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 17:45:48 -0700 IronPort-SDR: gLGuvZpxk3zwB2pH94PmQeWWPOE3JbDd3pjuIyO3BLSgc7pGeKT5crWIYT0lE8dHIAxoq47D8p AWiqqzZesrAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="398689744" Received: from unknown (HELO fmsmsx606.amr.corp.intel.com) ([10.18.84.216]) by fmsmga001.fm.intel.com with ESMTP; 11 Aug 2020 17:45:48 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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 17:45:48 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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 17:45:40 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 17:45:40 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.175) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Aug 2020 17:45:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f+KTILUhCXkM6GmP3jHipQi58i+mNVoI51k4Yop5LclB0QrKkQ6NOdKdniGh64feM/k3un4iMYUBHLwsah8+ggrvN9pG8v1mvDrbuzzkjD8UaFQYv/PCLhk161iqrt8oPFTXUT9z/0ziglUbX/GOZJa6lSbF2+9uiMTj1y1/96QNvZSAE+Qt4k8Uqcq6ocjH+cCy4hIgnqRNV6+5e+j1tiq4JIf3mMBLJPecptsW4eg1TUig3qcbbcUsHZAlY7Yd5tvglTieZ5h5CNdpnjS0L8Um1Xz+pvTNdcXHDfFFVVX8m/031nFIEtJ7S3Kl/Z6f74wze+GE8RHjV+BXhoaRKw== 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=240j1akDAkv+GtP29D3Rq0oN0QsrwWG6vNq6nDCZhEU=; b=di8o7ZNjSz3lM9vGQygmKA6kB4nIRlkSZyJb8IQianC2n+k5zp++3LeTobd6UKQxkQ3EXfEiLSbTXXIKNby3P40cTLpskQEccQ4XEMhhsZwzRkk2fJN9v6POAcih8s80IAbX9k9EUFejEmnLk/9zzCCbuswpdbH4QxnhK34oj3JInEBdF3cwbxMuuzIsaO+nZJcRYh9t6vUY7zRezTU9gSEyOPJdzEgPsonLg2ON0DLtsE2B9d1amowuaibWd5ZvL7lNslu2j3+SiHU6JarfBhcSiLG8qDtRC2O6/ivxR4M9Pr7+E3pYgKkwfVgeyLlyTEiyYRvkfWcIxynwq9D3AA== 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=240j1akDAkv+GtP29D3Rq0oN0QsrwWG6vNq6nDCZhEU=; b=qbM0nLq//1DhHweFVYthsNB8mVMhS6jKgy6Nsd9IGUqYWYlTbIrht51zzmLWvuBV+oysCyXpoXcdw5WCCSHmZEk7cMxmdvi+uZ5HOV3IJdEMfWVWz5jzSQs70O385kOMnzOvli/0woeB94mleY13dPsE2SLwGzGXetmqrGIhN0Q= Received: from CH2PR11MB4424.namprd11.prod.outlook.com (2603:10b6:610:47::31) by CH2PR11MB4279.namprd11.prod.outlook.com (2603:10b6:610:42::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.20; Wed, 12 Aug 2020 00:44:39 +0000 Received: from CH2PR11MB4424.namprd11.prod.outlook.com ([fe80::d5c6:29fc:c426:2d40]) by CH2PR11MB4424.namprd11.prod.outlook.com ([fe80::d5c6:29fc:c426:2d40%7]) with mapi id 15.20.3261.024; Wed, 12 Aug 2020 00:44:39 +0000 From: "Gao, Zhichao" 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 Thread-Topic: [PATCH 1/3] MdeModulePkg/PartitionDxe: Put the UDF check ahead of MBR Thread-Index: AQHWb6qzYeXAyAynkE+lNNOhF/k5iqkyjEOAgAAHhqCAAFhRMIAAtQ/g Date: Wed, 12 Aug 2020 00:44:39 +0000 Message-ID: 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: <734D49CCEBEEF84792F5B80ED585239D5C6690F1@SHSMSX104.ccr.corp.intel.com> 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.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9f17ba8c-29b9-4f68-d415-08d83e58e554 x-ms-traffictypediagnostic: CH2PR11MB4279: 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:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: o+MWv5niK8FRSp0Fd07P5y3jpD+RRIURhuTE+cJpooDby0t2Ztj1eI6MuWvFnOPGi2SxSF6+F3b23aaFYjsv75VBr2LviL26ORnRRPxSlWyLT4+jo0Ynl9cM7Sq+i+OMylKeFZTeSbhgU6sH8fmlB5E7NXx1qXxAMe1NeXTfS2uSIENFUvQp1okMUK4E1UGmfLTWDmdIKmELcZi2nXeiz64IXwRuU1SKWfeMZasc/PfQoYvC6JF2OEbzRYMD1BkDe1enbs1s/hF3IJoxF7eKLbkHiKnU9UoI8I7onCasNBCpY29tOVFSTkSvgaJll9rX/L1fGOMjlCDL392YjDxXCCay+IVPV5V7pnY/PAM+6fh50xi+zOn6DRFNCmweWd/EJTV6zyeVppDlqDlK0FvMRA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR11MB4424.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(366004)(396003)(376002)(346002)(136003)(86362001)(66446008)(66946007)(7696005)(55016002)(76116006)(26005)(6506007)(53546011)(186003)(66556008)(9686003)(64756008)(33656002)(478600001)(71200400001)(966005)(66476007)(4326008)(54906003)(316002)(5660300002)(8936002)(8676002)(110136005)(83380400001)(2906002)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: WyM+ERyaTnXE0wUeaUZYEkXjHCf1vqEkcHE9H8X6FidZR9JobKXznQDD7lqJbX1+G5+rsyfQ3Si+63yY4DLt3OO3x7g2srHscPw7DAXN9YcLSVsdgW2eJ+IjBhffCGhAlOB4cBAUR6v5YHXx7558PNW48wTrgfwvW5GI2XuDnGzkqFi39ZgzEWYqRex3ycffTdqJb4+Sqe6ARJQOyNJJRpR3vGJGvtduxtlOEIXveyDY0ClO1a+nnx+X6D3GiP2aDQycQS5933O3YbMGnUWn8vj6h9H043tin40Ds3hD5RLYn1sOWLeyuqkAVMFHhqvl5DPx3i5vEUBgVVn3Hp7CMbsG7ZaNABVhcP1xzLTBadZjFZNbC1Z7bmKWJyshG3ZLfUzGOk6Rb9ZQTFU6wjE9iQ/pfPcRBXvvGAHwQSaB58Zy6tBzWRbv5pgqqOFKAn4T+xs7uxZV7l/tn0qrf6hthxFN7fcYmZLxpkU/D3hJJS0NoT3XvL4ut1CmymtATUr9s8pSGjvHT2kxp36hUC8yXZ0BfPT9dBKj+r7m7aAWOaeCTUKDK+fewg2FNiE3pBiSkpc4A8TE3CSrwdkz6DlFv9wKT+F5C6JzF67CDJ+PbBfcplm6PxQJ8Rb21RBOSp3LqEpSIk3BrWi3NhD0VM+bzw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR11MB4424.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f17ba8c-29b9-4f68-d415-08d83e58e554 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2020 00:44:39.7241 (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: 2gzpzXplw33sS/e/1A0bhfUbvw1dhK5CJKYBFLIbA7+q2MCjZS2b3KG9B7t7foIuXnetnf/UbRlIPs3pbV5hnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB4279 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 OK. I would put the detail in next version patch. Let me put a sample here: 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 filesystem. When boot Linux Distributi= on, it comes into the grub console instead of the installation selection. Thanks, Zhichao > -----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 ahe= ad > of MBR >=20 > > > 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. >=20 > 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 futu= re. >=20 > > -----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 > > > > 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 information i= s 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 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 > > > > 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-ROM, > > > > +so put it > > > along > > > > +// with CD-ROM check. > > > > // > > > > PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] =3D { > > > > PartitionInstallGptChildHandles, > > > > - PartitionInstallMbrChildHandles, > > > > PartitionInstallUdfChildHandles, > > > > + PartitionInstallMbrChildHandles, > > > > NULL > > > > }; > > > > > > > > -- > > > > 2.21.0.windows.1 > > > > > >=20