From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [62.140.7.102]) by mx.groups.io with SMTP id smtpd.web12.9342.1597213628310998744 for ; Tue, 11 Aug 2020 23:27:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=eL5Jk7CL; spf=pass (domain: suse.com, ip: 62.140.7.102, mailfrom: glin@suse.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1597213625; 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: in-reply-to:in-reply-to:references:references; bh=WeKM1tIgbAQAmzDRrorEof0Jq1q7rKXAJeXJAP5vRSg=; b=eL5Jk7CLeX4gNBfWGIPeGVuAoIQdllTfKtIpYslhzN9/XQJPOLNalvn8MlTk7PTcY7e4/d q71Wv02Ks52gBxHLkQ1A7DL3KVvxjTcW0IWqjROZJ8lWy+kMEdsD17WMrcemSy5kjNkBz9 pIUzoUplzBXxbU3aYh+EascgUT0kHv4= Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01lp2055.outbound.protection.outlook.com [104.47.1.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-8-A9FHc1T_NduIrOWcJZ0rmQ-1; Wed, 12 Aug 2020 08:27:04 +0200 X-MC-Unique: A9FHc1T_NduIrOWcJZ0rmQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nzMBU3hjQedl+gWocC6xOeJTbv3rlFCX+kEnqT6Dy6Qp32RLgyMuMRGoxlL76gE/AtYe2QwFz6xUkOVpakMAS5OKZKgcPKXfLn6EmRSRT6kUNRayixL+vs25BgNya0ORhiVma8pzayxo3GbW6uak3Unsoq9IxgXTOvg/p1xgolJeY6jQjv/ym47lre3QiG4PksQetdFswBHiNpCbnuax8ZGZjIQPuBmE0Dxp7YDatajED3p6Bst7Z0H/7efHfKG/KPLeiDz03XGLqLEcO0Dsn5bNFav/wJVa0b6ONWKxrs1knFtELYsXT2p9L8oF2byQgbx65YX7Kb08eHQsSc6D3w== 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=WeKM1tIgbAQAmzDRrorEof0Jq1q7rKXAJeXJAP5vRSg=; b=BnIAB5+TCFwYy9AUtRqMlxizbTUT2b8EpQMpHZgWkV/8Ts4RdQEWWGKFuJv8B4asGjL+u+ZPXDUSeqWy5Y2DDhtrf07UJ4rOWfJeU2dsecRMKiyH5hTkWFgkZBFyzZ6+zOl4PKpcZpfNmtwMcDYd1edQ3UQzS8nqzBF7cDT3h05D76prVgKgEk1ueMxjiKiAcejieCi+Rc/qbz8CeS5cBuDpBNppY1Ejd1M1gIgCOSCganIuc6LxsYiCC2zeh/Eq7ylH2rO41+QcBTp0Cfz0pHOYXiBuuXSSQi4BoEhKPeABI0SA7mfWprK6ymtXTY8FvZbXvxUFixAdjWoUwNQ5Wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5470.eurprd04.prod.outlook.com (2603:10a6:803:d6::33) by VI1PR04MB4352.eurprd04.prod.outlook.com (2603:10a6:803:4a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Wed, 12 Aug 2020 06:27:02 +0000 Received: from VI1PR04MB5470.eurprd04.prod.outlook.com ([fe80::11d9:55c7:ac25:bf5c]) by VI1PR04MB5470.eurprd04.prod.outlook.com ([fe80::11d9:55c7:ac25:bf5c%7]) with mapi id 15.20.3261.025; Wed, 12 Aug 2020 06:27:02 +0000 Date: Wed, 12 Aug 2020 14:26:52 +0800 From: "Gary Lin" To: Zhichao Gao Cc: devel@edk2.groups.io, Jian J Wang , Hao A Wu , Ray Ni , Andrew Fish Subject: Re: [PATCH V2 0/3] MdeModulePkg/PartitionDxe: Make the parition driver match the spec Message-ID: <20200812062652.GL21538@GaryWorkstation> References: <20200812012124.18220-1-zhichao.gao@intel.com> In-Reply-To: <20200812012124.18220-1-zhichao.gao@intel.com> X-ClientProxiedBy: AM0PR10CA0037.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::17) To VI1PR04MB5470.eurprd04.prod.outlook.com (2603:10a6:803:d6::33) Return-Path: glin@suse.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from GaryWorkstation (60.251.47.115) by AM0PR10CA0037.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:150::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Wed, 12 Aug 2020 06:27:00 +0000 X-Originating-IP: [60.251.47.115] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bec67792-cbfb-4c0b-e55e-08d83e88b99c X-MS-TrafficTypeDiagnostic: VI1PR04MB4352: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1265; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5470.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(39850400004)(366004)(376002)(346002)(396003)(136003)(33716001)(6496006)(55016002)(6916009)(1076003)(83380400001)(33656002)(5660300002)(26005)(86362001)(186003)(956004)(6666004)(16526019)(52116002)(2906002)(8936002)(4326008)(478600001)(316002)(66476007)(66946007)(66556008)(55236004)(8676002)(966005)(54906003)(9686003);DIR:OUT;SFP:1101; X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: bec67792-cbfb-4c0b-e55e-08d83e88b99c X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5470.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2020 06:27:02.5885 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dWx/EK0s01FGgZXrI5PRk25tYFoA32cSHN/BYq8drd6bL8a59WVkJRSe5ZQ28OmJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4352 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > > 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 >