From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.13285.1594998405081623655 for ; Fri, 17 Jul 2020 08:06:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ts5uII17; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: liming.gao@intel.com) IronPort-SDR: KNg8cX3qX5UvRMrqzIjsnt/41lF1tXCqu+9n4SFt9UFsd8CNjtsg7Upjj27C71IV74XNyKL/Lt Q1PskFeNApqQ== X-IronPort-AV: E=McAfee;i="6000,8403,9685"; a="147114065" X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="147114065" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2020 08:06:43 -0700 IronPort-SDR: ozBunOsUG0P5dLWQi6NlQWJeoYDEd4/rifWJLLQriMDtsJMjGwzCQBo3VRhLjhCxbcENsEjGyq iadvGTE2Lw9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="282806473" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga003.jf.intel.com with ESMTP; 17 Jul 2020 08:06:43 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Jul 2020 08:06:43 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 17 Jul 2020 08:06:42 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 17 Jul 2020 08:06:42 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Jul 2020 08:06:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dokcm4jexoTLKseMX7LlQ3BP+irhciarNCJVfHlQp4ek6M+feIKK8Z0CjZFczAC7sz1U7B4dumAYZL9C/gkMmQwd+G9eM21J4tj77Oi8PNkQ1K6bfMRJJpbmSNLHaj0/RiIYex6CmewJotoK66OlRBpKI34Ap8T1eQAoXNSaf6NKBonqs9T+t/FkQO3gdEForJ5JQdFFfjjrmKzlSKmm3mLJun5ZK7PYu9Wk4A0FSvSJoNeNtH3PLF6FBR9GX90gD5+hB/FpQpBorwjld2/fl2V3LcBRqbHbj7TbfqWtTlERs4yyaxC9Xfm9QUtOcudHoGwLkMwkVJ3FL7KRzWC3lA== 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=xIsiOzGQ4HfZNqjU6QO9TLNqyD3KcGF/Rvb2HVyhheg=; b=FIHgFfPm7yMverhvPbnDi6rSj5ThkTrJx/KaI5iQRoj2hOe8k3xtw/l7Rjrzc/Lz8GjizMNfeMWmMw27a3YeE1z4Nn3lsNDcdvrVQqY/3ufPb8fOySTJRWjrc70+eM9bpTbdpCUE44CJhe2hXhKMaocZuHldc1AtkgxNGookq+lF8Uhb0b4v+RX8XyZAPXJ64fndaCTunfpnvEi00g3mXdIqfHa4jJY4YFQ3SFjfIxyGVTh98jfw+g+uGoi/b+OGCmZadLxt02ICadZKlxtf+DggEDGWqFqaqqYaTNLQ4EGfv4O1f7IJCFGaYYPKUf5t3I8eP8+N8HVN1dcLg+lGwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xIsiOzGQ4HfZNqjU6QO9TLNqyD3KcGF/Rvb2HVyhheg=; b=ts5uII17WbLxDdZC5Dj2nPRk6Rq+FMOsI+G5TRLjsXju859LUtqomHB50+N963yT/Rc3iMf8Z2nyS4NG5K7uYV3Exra0/soNQpMwwWTtvujKw7M6TgiGnAvol8TZw19IpuQjWrxeguHiTp2WGKMy+bkp+N+q9HmA9P8Z2ENWeAg= Received: from MWHPR11MB1630.namprd11.prod.outlook.com (2603:10b6:301:e::7) by MWHPR11MB1903.namprd11.prod.outlook.com (2603:10b6:300:10e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22; Fri, 17 Jul 2020 15:06:36 +0000 Received: from MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e]) by MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e%6]) with mapi id 15.20.3174.025; Fri, 17 Jul 2020 15:06:36 +0000 From: "Liming Gao" To: "Veliyathuparambil Prakashan, KrishnadasX" , "Gao, Zhichao" CC: "Ni, Ray" , "T V, Krishnamoorthy" , "devel@edk2.groups.io" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC. Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC. Thread-Index: AQHWRjnhoCuDDgmVsEGyqbfoSuExFKj1cORwgAA70gCAFab3AIAAt1VQ Date: Fri, 17 Jul 2020 15:06:36 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.216] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 044dbd51-2007-4242-58eb-08d82a630026 x-ms-traffictypediagnostic: MWHPR11MB1903: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2dd54dA2ewtwEFyQNDDIy/XMvObs9Sxfc1TTrmcc14TjqjoZeJu3jWc4wSHR3RLUVoqLWUtTRlSEQRZWXWdvxjDrwaEZK+GBidP/3ZssBVlxiNls7ZeIsWi58s0u8wARx+o4RpyoKwLnfduYPByBur4Y3pqHsKjKKDgXnh5oUqAelV+A4H0ZMsBBZ8vVzXNut9Onq6g6pOVF5n+wEUiiGux2kf5oB13wO2pgqW6qkHw4686ChRVm/YZxVGlgoVIFQ71A2gWQUkeo8vduhYT883XtwxPOYTmpbtCWWcGmZq0pT5+NyU7kTlbkZe0czf+GuHKbHmrbEtEwnz3l+yru+71bLC2a9q28JIj9nz+q0Vx567ZG42710/bQ/VsAxuomIvN8qCqRk1yi9tW+e3QEaQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1630.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(39860400002)(366004)(396003)(136003)(53546011)(6506007)(8936002)(4326008)(186003)(26005)(8676002)(54906003)(107886003)(83380400001)(966005)(478600001)(9686003)(7696005)(110136005)(55016002)(86362001)(6636002)(316002)(5660300002)(52536014)(71200400001)(66556008)(66476007)(2906002)(33656002)(64756008)(76116006)(66446008)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: KBUKNLSMpuVm33okCpWOQtif2PrMHPGZ20oOahVBpwMnCMdjgQ6/59npMi0eSIfnuNsJCtPSB8neqqAjNfrsP6P2YhUyXsve0Ls25w7YrPISCsj0GCN6IrVZJOVWle3GKrFuXAuEJwSW7PLP3nzmXx8+blsr78vQPhyN4PhcL3KQEqhbnWX16CsGFW76DqrG333aRhCmZ1hVWefucyV3KCEIY+w7/lE8UxYykCQdna4by2OG4cHF+4C7hCVVnlNHZ4qhIFyVqugjOsymgqYGpvj2GLf2LILfDtFL1dWoCUEwtcVFz8osq31PziJdy+z/+CnqbPJAeOv7gHShNzq7H+4JyQb8v6fwP6l4j/hhYDcQvJm7k3EHhlYYPrxWl6mYAXm5f1lmVHhF3gfC92CN6nNRHEruDtMSiFUFB2X0SQP55Fwm8DU9I8eFYyvk0r8mT0yadYnVxV5e2UMdAXvwDJmw1nhuLe6SXXzqH4wvyMYhm8Wb+mM3YF3zSJNrHP53 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1630.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 044dbd51-2007-4242-58eb-08d82a630026 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2020 15:06:36.3748 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uLuerTz82GljFQ4LF8kVEx6/ED/qzQ0Yv6DsNrc5H1mF6IV99m6Th8W56S0kQFoShUL0cPTeaJoy7DswPBd5+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1903 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Krishnadas: The patch for BZ 2836 has passed reviewed. It will be merged early next w= eek. Then, your patch will also be merged next week. Thanks Liming > -----Original Message----- > From: Veliyathuparambil Prakashan, KrishnadasX > Sent: Friday, July 17, 2020 12:09 PM > To: Gao, Liming ; Gao, Zhichao > Cc: Ni, Ray ; T V, Krishnamoorthy ; devel@edk2.groups.io; Kinney, Michael D > > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, = Destroy RamDisk memory before RSC. >=20 > Hello Liming, >=20 > Gentle Reminder. > As discussed before, please let us know when we can expect our changes (b= elow BZ) to get pushed in to Edk2Repo. > Please help to give an ETA. >=20 > BZ Details: > [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDi= sk memory before RSC > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2818 >=20 > Dependency : https://bugzilla.tianocore.org/show_bug.cgi?id=3D2836 >=20 > Thanks, > Krishnadas >=20 > >-----Original Message----- > > From: Veliyathuparambil Prakashan, KrishnadasX > > Sent: Friday, July 3, 2020 3:00 PM > > To: Gao, Liming ; Gao, Zhichao > > > > Cc: Ni, Ray ; T V, Krishnamoorthy > > ; devel@edk2.groups.io; leif@nuviainc.com= ; > > Laszlo Ersek ; afish@apple.com; Kinney, Michael D > > > > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure= , > > Destroy RamDisk memory before RSC. > > > > Thank you very much Liming and Zhichao for your time to discuss this c= ase. > > > > Hello Liming, > > > > As discussed, please help to raise the BZ to enhance PatchCheck.py and = kindly > > help to submit our Edk2 patch to Edk2 Repo. > > [EDK2 Change BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2818] > > > > Also, please give us an update on next week regarding the ETA , as per = our > > discussion. > > > > Thanks, > > Krishnadas > > > > > -----Original Message----- > > > From: Gao, Liming > > > Sent: Friday, July 3, 2020 11:32 AM > > > To: devel@edk2.groups.io; Veliyathuparambil Prakashan, KrishnadasX > > > ; > > > leif@nuviainc.com; Laszlo Ersek ; afish@apple.com; > > > Kinney, Michael D > > > Cc: Gao, Zhichao ; Ni, Ray > > > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption > > > failure, Destroy RamDisk memory before RSC. > > > > > > Signed-off-by line is too long and exceeds 80 characters requirement. > > > But, it is valid. > > > > > > So, I suggest to enhance PatchCheck.py and skip the check for the > > > lines with Signed-off-by, Ack-by:, Reviewed-by:, and Tested-By:. > > > > > > Thanks > > > Liming > > > > -----Original Message----- > > > > From: devel@edk2.groups.io On Behalf Of > > > > KrishnadasX Veliyathuparambil Prakashan > > > > Sent: Friday, June 19, 2020 10:40 AM > > > > To: devel@edk2.groups.io > > > > Cc: Gao, Zhichao ; Ni, Ray > > > > Subject: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure= , > > > Destroy RamDisk memory before RSC. > > > > > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2818 > > > > > > > > For better memory management, re-ordered the DestroyRamDisk and > > > > ReportStatusCode calls inside the EfiBootManagerBoot() function. > > > > > > > > This will help to clean the unused memory before reporting the > > > > failure status, so that OEMs can use RSC Listener to launch custom > > > > boot option or application for recovering the failed hard drive. > > > > > > > > This change will help to ensure that the allocated pool of memory > > > > for the failed boot option is freed before executing OEM's RSC > > > > listener callback to handle every boot option failure. > > > > > > > > Signed-off-by: KrishnadasX Veliyathuparambil Prakashan > > > > > > > > Cc: "Gao, Zhichao" > > > > Cc: "Ni, Ray" > > > > --- > > > > .../Library/UefiBootManagerLib/BmBoot.c | 28 ++++++++++-----= ---- > > > > 1 file changed, 15 insertions(+), 13 deletions(-) > > > > > > > > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > > > > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > > > > index 540d169ec1..aff620ad52 100644 > > > > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > > > > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > > > > @@ -2,7 +2,7 @@ > > > > Library functions which relates with booting. > > > > > > > > > > > > > > > > Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. > > > > > > > > -Copyright (c) 2011 - 2019, Intel Corporation. All rights > > > > reserved.
> > > > > > > > +Copyright (c) 2011 - 2020, Intel Corporation. All rights > > > > +reserved.
> > > > > > > > (C) Copyright 2015-2016 Hewlett Packard Enterprise Development > > > > LP
> > > > > > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > > > > > > > > > > > > @@ -1903,17 +1903,17 @@ EfiBootManagerBoot ( > > > > gBS->UnloadImage (ImageHandle); > > > > > > > > } > > > > > > > > // > > > > > > > > - // Report Status Code with the failure status to indicate th= at the failure > > to > > > load boot option > > > > > > > > - // > > > > > > > > - BmReportLoadFailure > > > (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, Status); > > > > > > > > - BootOption->Status =3D Status; > > > > > > > > - // > > > > > > > > // Destroy the RAM disk > > > > > > > > // > > > > > > > > if (RamDiskDevicePath !=3D NULL) { > > > > > > > > BmDestroyRamDisk (RamDiskDevicePath); > > > > > > > > FreePool (RamDiskDevicePath); > > > > > > > > } > > > > > > > > + // > > > > > > > > + // Report Status Code with the failure status to indicate > > > > + that the failure to load boot option > > > > > > > > + // > > > > > > > > + BmReportLoadFailure > > > (EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR, > > > > + Status); > > > > > > > > + BootOption->Status =3D Status; > > > > > > > > return; > > > > > > > > } > > > > > > > > } > > > > > > > > @@ -1982,13 +1982,6 @@ EfiBootManagerBoot ( > > > > Status =3D gBS->StartImage (ImageHandle, &BootOption->ExitDataSi= ze, > > > > &BootOption->ExitData); > > > > > > > > DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Image Return Status =3D %r\n", > > > > Status)); > > > > > > > > BootOption->Status =3D Status; > > > > > > > > - if (EFI_ERROR (Status)) { > > > > > > > > - // > > > > > > > > - // Report Status Code with the failure status to indicate that= boot failure > > > > > > > > - // > > > > > > > > - BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED, > > > Status); > > > > > > > > - } > > > > > > > > - PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) > > > > OptionNumber); > > > > > > > > > > > > > > > > // > > > > > > > > // Destroy the RAM disk > > > > > > > > @@ -1998,6 +1991,15 @@ EfiBootManagerBoot ( > > > > FreePool (RamDiskDevicePath); > > > > > > > > } > > > > > > > > > > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > > + // > > > > > > > > + // Report Status Code with the failure status to indicate that > > > > + boot failure > > > > > > > > + // > > > > > > > > + BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED, > > > > + Status); > > > > > > > > + } > > > > > > > > + PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) > > > > + OptionNumber); > > > > > > > > + > > > > > > > > + > > > > > > > > // > > > > > > > > // Clear the Watchdog Timer after the image returns > > > > > > > > // > > > > > > > > -- > > > > 2.27.0.windows.1 > > > > > > > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D > > > > Groups.io Links: You receive all messages sent to this group. > > > > > > > > View/Reply Online (#61517): > > > > https://edk2.groups.io/g/devel/message/61517 > > > > Mute This Topic: https://groups.io/mt/74978785/1759384 > > > > Group Owner: devel+owner@edk2.groups.io > > > > Unsubscribe: https://edk2.groups.io/g/devel/unsub > > > > [liming.gao@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D