From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=15.233.44.26; helo=g2t2353.austin.hpe.com; envelope-from=sunnywang@hpe.com; receiver=edk2-devel@lists.01.org Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D123B208F78DC for ; Tue, 3 Jul 2018 20:39:51 -0700 (PDT) Received: from G2W6311.americas.hpqcorp.net (g2w6311.austin.hp.com [16.197.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2353.austin.hpe.com (Postfix) with ESMTPS id D2903A4 for ; Wed, 4 Jul 2018 03:39:50 +0000 (UTC) Received: from G4W9330.americas.hpqcorp.net (16.208.32.116) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 4 Jul 2018 03:39:30 +0000 Received: from G9W9210.americas.hpqcorp.net (2002:10dc:429b::10dc:429b) by G4W9330.americas.hpqcorp.net (2002:10d0:2074::10d0:2074) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 4 Jul 2018 03:39:29 +0000 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (15.241.52.11) by G9W9210.americas.hpqcorp.net (16.220.66.155) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 4 Jul 2018 03:39:29 +0000 Received: from AT5PR8401MB0929.NAMPRD84.PROD.OUTLOOK.COM (10.169.6.151) by AT5PR8401MB1233.NAMPRD84.PROD.OUTLOOK.COM (10.169.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.18; Wed, 4 Jul 2018 03:39:26 +0000 Received: from AT5PR8401MB0929.NAMPRD84.PROD.OUTLOOK.COM ([fe80::dc39:b258:6531:7c00]) by AT5PR8401MB0929.NAMPRD84.PROD.OUTLOOK.COM ([fe80::dc39:b258:6531:7c00%4]) with mapi id 15.20.0930.016; Wed, 4 Jul 2018 03:39:26 +0000 From: "Wang, Sunny (HPS SW)" To: Ruiyu Ni , "edk2-devel@lists.01.org" CC: Eric Dong , "Wang, Sunny (HPS SW)" Thread-Topic: [edk2] [PATCH v4 8/9] MdeModulePkg/BdsDxe: Revert "fall back to UI loop before hanging" Thread-Index: AQHUEzmFoH1SlVwvv0qRIvZ+c/M6WKR+abPw Date: Wed, 4 Jul 2018 03:39:26 +0000 Message-ID: References: <20180704015057.35908-1-ruiyu.ni@intel.com> <20180704015057.35908-9-ruiyu.ni@intel.com> In-Reply-To: <20180704015057.35908-9-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: [16.242.247.133] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AT5PR8401MB1233; 7:Dk5lU0THQeW9NfTbcjRSa5Ln3wyLpOTuchN5qPQWsZUg4DdNcAjB65+sWauPLYbbd/O9R3apaPgVt2iIz9ckFE0k/uuTmI5/CAxVq+d7OVVgcCSX2YE0NHa1Cq0oJC3L+HxQAKGwplurp8elRPWEw0YsSMTXlUfCPOV9d4OdrdSF0J2JiaomSqCFbAesknV1iyDVAKmzAgMhU0Wi3z/q7u+QV454f5fgF5/lqnV8Ver1Uf5G3PZ11a+mrUnpHHUc x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10019020)(136003)(366004)(396003)(39860400002)(376002)(346002)(189003)(199004)(13464003)(186003)(6306002)(4326008)(55016002)(86362001)(74316002)(7736002)(9686003)(25786009)(305945005)(229853002)(33656002)(316002)(66066001)(5660300001)(97736004)(8676002)(2906002)(6436002)(2900100001)(446003)(105586002)(106356001)(478600001)(99286004)(2501003)(476003)(11346002)(486006)(5250100002)(81166006)(14444005)(81156014)(14454004)(102836004)(6246003)(256004)(53546011)(8936002)(110136005)(68736007)(53936002)(26005)(966005)(54906003)(76176011)(7696005)(3846002)(6116002)(6506007); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR8401MB1233; H:AT5PR8401MB0929.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 30450d0a-ee7b-40b6-2984-08d5e15fbdd0 x-microsoft-antispam: UriScan:(222181515654134); BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(5600053)(711020)(2017052603328)(7153060)(7193020); SRVR:AT5PR8401MB1233; x-ms-traffictypediagnostic: AT5PR8401MB1233: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(222181515654134)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AT5PR8401MB1233; BCL:0; PCL:0; RULEID:; SRVR:AT5PR8401MB1233; x-forefront-prvs: 0723A02764 received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: IG7Uzpy4aJW7BChRBbL/R6IXoE+eWomv7QiuHzR+cjPsQ7nCynHY83ROKJPaBOefPwUvATEZAYPXDTNoFGfb1En1VYtohp8vLS1n1ye83tvDHN3REWs2MlG6Mw/APnqIKdM9CVE4V0B2g83i8eJHAbN6jusIZs2YbgQrmmOz9IXgcj5NHLGLUme049Wfahxb9Qn3oWkjvZxRZB/tfCqqfMhfuZRDEEmmoSRTJ4kKOZ2PVO/gKDTn2bGySrAQ2ehp0O3lQBF+uhPFRVKziztLVH/BCsmQK6yU8WH3+ArPeL3atAWK4oRzUkTGHdWNky3AMJ/03I0JDh0naaGuUoJGrt+6a8X2NUu7rpaRmplx/KU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 30450d0a-ee7b-40b6-2984-08d5e15fbdd0 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2018 03:39:26.3730 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1233 X-OriginatorOrg: hpe.com Subject: Re: [PATCH v4 8/9] MdeModulePkg/BdsDxe: Revert "fall back to UI loop before hanging" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2018 03:39:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me. This is clearer.=20 Reviewed-by: Sunny Wang -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiy= u Ni Sent: Wednesday, July 04, 2018 9:51 AM To: edk2-devel@lists.01.org Cc: Eric Dong Subject: [edk2] [PATCH v4 8/9] MdeModulePkg/BdsDxe: Revert "fall back to UI= loop before hanging" Commit d1de487dd2e77f4741abcbd71d19a8c93971fda0 "MdeModulePkg/BdsDxe: fall back to a Boot Manager Menu loop before hanging= " changed BDS core to fall back to UI loop when no bootable option can be lau= nched. Now since PlatformBootManagerUnableToBoot() is added, the commit can be rev= erted. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Eric Dong Reviewed-by: Laszlo Ersek --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 60 +++-------------------------= ---- 1 file changed, 4 insertions(+), 56 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index 49e403e181..39b643c77a 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -634,55 +634,6 @@ BdsFormalizeEfiGlobalVariable ( BdsFormalizeOSIndicationVariable (); } =20 -/** - Enter an infinite loop of calling the Boot Manager Menu. - - This is a last resort alternative to BdsEntry() giving up for good. This - function never returns. - - @param[in] BootManagerMenu The EFI_BOOT_MANAGER_LOAD_OPTION located and= /or - created by the EfiBootManagerGetBootManagerM= enu() - call in BdsEntry(). -**/ -VOID -BdsBootManagerMenuLoop ( - IN EFI_BOOT_MANAGER_LOAD_OPTION *BootManagerMenu - ) -{ - EFI_INPUT_KEY Key; - - // - // Normally BdsDxe does not print anything to the system console, but th= is is - // a last resort -- the end-user will likely not see any DEBUG messages - // logged in this situation. - // - // AsciiPrint() will NULL-check gST->ConOut internally. We check gST->Co= nIn - // here to see if it makes sense to request and wait for a keypress. - // - if (gST->ConIn !=3D NULL) { - AsciiPrint ( - "%a: No bootable option or device was found.\n" - "%a: Press any key to enter the Boot Manager Menu.\n", - gEfiCallerBaseName, - gEfiCallerBaseName - ); - BdsWaitForSingleEvent (gST->ConIn->WaitForKey, 0); - - // - // Drain any queued keys. - // - while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) { - // - // just throw away Key - // - } - } - - for (;;) { - EfiBootManagerBoot (BootManagerMenu); - } -} - /** =20 Service routine for BdsInstance->Entry(). Devices are connected, the @@ = -1081,19 +1032,16 @@ BdsEntry ( } while (BootSuccess); } =20 + if (BootManagerMenuStatus !=3D EFI_NOT_FOUND) { + EfiBootManagerFreeLoadOption (&BootManagerMenu); } + if (!BootSuccess) { LoadOptions =3D EfiBootManagerGetLoadOptions (&LoadOptionCount, LoadOp= tionTypePlatformRecovery); ProcessLoadOptions (LoadOptions, LoadOptionCount); EfiBootManagerFreeLoadOptions (LoadOptions, LoadOptionCount); } =20 - // - // If BootManagerMenu is available, fall back to it indefinitely. - // - if (BootManagerMenuStatus !=3D EFI_NOT_FOUND) { - BdsBootManagerMenuLoop (&BootManagerMenu); - } - DEBUG ((EFI_D_ERROR, "[Bds] Unable to boot!\n")); CpuDeadLoop (); } -- 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel