From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.4845.1594958972432642761 for ; Thu, 16 Jul 2020 21:09:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=aPBrYJ3b; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: krishnadasx.veliyathuparambil.prakashan@intel.com) IronPort-SDR: esuAeb1fZWY0o7XvMC4iZhMkdLVuCctJCrk2866hwKZIZItFk4YU/HT7fK6i59REyGBhdapMUF hvwW18o9H28Q== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="129618539" X-IronPort-AV: E=Sophos;i="5.75,361,1589266800"; d="scan'208";a="129618539" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 21:09:31 -0700 IronPort-SDR: qLoBqlz742MsZnE5rgWj9pTU+h8baUmbCbs7jgjwdrFBVitp0i9weSUG4lHYnTkwNd818LeT9h fokaR4ciMPVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,361,1589266800"; d="scan'208";a="391286322" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 16 Jul 2020 21:09:31 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 21:09:30 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 21:09:30 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 21:09:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e0+j5G8l9rAo5h4tpy7Pw6xrTbTCAP3cNjtlN2tBYeiSWDV3VKD5zEPg044mZpwN3FJfJqybebGA5GR5y9G91t+8bHfMG0Ky0itHiIwjvfCObWbnZ3AZ8GZGUg7OBaDm8gHDntnZdCErCcAWp+q8NFjpqXkYffxt11iL2Znib7lmlVcmw1acEQ7xAxtdRj/TlhJHx1j27E9uoxPquafrVoTq9kxK3s4K4M3s6uLzMPNG4RJkiMf722gbp6FMEkZRk17bIjvo2KHK2NL/WfEa6ncuiHSzaPXpfoq9IBY3id9fiucje8MsgvY9Tj11Bm/h4PeFayLAFTjwLy9Yn9Lj5w== 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=YlIslLkJJWiGMZuz0sFzPuKHSYBop8OczahA6p67uZQ=; b=P958D/M2mURHwY5fBUaKzGc1RbBiyIGYKT3ccn6JOLgHMa4bTTp2QkvsaWDLtsktC+YYnoVN02yoALIihh1bZYFK/HGQSBMRYZvteAedDNFYg1wmRHzz2RWn9YIxRlg1Iy7S7o8yrCWi41tJLXStvpVvaGqC8ylLJdZEbrDbNU/3uhWXGKEyk31go46q8GcPI0zDlYigAm5FEZ5pza27M99DEHVNm+zIiOczaq+7XSq70I0jle+sZwESfUrbty2/+qoN+g/2iOZbsDII52uKClrEnXS3EPpL0cmK8UDPjSvNCmPGksTEOl3IWvSj2V43kzS3m1d+FVS4AzQ5bCi2nA== 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=YlIslLkJJWiGMZuz0sFzPuKHSYBop8OczahA6p67uZQ=; b=aPBrYJ3bAYzCWz/gigpF8Qx/W7j/BM0/sWePBJUSVtEsXeqZ3gni+iOd5toe/FHkhzS8eQ1LNJffUl5tLes9Fe9I5Lv/oflby80I3a9sCtBN/0Y43KD/NY8gtkKlw868Mv97a79XbpgQ3Y2m6scRNv0GCmjXFzocCQuk3wlxDKQ= Received: from MN2PR11MB4029.namprd11.prod.outlook.com (2603:10b6:208:155::15) by MN2PR11MB4159.namprd11.prod.outlook.com (2603:10b6:208:13a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Fri, 17 Jul 2020 04:09:28 +0000 Received: from MN2PR11MB4029.namprd11.prod.outlook.com ([fe80::281e:9009:15e8:6d7b]) by MN2PR11MB4029.namprd11.prod.outlook.com ([fe80::281e:9009:15e8:6d7b%3]) with mapi id 15.20.3174.025; Fri, 17 Jul 2020 04:09:28 +0000 From: "Veliyathuparambil Prakashan, KrishnadasX" 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. Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC. Thread-Index: AQHWRekgWfN1Q75kikq+mC/3TFgRUqj1cyoAgAA2vOCAFaeA0A== Date: Fri, 17 Jul 2020 04:09:28 +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-reaction: no-action dlp-product: dlpe-windows 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: [49.207.58.252] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3137babc-a0c7-4b0f-060e-08d82a073340 x-ms-traffictypediagnostic: MN2PR11MB4159: 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: QoPM39p2Ozszi3A46+jjM3WxLGt9yNr3Ox9maziJn4sa0JtgGU2Z2lh68+XI0kB6qLOPbBLSiMlM4yseOSnnzbNfJlxzkPpbKKeXr3Fzz0fZ84Okywuby4LrNixuCZpqr1AmVNkp+bnJfl+TYjzpZKzwfeDoV4+uSpXZfaaHoYR6KHP8zvSd2iw+Roa0mkUAsku+IbXDWxyOuyzvQRpBt41PXa8snHbEf9lJHFCeK6he/IvOYMcfPhXYsAo8/2dPByqDqo9KcqvIvpvVDzbVyjeK1A/1FY8OBOqWS1dJXU30ND3aDKUvu4vQCIAsvtZbkt9se0HyEndKhrPwD4JfILyZ0A4o+89SmlKzL65c1CYU2tQ4T1e3f4O+7kg8tHjQsRnHYpOXLayhZBohML9cOw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR11MB4029.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(39860400002)(346002)(366004)(136003)(396003)(52536014)(33656002)(8676002)(2906002)(478600001)(86362001)(6506007)(76116006)(53546011)(83380400001)(4326008)(107886003)(8936002)(7696005)(26005)(55236004)(186003)(316002)(55016002)(966005)(110136005)(6636002)(54906003)(66446008)(66556008)(9686003)(64756008)(5660300002)(66946007)(66476007)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: ACct7EZCE1+AqRB1vimBs5L9oZc058fjoLo2+pvYiticgg5xVfQKmhpJLj5uR60GPbuiXBqrMgoFfWBUj6IVZHL184OrNvoAp2R2MzggAXF/e4s2jwqlUvVLVWJi0ZEVI2LeCLvthQmsNrZ0gwA+B6gFDrOax+UAMZLajlsJjTAzEeI7ornj4NxXGg8pFmDQx5RgKed8bpzNs/G/RfAr40zvod8PYU0c9HvkHqnDUfnnAoUvMuNrHT+w8a7RK2lYCmpuD4QD5fS0m07z3zgAhlE1Od7OkBOazn9XoYScpb0b/Xn54orn3APZSOk8vZK38uBY9DRvQoafRuKOIDxTv0qXdPzGxNnS0V5OQLy5Q4CyKuWV+bMxMD9GhvX+VigcFAZ2bu2UwJyl3nHxeIuZkEqi6qic4foms1Wo9MZEc0OWX/ykjMppkBeznyR5KsgccmQ2wKHEPXSjrDxM+DeTJwxU7wbjos0Qg2MthccFNMA= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4029.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3137babc-a0c7-4b0f-060e-08d82a073340 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2020 04:09:28.3767 (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: /CVf2iMTTiHvDEQohRBXdEQvnGeiUdEjwKCKxP+49c+9n51EHHRtMld3ZAUymYOmSml9CZLq8v23AW6pRIMV9nDM9j8pFqa2HVBMpnBOk6yaXjMVj7VBPMLRs2Sr4yjehb3lreTAPWNTQ1fSfYVReeZZfkT2YB4xYks+KQ7ceX0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4159 Return-Path: krishnadasx.veliyathuparambil.prakashan@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Liming, Gentle Reminder. As discussed before, please let us know when we can expect our changes (bel= ow BZ) to get pushed in to Edk2Repo. Please help to give an ETA. BZ Details: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk= 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 failure, > Destroy RamDisk memory before RSC. >=20 > Thank you very much Liming and Zhichao for your time to discuss this cas= e. >=20 > Hello Liming, >=20 > As discussed, please help to raise the BZ to enhance PatchCheck.py and ki= ndly > help to submit our Edk2 patch to Edk2 Repo. > [EDK2 Change BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2818] >=20 > Also, please give us an update on next week regarding the ETA , as per ou= r > discussion. >=20 > Thanks, > Krishnadas >=20 > > -----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 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->ExitDataSize= , > > > &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 b= oot 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