From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0730.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe42::730]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 855C21A1E6E for ; Thu, 1 Sep 2016 00:20:24 -0700 (PDT) Received: from TU4PR84MB0304.NAMPRD84.PROD.OUTLOOK.COM (10.162.186.26) by TU4PR84MB0301.NAMPRD84.PROD.OUTLOOK.COM (10.162.186.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Thu, 1 Sep 2016 07:20:23 +0000 Received: from TU4PR84MB0304.NAMPRD84.PROD.OUTLOOK.COM ([10.162.186.26]) by TU4PR84MB0304.NAMPRD84.PROD.OUTLOOK.COM ([10.162.186.26]) with mapi id 15.01.0599.010; Thu, 1 Sep 2016 07:20:23 +0000 From: "Wang, Sunny (HPS SW)" To: Liming Gao , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v2] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenu from LoadFile Thread-Index: AQHSBBbg6Npnojq7m0OoJS2dKVIL8aBkOkXg Date: Thu, 1 Sep 2016 07:20:23 +0000 Message-ID: References: <1472709909-32536-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1472709909-32536-1-git-send-email-liming.gao@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-ms-office365-filtering-correlation-id: cbf785c1-8291-4d72-bdd6-08d3d238705c x-microsoft-exchange-diagnostics: 1; TU4PR84MB0301; 6:PYdUFmm/EOseJSzsTTyqeXNHx3E3v5wDYXWUe7xska5pxQVpuFGjfbZph7b0z/BXF0XP7/R9UT8AuEYPyKyilOm5nZfjhlbuM7jX6S3BGhrevEwAVcFpQgLcxtiMD8esLS9Iaxk6v50Ne1gJ3YsNlJWwUwbAaN557AuQGDtyATLXRD1UNG624WHZoIDcNx49x+ydGy+MbULrhkSNB0qu7VEVajhXMazxI7F8q3gBpCcGIjJo34BJxjcw5OACu4mIAJp2iKUuJ8WeL+hE48Dnymu09x8mzocirkBeN5LuJ5mE0do1PZ4gToYCN5nJN6XH8CkmJkrYL2QH1mgZj639GQ==; 5:IYwM3ekjLM8zEFWZiErcuypw6cUKM1b7NdNRZCNuI0qDpHGPPCpyFVab+39+r2byVXNV0lBFlyL49vKFjSenOIeInYnSz2cXrpenr/ZWeiGBmyux8uECpM3lh5PGHq0IRJby6wtdFdYX/Pbw6M034Q==; 24:I1p/FtBLmgU0S4WTNEhNkUDKTJcNxgOkRqGLos3+s8ExDcL2ZwjmXKeucrBNdQmlQfdvfwQvFLW3DboBWXikawi1LuCLhro1/GEFALJSs+8=; 7:cTHegMPgUREEEyGZ+EKL3w0Sz6SXiRQbs6bU4M0fsJ8efMopFVVSfk1zNpMAQK/luIJoAAm2PJInvM2Ae30zpyyOCkJh/iwMRZKJ9IZTd7BNqXOYTAPvHrvS+Lwp21f89FcIO+DL+L1tC50jajkRpbYCJoYdXsGPfOwywE7zqM9y71F0CJR2tHLAORXJqRgbRkP6ggPWACZM4sjjYKa1u6xfDjohqa9VKNWGNPiHJGpXvMRYuBYNT8qjoDycqV+P x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:TU4PR84MB0301; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:TU4PR84MB0301; BCL:0; PCL:0; RULEID:; SRVR:TU4PR84MB0301; x-forefront-prvs: 0052308DC6 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(13464003)(189002)(377454003)(3280700002)(15975445007)(107886002)(106116001)(68736007)(8676002)(81156014)(5002640100001)(92566002)(99286002)(81166006)(105586002)(2950100001)(74316002)(77096005)(586003)(7846002)(305945005)(6116002)(102836003)(8936002)(7736002)(2906002)(2501003)(2900100001)(189998001)(5660300001)(87936001)(86362001)(122556002)(50986999)(76176999)(7696003)(19580395003)(9686002)(3846002)(3660700001)(54356999)(19580405001)(66066001)(33656002)(97736004)(101416001)(11100500001)(10400500002)(5001770100001)(106356001); DIR:OUT; SFP:1102; SCL:1; SRVR:TU4PR84MB0301; H:TU4PR84MB0304.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; 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: 01 Sep 2016 07:20:23.3218 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR84MB0301 Subject: Re: [PATCH v2] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenu from LoadFile 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: Thu, 01 Sep 2016 07:20:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me. Reviewed-by: Sunny Wang Regards, Sunny Wang -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Limi= ng Gao Sent: Thursday, September 01, 2016 2:05 PM To: edk2-devel@lists.01.org Subject: [edk2] [PATCH v2] MdeModulePkg UefiBootManagerLib: Ignore BootMana= gerMenu from LoadFile BootManagerMenu boot option is handled by EfiBootManagerGetBootManagerMenu. Don't need to handle it again when parse LoadFile protocol. In V2, use "BootManagerMenu" instead of "BootMenuApp". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Ruiyu Ni --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index fe09a04..6b84b85 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1940,7 +1940,6 @@ BmEnumerateBootOptions ( UINTN Removable; UINTN Index; CHAR16 *Description; - UINT32 BootAttributes; =20 ASSERT (BootOptionCount !=3D NULL); =20 @@ -2070,6 +2069,12 @@ BmEnumerateBootOptions ( &Handles ); for (Index =3D 0; Index < HandleCount; Index++) { + // + // Ignore BootManagerMenu. its boot option will be created by EfiBootM= anagerGetBootManagerMenu(). + // + if (BmIsBootManagerMenuFilePath (DevicePathFromHandle (Handles[Index])= )) { + continue; + } =20 Description =3D BmGetBootDescription (Handles[Index]); BootOptions =3D ReallocatePool ( @@ -2079,19 +2084,11 @@ BmEnumerateBootOptions ( ); ASSERT (BootOptions !=3D NULL); =20 - // - // If LoadFile includes BootManagerMenu, its boot attribue will be set= to APP and HIDDEN. - // - BootAttributes =3D LOAD_OPTION_ACTIVE; - if (BmIsBootManagerMenuFilePath (DevicePathFromHandle (Handles[Index])= )) { - BootAttributes =3D LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | L= OAD_OPTION_HIDDEN; - } - Status =3D EfiBootManagerInitializeLoadOption ( &BootOptions[(*BootOptionCount)++], LoadOptionNumberUnassigned, LoadOptionTypeBoot, - BootAttributes, + LOAD_OPTION_ACTIVE, Description, DevicePathFromHandle (Handles[Index]), NULL, --=20 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel