From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com []) by mx.groups.io with SMTP id smtpd.web10.9771.1597128204307372847 for ; Mon, 10 Aug 2020 23:43:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) IronPort-SDR: t0BxWuNWldayrU7JDU3Pfj7n5DJP2CJnMdVyLM2M36z1465osx6c8Kv7xZ0HVqIHyCK2ukhMbR wSC8PdV9wY2Q== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="215195333" X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="215195333" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2020 23:43:15 -0700 IronPort-SDR: honQ9XEL5omsKu6uDsOV04ssWW9dfUcyiMTb0M164YyAbB/HxoqZhf/bR0OD/l2iBbsEZzmH1Z KVvLJjEWqdug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="334477058" Received: from fieedk001.ccr.corp.intel.com ([10.239.153.108]) by orsmga007.jf.intel.com with ESMTP; 10 Aug 2020 23:43:13 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Ray Ni , Gary Lin , Andrew Fish Subject: [PATCH 2/3] MdeModulePkg/PartitionDxe: Remove the check for special MBR Date: Tue, 11 Aug 2020 14:43:01 +0800 Message-Id: <20200811064302.33188-3-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200811064302.33188-1-zhichao.gao@intel.com> References: <20200811064302.33188-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823 Follow the spec definition, the ISO 9660 (and UDF) would be checked before the MBR. So it is not required to skip such MBR talbe that contian the entire block device. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Cc: Gary Lin Cc: Andrew Fish Signed-off-by: Zhichao Gao --- .../Universal/Disk/PartitionDxe/Mbr.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c index 3830af1ea7..822bf03e92 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c @@ -55,25 +55,6 @@ PartitionValidMbr ( StartingLBA = UNPACK_UINT32 (Mbr->Partition[Index1].StartingLBA); SizeInLBA = UNPACK_UINT32 (Mbr->Partition[Index1].SizeInLBA); - // - // If the MBR with partition entry covering the ENTIRE disk, i.e. start at LBA0 - // with whole disk size, we treat it as an invalid MBR partition. - // - if ((StartingLBA == 0) && - (SizeInLBA == (LastLba + 1))) { - // - // Refer to the http://manpages.ubuntu.com/manpages/bionic/man8/mkudffs.8.html - // "WHOLE DISK VS PARTITION" - // Some linux ISOs may put the MBR table in the first 512 bytes for compatibility reasons with Windows. - // Linux kernel ignores MBR table if contains partition which starts at sector 0. - // Skip it because we don't have the partition check for UDF(El Torito compatible). - // It would continue to do the whole disk check in the UDF routine. - // - DEBUG ((DEBUG_INFO, "PartitionValidMbr: MBR table has partition entry covering the ENTIRE disk. Don't treat it as a valid MBR.\n")); - - return FALSE; - } - if (Mbr->Partition[Index1].OSIndicator == 0x00 || SizeInLBA == 0) { continue; } -- 2.21.0.windows.1