From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.5313.1594961670937095958 for ; Thu, 16 Jul 2020 21:54:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Lrhs5jGJ; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: zhichao.gao@intel.com) IronPort-SDR: NmLUobE6V5Km51dyzAZ8Qi2/KXSdEDTNC3QHD2uQh1idRlW2qZYhYhzGT6oWh5AFBp1iSExX4y T/SMRUS1OwoA== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="214259485" X-IronPort-AV: E=Sophos;i="5.75,361,1589266800"; d="scan'208";a="214259485" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2020 21:54:28 -0700 IronPort-SDR: begdl0lTB2mJA3xCvI0X8KZ8cPvMvNNJRWucWt2k3LX/43Ti/m6m/8j61yoLU8RExsGlurMKDY y6hFtcvM/9Yw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,361,1589266800"; d="scan'208";a="486351629" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga006.fm.intel.com with ESMTP; 16 Jul 2020 21:54:27 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 16 Jul 2020 21:54:27 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 16 Jul 2020 21:54:27 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jul 2020 21:54:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LWAOykTBK03+mGk+ljhzdhD8Ac+DPpnPTwU7kzuiIo0yYMZsRrVb/xNKHDGrl3UI/5usgZguxYIusg4pNnddWQruBUSHwOAaD0WFxlBXVs6ZEK6UHcSAYWaEruwWVjCOgBNlgA9It81lA6fyYEUVT6s1FjKiecOXG8CaBn6kI/wW4W/GvcVRGFzJn18Ci1okiWqx9aD1Qt869QVXozmTUt70wUQyRz8uVwHyny5EJDJw7hRSxy/acukdWNe/VB1nyIvWqFGd9gX2LCZHnxktUUX8Bgx5rI8tPXCNehT+rw6566WWqvAFUnqYbUJg+yg0yw9MERdNki3qSNG53WIUSQ== 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=1jP2yG+gmDO/aLfCpHNRgGNuK09cvdvkfuqsOUwcTVM=; b=C0HjWbIJHlcx6RB4zUjYZOcTSVJINeOiX3PZeHKrMCeXhipr3yG1loBXOPS+aA3hAGpFm9WjWLjNgHLhmuVn2TEhayxz8K1TnGyKu0VYudtSGaf4pLf6gQqURbecl2Ht1/YnbH5GLfJ5/aIzp44V1JWtkOD0HAHJ2FILLCNSwkbiw8GmBrN0qZ1Y5p5N8gVM2qJeygeXHB4wNr6Px/XR1G2D7e54W6I+Y+ihJjrVyGvGhH2Cp7/BNx7bEhZJoUCFeZSvkNKHR5O1tHVZjAKb6VJ3pip8erYwtjGtoA/jyYORECnknLN+JPXLuI5Rl0jEqQ+fZTusreQNoiSw9YYTig== 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=1jP2yG+gmDO/aLfCpHNRgGNuK09cvdvkfuqsOUwcTVM=; b=Lrhs5jGJp4juav/FbPDfHSBtb2k+tWgPufgzJgfkrrIO21TPnIhENGeKnnRbG96ZNNgJrT4L9fcz3Fd2ehPkoeTcnVMDd75b0j4EIMrILpuXY1LTWSqMjWrbpKzm6gC5MnuzPZAQBuAuN420vTII41sZ4b/Tn1AiKTPnC45LIIk= Received: from DM6PR11MB4425.namprd11.prod.outlook.com (2603:10b6:5:1d9::31) by DM6PR11MB3881.namprd11.prod.outlook.com (2603:10b6:5:199::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18; Fri, 17 Jul 2020 04:54:16 +0000 Received: from DM6PR11MB4425.namprd11.prod.outlook.com ([fe80::ad34:e1fc:2e7b:d124]) by DM6PR11MB4425.namprd11.prod.outlook.com ([fe80::ad34:e1fc:2e7b:d124%3]) with mapi id 15.20.3195.022; Fri, 17 Jul 2020 04:54:16 +0000 From: "Gao, Zhichao" To: "Veliyathuparambil Prakashan, KrishnadasX" , "Gao, Liming" 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: AQHWReM3EzlrVW6BB0ihTiqkc4BOP6j1czYAgAA6LgCAFab2AIAADECw Date: Fri, 17 Jul 2020 04:54:15 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 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.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 918e2af4-629a-42b3-3bc5-08d82a0d751c x-ms-traffictypediagnostic: DM6PR11MB3881: 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: jkPldVUVloVa/pCVLQMQTkaBNfeyM1Z7lE8DgxExnGEjzHJsR1UMKTF928pc+lm9Hmm7dFR2c4bfOzu2aAJS+WL9WoB8gtfdVbyqPlPPpeXcLnFJbJwC1PBHXNc7sBAyKNlVj1Akbu/OtFfn+ME1Iaj8b146KtXP8QrIf6T10w/79+NICSpbtAY/ucvx4sDoZc42TgDbxVlq92e3TlmAfg3rFJrKvMdBX9h1Iw/9OvzpQ0qiyONEagldkVHye5mOJiJCVuSfeJhKZYoQ5MoTGYpCqYPI5VUak6SsSH/Gbrba3anXYOck5fYgevr54BgBYjWo57qWBPKFNTRp/Z1yYWy/+7bRxD6QjZisr5aTPGOpNS+RbRoOeZ8Ao3vpx4AxMQzsLM718Zaf32OXY1COlA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4425.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(376002)(39860400002)(396003)(136003)(366004)(478600001)(8676002)(6636002)(55016002)(107886003)(9686003)(76116006)(66946007)(8936002)(66476007)(66556008)(64756008)(66446008)(83380400001)(4326008)(86362001)(110136005)(54906003)(52536014)(5660300002)(2906002)(6506007)(316002)(7696005)(53546011)(71200400001)(33656002)(966005)(186003)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: FP/jsxgoBqsxUgbEqpu39kcbcehBf7W2yMgxp7oMw+l3H9EBKc9LEMIw8gj/CX4JMaaOQ3Sub84Pz9bS7Pk8zH+CPer2ATnP68J7nOtElYuuResfFmInvHnOuWTFQomHxyOu7njThDoMjhU6Vq96WV6ZYsLire+1LOcBE8BMeswv1ggdcAfh0NrF2FuxhajgZqn+bNFuCLlZ65bnXY1iP3EjQuj9dgvnX+mcVabQDTyqhsTguOK/PFyTMAQadJp57jJRfcIxAnSizQXTDQWYN9rcdu4mH3S8pCZqtu6vdZRQfse41OZ2HF7K1EueTFxk4B7bT0Nr3rJZ66aMvjkf2LexjZeOLsFjBdtmXXabuyO0QKAqMHEV4PRYoQjRuVe63JT5UG4Bp4ULQSsA6xOEyHbCgdHUf/OYLBx5EvTmpv4Mgi6tmPcAJDe41571Q9ZKyfvGNt40nsRIQnK381Q3m5EHU9Kjbphxm35cTSqjKQSjrA2yLdwJIlqSOKcBOT5t MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4425.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 918e2af4-629a-42b3-3bc5-08d82a0d751c X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2020 04:54:15.9431 (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: F6xZkHhJSj9LZZec408LNaSeaBea2C27zfA4QUWKIwc80Mw5kCOdsdgi3ss9aaujcGa0vdfY1B9oC0GzN7bicQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3881 Return-Path: zhichao.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable With the patchcheck issue fixed. Reviewed-by: Zhichao Gao Thanks, Zhichao > -----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->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= 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