From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.2735.1594175250936997826 for ; Tue, 07 Jul 2020 19:27:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: zhichao.gao@intel.com) IronPort-SDR: zGmguGDsd+F85VTiLC8h4uoaqB58JgWP9B2oxbXY90JBE9R9xENq0hgI0ZpkUB5zEtQ7EwTYUc IIThL+h3yPgg== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="127325754" X-IronPort-AV: E=Sophos;i="5.75,326,1589266800"; d="scan'208";a="127325754" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2020 19:27:31 -0700 IronPort-SDR: HIVJ+i4RMyAhxXhH49pda/5gMbmb/Zu4uZB6UP4avrJXqFJZpKeQu9DDwDcNiz1M4kBUL26lVE zynkQPj3bKkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,326,1589266800"; d="scan'208";a="483722337" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by fmsmga005.fm.intel.com with ESMTP; 07 Jul 2020 19:27:29 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni , Laszlo Ersek Subject: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Fix the partition check issue Date: Wed, 8 Jul 2020 10:27:19 +0800 Message-Id: <20200708022722.27024-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 V1: Separate the UDF from the partition rountine array and do the check for every media. V2: Drop V1 because it is a bug: there should not be two partition types in one media. 1. Correct the LastBlock value in MBR handler. It should be the number of sectors (512 bytes). 2. Skip the MBR check if the MBR is added for the Windows comaptiblity. We treat such media as ElTorito and do the check. 3. Fix the partition check bug: One partition type returns already started should be treated as success to avoid multi partition type be installed into same media. Cc: Hao A Wu Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Zhichao Gao Zhichao Gao (3): MdeModulePkg/PartitionDxe: Correct the MBR last block value MdeModulePkg/PartitionDxe: Skip the MBR that add for CD-ROM MdeModulePkg/PartitionDxe: Add already start check for child hanldes .../Universal/Disk/PartitionDxe/Mbr.c | 42 +++++++++++++++---- .../Universal/Disk/PartitionDxe/Partition.c | 9 ++++ 2 files changed, 44 insertions(+), 7 deletions(-) -- 2.21.0.windows.1