From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0720.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::720]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 85BDC81EBF for ; Wed, 16 Nov 2016 01:05:24 -0800 (PST) Received: from CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.26) by CS1PR84MB0294.NAMPRD84.PROD.OUTLOOK.COM (10.162.190.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10; Wed, 16 Nov 2016 09:05:21 +0000 Received: from CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.26]) by CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM ([10.162.190.26]) with mapi id 15.01.0721.017; Wed, 16 Nov 2016 09:05:21 +0000 From: "Wang, Sunny (HPS SW)" To: Ruiyu Ni , "edk2-devel@lists.01.org" CC: Jie Lin , "Haskell, Darrell" , "Shifflett, Joseph" , "Wang, Sunny (HPS SW)" Thread-Topic: [edk2] [PATCH 2/3] MdeModulePkg/BdsDxe: Fix bug to run non-first PlatformRecovery#### Thread-Index: AQHSPyewM/pNEO54kEaFZl006Tiv36DbP4Eg Date: Wed, 16 Nov 2016 09:05:21 +0000 Message-ID: References: <20161115100425.299856-1-ruiyu.ni@intel.com> <20161115100425.299856-3-ruiyu.ni@intel.com> In-Reply-To: <20161115100425.299856-3-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sunnywang@hpe.com; x-originating-ip: [15.211.131.5] x-microsoft-exchange-diagnostics: 1; CS1PR84MB0294; 7:9CE1JRQJth+fbddjcLkc9HjRnZN4OLQFCQWP5iwdoTmapmxysOPgOg9lCNtzzYQfBRozx9faOfEK6dYbEXd0KnanhxOpiFeTVEfyKgbTGcjPjaZ57qNDR1B+30pYxX2DPNovhjQMkB0Wj3pWpVIUTkaCGgvA3s9IaNPBGBvEqeNLoFi4Q4VS38pJk01zqCcxtirWYIdxEwaIxT3ld4QkpAxwbFBMoSTypEnvEDpI5FS34XQ8lQMxB7zC8hnR7iwoFWjPi0mfmx4UOzcqVQaRSjKz0z1I/zQowFK/Xj6ECWUDhBvH0jZ8JNMDlJWsjNiWn8YSe/1GAPpqVF1A5xwceC1o/L1jTuGRTTdgfJ+zUbs= x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10019020)(6009001)(7916002)(13464003)(189002)(199003)(377454003)(2950100002)(305945005)(5001770100001)(4326007)(122556002)(81166006)(81156014)(189998001)(74316002)(8936002)(33656002)(9686002)(2906002)(77096005)(2900100001)(229853002)(2501003)(68736007)(87936001)(6506003)(97736004)(92566002)(86362001)(3660700001)(105586002)(106356001)(106116001)(99286002)(54356999)(50986999)(3846002)(6116002)(102836003)(76176999)(3280700002)(101416001)(7696004)(8676002)(7846002)(66066001)(5660300001)(7736002); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0294; H:CS1PR84MB0295.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: c18e54b1-0502-4907-535d-08d40dffb1a1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CS1PR84MB0294; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6060326)(6040281)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6061324)(6041223); SRVR:CS1PR84MB0294; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0294; x-forefront-prvs: 01283822F8 received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2016 09:05:21.2402 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0294 Subject: Re: [PATCH 2/3] MdeModulePkg/BdsDxe: Fix bug to run non-first PlatformRecovery#### X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 09:05:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me.=20 Reviewed-by: Sunny Wang Just have a suggestion below.=20 For the change below, it is related to Driver#### rather than PlatformRecov= ery####. Could you add more comment for this Driver#### related change into= your log? It's fine to not update your patch. You can directly update it w= hen you check in your code change. + + if (!EFI_ERROR (LoadOptions[Index].Status) && + (LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT)=20 + !=3D 0) { ReconnectAll =3D TRUE; } -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiy= u Ni Sent: Tuesday, November 15, 2016 6:04 PM To: edk2-devel@lists.01.org Cc: Jie Lin Subject: [edk2] [PATCH 2/3] MdeModulePkg/BdsDxe: Fix bug to run non-first P= latformRecovery#### The implementation doesn't check the LoadOptions[Index].Status but only dep= ends on the Status returned from EfiBootManagerProcessLoadOption(), which r= esults only the first PlatformRecovery#### runs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jie Lin --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index 72adc51..48e5351 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -443,17 +443,25 @@ ProcessLoadOptions ( LoadOptionType =3D LoadOptions[Index].OptionType; } ASSERT (LoadOptionType =3D=3D LoadOptions[Index].OptionType); + ASSERT (LoadOptionType !=3D LoadOptionTypeBoot); =20 Status =3D EfiBootManagerProcessLoadOption (&LoadOptions[Index]); =20 + // + // Status indicates whether the load option is loaded and executed + // LoadOptions[Index].Status is what the load option returns + // if (!EFI_ERROR (Status)) { - if (LoadOptionType =3D=3D LoadOptionTypePlatformRecovery) { - // - // Stop processing if any entry is successful - // + // + // Stop processing if any PlatformRecovery#### returns success. + // + if ((LoadOptions[Index].Status =3D=3D EFI_SUCCESS) && + (LoadOptionType =3D=3D LoadOptionTypePlatformRecovery)) { break; } - if ((LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT) != =3D 0) { + + if (!EFI_ERROR (LoadOptions[Index].Status) && + (LoadOptions[Index].Attributes & LOAD_OPTION_FORCE_RECONNECT)=20 + !=3D 0) { ReconnectAll =3D TRUE; } } -- 2.9.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel