From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web12.12310.1597230292391457968 for ; Wed, 12 Aug 2020 04:04:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TnxTyfI3; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597230291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gLn7Etk3s6u0mPL2RLC1WHILx/PH36kKbwK7EFgzcJc=; b=TnxTyfI3PZ7Q/Rq3QdQ0MIWu9uWICDm/cMRUcwALXm3ujEyY2qoYcHuodZLnf9kNMWOlOT OORV95/OhuHTSdEHmbQ+/Kb7/VaP5wn/mgPeguR23/gMRNeklb8kiTWU3XOZJK1HaSuR9H Nvbn1wsMA+KSieBPMCfPTZZ5ZOuxdXI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-h0E4Vu01MaiMRkuEuYrsdw-1; Wed, 12 Aug 2020 07:04:41 -0400 X-MC-Unique: h0E4Vu01MaiMRkuEuYrsdw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90493101C8A7; Wed, 12 Aug 2020 11:04:39 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-34.ams2.redhat.com [10.36.114.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95EF919D7F; Wed, 12 Aug 2020 11:04:37 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Make the parition driver match the spec To: devel@edk2.groups.io, glin@suse.com, Zhichao Gao Cc: Jian J Wang , Hao A Wu , Ray Ni , Andrew Fish References: <20200812012124.18220-1-zhichao.gao@intel.com> <20200812062652.GL21538@GaryWorkstation> From: "Laszlo Ersek" Message-ID: Date: Wed, 12 Aug 2020 13:04:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200812062652.GL21538@GaryWorkstation> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 08/12/20 08:26, Gary Lin wrote: > On Wed, Aug 12, 2020 at 09:21:21AM +0800, Zhichao Gao wrote: >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823 >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2843 >> >> Refer to the 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) >> 4. MBR >> 5. no partition found >> >> But the code implementation is: >> 1. GPT >> 2. MBR >> 3. ISO 9660 (El Torito) (UDF) >> 4. no partition found >> >> Which would cause the ISO 9960 image with MBR info be treated as MBR >> device. That would cause unexpect behavior. So fix it to follow the spec >> description. >> >> The fix of the PartitionInstallChildHandle would change the boot behavior >> of Linux ISO image with MBR table. So add it after the order adjustment >> to make no impact of the boot. >> >> V2: >> 1. Add description of the different behavior between grub boot from MBR path and >> from CD path >> 2. change patch #2 to revert "MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM" > > I've tested the following ISO images and all booted as expected. > > openSUSE Leap 15.2 > SLES 15-SP2 > Fedora 32 > Ubuntu 20.04 > > Tested-by: Gary Lin Thank you very much for the extensive testing! Laszlo > >> >> Cc: Jian J Wang >> Cc: Hao A Wu >> Cc: Ray Ni >> Cc: Gary Lin >> Cc: Andrew Fish >> Signed-off-by: Zhichao Gao >> >> Zhichao Gao (3): >> MdeModulePkg/PartitionDxe: Put the UDF check ahead of MBR >> MdeModulePkg/PartitionDxe: Revert changes for the special MBR >> MdeModulePkg/PartitionDxe: Fix the incorrect LBA size in child hander >> >> .../Universal/Disk/PartitionDxe/Mbr.c | 37 +++---------------- >> .../Universal/Disk/PartitionDxe/Partition.c | 22 ++++++----- >> 2 files changed, 18 insertions(+), 41 deletions(-) >> >> -- >> 2.21.0.windows.1 >> > > > >