From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.6027.1597195289387869314 for ; Tue, 11 Aug 2020 18:21:29 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: zhichao.gao@intel.com) IronPort-SDR: +qR39MO0R9RmE7HGk7fCIGBn2G+Upw4BvEAjReBVMYyN345/a8T4tlQyW79kdnP2vSZTg6rMoK ajAZCC2LuCtQ== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="171908213" X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="171908213" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 18:21:28 -0700 IronPort-SDR: GZ7RUgNTs+fxcEZRGd54lYgLkv6EA4c6G4d0pWKweCixx660chItyGh+J0DsLPwOvaHMVLfTf+ 33WUEwHtRUnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="494868717" Received: from fieedk001.ccr.corp.intel.com ([10.239.153.108]) by fmsmga006.fm.intel.com with ESMTP; 11 Aug 2020 18:21:26 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Ray Ni , Gary Lin , Andrew Fish Subject: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Make the parition driver match the spec Date: Wed, 12 Aug 2020 09:21:21 +0800 Message-Id: <20200812012124.18220-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" 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