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.web11.6835.1593768632148503036 for ; Fri, 03 Jul 2020 02:30:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=MGdxbrSS; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: krishnadasx.veliyathuparambil.prakashan@intel.com) IronPort-SDR: eBxqwpqsU7vuuyKP1tk35+a1UHlQF/yNrRGfwcCyAgnLt/gsO9V/omnf5CE5/mvC3hl8YO6DZZ lY+qKkdbYEsg== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="231986897" X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="231986897" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2020 02:30:31 -0700 IronPort-SDR: zZbpUZ16OtHTEh2k20m45OoWx3XVIl2kYo8RBIdBlB3e3o5J9X35dMOWTU21Ftxxy5koFGvsoW eouNMwCyN72g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,307,1589266800"; d="scan'208";a="278387239" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga003.jf.intel.com with ESMTP; 03 Jul 2020 02:30:31 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Jul 2020 02:30:30 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Jul 2020 02:30:30 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 3 Jul 2020 02:30:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aw+d1HEcTeG9PAQqyUGQesUONGIh5/UmeyD9FhEkyyZpAN/SV1MKWk1TCpVJN9xat95Xwz0o/uRmO1xsqKNzG+K2CZ1K161fIKgqUVRabclG49WUeASouKQo6bMlWLpYMIfsVGMvPTwy15J3X95f7l/samUNp4gLLtGxU7ERVMAKKZ+ubH8ginO78gveoiUzX/e8ZwzJq0PtPfho4FS5aic8Img0qX14rXKqS7v0//XkfjdZXzftPKA3LqCEGGfwi6YWLKhIsAg0X6az5GOGITsoJnLB/orUMQRQ8jJac37GJS+xR5NoUY95JQRy++NWcV8pQhmxPXwzHYaCVzadnQ== 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=9WFXMGnciz7XLa42VsRrzMgcfNz0zqDIOCr5KTxFmXw=; b=iotCER8aepcx9KUWnCuvqix6jGJEa0o3Pmkvb0CS/ejExF9tm9bX+eey6GF8aoLKzprU0pniX04QpwME3VQeIyHp4UYx5KrYXUABVtjwg55dLtpulZkAQ7Nd1kHLoXBNl1wGKHJOR4DAtzA+g7VWhsXNpKMt174HV9SChMuPapckIz8KM/9XqV/dby1zRyHPx/W+WFv4ToTDUXMkoKkyqsMig74/XQv9JsD+iqUYxfbvN/icHmbeQ4/JXdNaMrmymUdnzyqzvOZXjsetS/WcdH4kHRALI7pCC14ZVdKeBK0GX02tbArdkp5cr2zfUyGQXFLcP7JeLXUIOnCfGRGAXQ== 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=9WFXMGnciz7XLa42VsRrzMgcfNz0zqDIOCr5KTxFmXw=; b=MGdxbrSSNBAXoTco++dt5zEjfUn+fsDOkzE0kHNjqYbq8iimj/rTVbvNFq+sU0MK8DM84ZOGnVYyo7ndw1rH1h48irQ1DoPtyVNxtOX9stwjNMwPRqFbgKwb2uwiI4QXgbVIva59KR74F5PMYwczoViPGGgswjRFFVGX9dYlohA= Received: from MN2PR11MB4029.namprd11.prod.outlook.com (2603:10b6:208:155::15) by MN2PR11MB3710.namprd11.prod.outlook.com (2603:10b6:208:f2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Fri, 3 Jul 2020 09:30:26 +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.3153.027; Fri, 3 Jul 2020 09:30:26 +0000 From: "Veliyathuparambil Prakashan, KrishnadasX" 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. Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC. Thread-Index: AQHWRekgWfN1Q75kikq+mC/3TFgRUqj1cyoAgAA2vOA= Date: Fri, 3 Jul 2020 09:30:26 +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: [192.55.79.123] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3fc78160-bc29-45ad-7cf1-08d81f33b826 x-ms-traffictypediagnostic: MN2PR11MB3710: 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-forefront-prvs: 045315E1EE x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VsOkVQ3NPkPIu2ApP8+E8bcCfW8bDP/1PpaRG+hb92UVfg5rWNqnFeHMG3oMQ4UZgqaBKp1iX1CiNKKMt/nEFXdp4JxizKJPLJRBz5If3ijnYcFycIigvtSGpKOwcnzXH05EYk5AhJ/Z7fKF2KUOF++00qE2kbYZjGITtcqsumNEmquy0O4Dglp5LGfrgTMpY1Oxq+vtvjw2F83okKrri5N/ZpzfAGR7BtYw1n8pEd4X8W8VOECTMtRmTTig4dqAK3TxU46c5bk4hyiYgyUkDs0IkFVl9Tj5p0knmDbm0BfIa8T6DqNeMmkz+eT4FCFqcXIFgi5/y1VclGwHKtiQAnjtDqVki6b7r9Uk1MZfGOJi0dxi8GNmFUMEpFEaqWiSPe1ExqUgBARPbAgZzNIz0w== 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)(396003)(366004)(136003)(376002)(39860400002)(346002)(76116006)(966005)(66556008)(64756008)(66476007)(66946007)(316002)(83380400001)(110136005)(54906003)(2906002)(33656002)(66446008)(478600001)(86362001)(186003)(26005)(7696005)(8676002)(71200400001)(52536014)(8936002)(5660300002)(4326008)(9686003)(107886003)(53546011)(6506007)(55016002)(6636002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: sIXm2W80nWdVTtQOt/X3+cUlz3/yPKr21coqztPkZbnGYsrmeYwAFr59c/G8dWGpCFL+ckvXE85rOjorrH1PIzP2zxkuds9AjOKF4LCoQz4USLrbGJo1pA0XflS8R+j9m3b0iEyzW246a2W3WSJnOj7GYO2p+kp8lBesUuAkQ6/Sbuhr/+BPXW8xVDIFV2KHuhLo0GsUr7foL30ujzFRvELFT5/skrxD4DwlzOK8ST/c0V3zV+ctedw0QebBSxZBimDgdSz9p05Dui0Lq4Wgh85Jtf3AsNSClwnld5BPorbNOmILD+0m2/jF9uBVgv5RbztQIsUMoYWvwgxTi2koJYsscXPdb2POM9anANba4cnuxdKSLL71bT6+q56aOJ4UBraYW5mp8iByDtNRCgILqplvkiubgqYdfV8BgubnfepSbjDBqW4i5Pqb4H+WRecCDq3bS7Widv+/rWiO7iZ2/dKVmScLrzXDBdl6QgU5JI0= 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: 3fc78160-bc29-45ad-7cf1-08d81f33b826 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2020 09:30:26.4639 (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: zAglr7RoUvXbWMq8Wkjj03Ox0LPXEMRmVygn+DmjxxEyLCn23E30vO2KXe8mMIsUXnF66qRaV+XdhyupsHlJBQKr9EX6EeIk5CKjfbczQAHQh4YadrIvXrX6xDD4HEduUIY0lnapC4Jd1srS3QLpfbI65Xrr/HHOVCIgK+byCXY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3710 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 Thank you very much Liming and Zhichao for your time to discuss this case. Hello Liming,=20 As discussed, please help to raise the BZ to enhance PatchCheck.py and kind= ly 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. >=20 > Signed-off-by line is too long and exceeds 80 characters requirement. But= , it is > valid. >=20 > So, I suggest to enhance PatchCheck.py and skip the check for the lines w= ith > Signed-off-by, Ack-by:, Reviewed-by:, and Tested-By:. >=20 > 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 t= he 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 boo= t 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