From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.9544.1595292378955402625 for ; Mon, 20 Jul 2020 17:46:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=pOm8rIgY; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) IronPort-SDR: rfFxtCKpVhwzdDwkgHgm3yKsVa4hNK5dFEQY4ke8pFZyyUeV9tr9ecwoMATvHf7SzCRicFz9Zw fwshX2OtBA2g== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="234886863" X-IronPort-AV: E=Sophos;i="5.75,375,1589266800"; d="scan'208";a="234886863" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2020 17:46:17 -0700 IronPort-SDR: xFDhHAclzVYWgbvkqFY2FmUHCAUxJAzjx3KAteoBZR6wu0kT2DLLlJjAXA1QXpou4V+bqLTro7 1HLTAOJrRyXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,375,1589266800"; d="scan'208";a="310042056" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga004.fm.intel.com with ESMTP; 20 Jul 2020 17:46:17 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 20 Jul 2020 17:46:17 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 20 Jul 2020 17:46:17 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 20 Jul 2020 17:46:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oRgR1PQVfMgm/sQ2dFxj1ELtxb22wgvT6RA7EkGJDGZSmTtYvJe5iwAovsenZXn76/NbBSHeMxRWpwxfo5/e/p3/tUXgMN7xSX/Fj0AEqnZqc8mTchIAjeWSO8xfkA+64Uj6TXkAPEGoZXToyfEIWG/GbQ8OAEuOgHl/14Ttek2RzkD51WSmGhsV6UnY7X+6vRMcn6dr4lsgrataCIsgIekDra7/bMAaKg6+ZPVzXZ2xvVoDgYJ6jpaud+M5bWZ33ykOrMFXk6HqFfsseHCgtGI0V+ZIfvi9KtEbEkhTpy+uGGeQrq1RD3u/yGAFs352I8JrYBdqRCQeiyaPs1u/wA== 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=LaPOj7YlTIA2lzOqmTl+JAbf3J7eb6omtmsjPkib/go=; b=muR4mIhjxM6hc+QHzYIeGScMk2sjdNYjKU1t03J1BJI049bpKc6ClAXowH8UYVOtWgBgj14USXj2aGG4h7Wls3nOxhJp2B/0m45luRSYH5gDP0NyNVmmYd27Jz7Wim7z3xE8sCkfEZBvOYc/4ZmxdMp72cIJuqppXTPbZTliX2wigpNvvZI/wy4Ex5mycadIWLvNvE8bRIrpQqTXXcq9LzZADwH1N6I76TZ79HJa9O514BL9VjW8W8lTDABozEG/VSQDE4TOsUxG9mDgp9/U+xi1ajGHsqc+l+qEmgw2qRvSCh2OVmZsVvO55joumHnw+56ax0eYV0OAc27ezDAcPQ== 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=LaPOj7YlTIA2lzOqmTl+JAbf3J7eb6omtmsjPkib/go=; b=pOm8rIgYOGBmxGmOfnv0hXoJsjX3RitFN+fwQ3FK0NM9CHtJAUQ2Xd17bgIkHA299bl+tVPhMWIkqeLrWDBTNDz0cs7+fsVU5tFI+lWkvDs/yMNknldEjomVPPlVBXt4pqCUJjV6de04mgQUrfSwcfDbl9HiTCfDFJisNpT2qkc= Received: from MWHPR11MB1630.namprd11.prod.outlook.com (2603:10b6:301:e::7) by MWHPR11MB1262.namprd11.prod.outlook.com (2603:10b6:300:29::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Tue, 21 Jul 2020 00:46:12 +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.3195.025; Tue, 21 Jul 2020 00:46:12 +0000 From: "Liming Gao" To: "devel@edk2.groups.io" , "Gao, Liming" , "Veliyathuparambil Prakashan, KrishnadasX" , "Gao, Zhichao" CC: "Ni, Ray" , "T V, Krishnamoorthy" , "Kinney, Michael D" , "Gao, Liming" 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: AQHWRjnhoCuDDgmVsEGyqbfoSuExFKj1cORwgAA70gCAFab3AIAAt1VQgAREpSA= Date: Tue, 21 Jul 2020 00:46:12 +0000 Message-ID: References: <162292995B2D9EDC.3435@groups.io> In-Reply-To: <162292995B2D9EDC.3435@groups.io> 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: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dccdf353-467a-420f-b378-08d82d0f7797 x-ms-traffictypediagnostic: MWHPR11MB1262: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1Q76gRIzJf/z0uQLLyryE0T66py/h3WBt2Lya9i1W+SL1Mwx/CFE59CDHtKaN4n6AwXDSayftXNeI9YN2kkEYeO3b8AE7KVdNadbCih7wYwB8rbTM5i12u4t9sY7Q4UEdBoQndo/vyk61aqPX8eT/pb5JGyOCHDnw2g6e7QG1nulS1Y/h/LCQyPNNKt5frWOckBv7PJdZ1UCcYfg+1hSonjKxnEEIYHzpouCJCWpPmrqr0tY6jJ2g4FDoPIvdTmYg8MtXieiopSfBZSoh4mxh4FIFRd7EaHw+ICJaGtePXIvQT3r55vwrYPusoXhzLBBiWWDm8IPwAjze5LvdgeRq7//1qr4SOgRkRkDB/DIb/V99r+c3WpreJxzfUhaLn07/p164L4sT448LNCa7AnQkA== 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)(39860400002)(366004)(396003)(346002)(376002)(136003)(86362001)(55016002)(7696005)(53546011)(71200400001)(9686003)(110136005)(8936002)(316002)(66946007)(54906003)(66556008)(64756008)(66446008)(66476007)(76116006)(8676002)(6506007)(107886003)(186003)(966005)(26005)(33656002)(2906002)(52536014)(5660300002)(478600001)(6636002)(83380400001)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: vEcIalK91kp5IjhiAFbMNLbMCaQMKc42jOeRB8CQ5KkOMuKsyjykHUDspkZ7Pf3YMLwMulOn1qrJr/KheGXheJpA6LHJe9NlIu4594ov9Q4BmdBooHiuMwJGe3SSG1xw4lwGoLd5tXSgnLq7Utn3mLX2KLP7jIxoH2unUgv7dH1ZLiS0TueLKJ+BOjGPPnkjcS2kFiqLZU7mwfiJv3p+TZutuV6+5srTLzjrj8S55WhESmC7INB1p+3OftAp/ntA7IjM3iLr0D5UTK9Dnm2LIClPaV931ifYjECuLeXDokmCYrWNutImbXh3hDzbS3/04Z2oTPjtMc4obZ8zt/ouEWSdbJBZfqa7O68Bv8Xkc4elAroPSxlihWT1XUTYM5D1QRUfrRcfm8P8Iz83rr4+Eko9kaRklykV68AnqpfgqJaZDrNw0X8dP9YiWq8qpAJh8sCIQOIU2ZC6xVNI83l4f1OMQopeAbdLUZjcBoiHi+aCfwfUl++F178qcy/U88QT 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: dccdf353-467a-420f-b378-08d82d0f7797 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2020 00:46:12.6065 (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: 2v9awyTaQQ/sSYwiat8WQ/8UP/fooGaHBJKWgb6/ZZ+3pjTwWAI+HDpmuGal66QlJosuovbSPEIjIxpGF9OAaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1262 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 This patch has been merged @ cb38ace647231076acfc0c5bdd21d3aff43e4f83. Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Liming Ga= o > Sent: Friday, July 17, 2020 11:07 PM > 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. >=20 > Krishnadas: > The patch for BZ 2836 has passed reviewed. It will be merged early nex= t week. Then, your patch will also be merged next week. >=20 > 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 failur= e, Destroy RamDisk memory before RSC. > > > > Hello Liming, > > > > Gentle Reminder. > > As discussed before, please let us know when we can expect our changes= (below BZ) to get pushed in to Edk2Repo. > > Please help to give an ETA. > > > > BZ Details: > > [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy Ra= mDisk memory before RSC > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2818 > > > > Dependency : https://bugzilla.tianocore.org/show_bug.cgi?id=3D2836 > > > > Thanks, > > Krishnadas > > > > >-----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 fail= ure, > > > Destroy RamDisk memory before RSC. > > > > > > Thank you very much Liming and Zhichao for your time to discuss thi= s case. > > > > > > Hello Liming, > > > > > > As discussed, please help to raise the BZ to enhance PatchCheck.py a= nd kindly > > > help to submit our Edk2 patch to Edk2 Repo. > > > [EDK2 Change BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D28= 18] > > > > > > Also, please give us an update on next week regarding the ETA , as p= er 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.c= om; > > > > 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 requireme= nt. > > > > 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 fail= ure, > > > > 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 cust= om > > > > > boot option or application for recovering the failed hard drive. > > > > > > > > > > This change will help to ensure that the allocated pool of memor= y > > > > > 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= that 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->ExitDat= aSize, > > > > > &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 t= hat 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 t= hat > > > > > + 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 >=20 >=20 >=20