From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530599857327646.1897256542069; Mon, 2 Jul 2018 23:37:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 907D9210F3769; Mon, 2 Jul 2018 23:37:34 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 F3CE2210F2CF6 for ; Mon, 2 Jul 2018 23:37:32 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:31 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:22 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207077" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:37 +0800 Message-Id: <20180703063743.373172-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 1/7] MdeModulePkg/PlatformBootManager: Add PlatformBootManagerUnableToBoot 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: , Cc: Laszlo Ersek , Michael Turner MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The patch adds a new API PlatformBootManagerUnableToBoot()' to PlatformBootManagerLib. The new API is provided by platform bds library and is called when no boot option could be launched. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Sean Brogan Cc: Michael Turner Cc: Laszlo Ersek Cc: Sunny Wang Reviewed-by: Laszlo Ersek --- MdeModulePkg/Include/Library/PlatformBootManagerLib.h | 13 +++++++++++++ .../PlatformBootManagerLibNull/PlatformBootManager.c | 19 +++++++++++++++= +++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h b/MdeMod= ulePkg/Include/Library/PlatformBootManagerLib.h index 65630ce2bb..6e26329043 100644 --- a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h +++ b/MdeModulePkg/Include/Library/PlatformBootManagerLib.h @@ -59,4 +59,17 @@ PlatformBootManagerWaitCallback ( UINT16 TimeoutRemain ); =20 +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ); + #endif diff --git a/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootMa= nager.c b/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManag= er.c index 1390e19097..5a4455ef23 100644 --- a/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c +++ b/MdeModulePkg/Library/PlatformBootManagerLibNull/PlatformBootManager.c @@ -2,7 +2,7 @@ This file include all platform action which can be customized by IBV/OEM. =20 -Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -65,3 +65,20 @@ PlatformBootManagerWaitCallback ( { return; } + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ) +{ + return; +} + --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 15305998732571018.8580610848364; Mon, 2 Jul 2018 23:37:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 77354210F377F; Mon, 2 Jul 2018 23:37:35 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 6CCCE203B8589 for ; Mon, 2 Jul 2018 23:37:33 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:32 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:23 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207086" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:38 +0800 Message-Id: <20180703063743.373172-3-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 2/7] CorebootPayload/PlatformBDS: Impl PlatformBootManagerUnableToBoot 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: , Cc: Prince Agyeman MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Maurice Ma Cc: Prince Agyeman Cc: Benjamin You Reviewed-by: Benjamin You --- .../PlatformBootManagerLib/PlatformBootManager.c | 19 +++++++++++++++= +++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBoot= Manager.c b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootM= anager.c index 7e92441da1..368e89d586 100644 --- a/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager= .c +++ b/CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager= .c @@ -2,7 +2,7 @@ This file include all platform action which can be customized by IBV/OEM. =20 -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -252,3 +252,20 @@ PlatformBootManagerWaitCallback ( { return; } + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ) +{ + return; +} + --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530599860235169.36839653062123; Mon, 2 Jul 2018 23:37:40 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C0FCA210F376F; Mon, 2 Jul 2018 23:37:34 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 23FF3210F2574 for ; Mon, 2 Jul 2018 23:37:33 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:32 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:24 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207092" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:39 +0800 Message-Id: <20180703063743.373172-4-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 3/7] OvmfPkg/PlatformBds: Implement PlatformBootManagerUnableToBoot 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: , Cc: Anthony Perard , Jordan Justen , Laszlo Ersek MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Anthony Perard Cc: Julien Grall Reviewed-by: Laszlo Ersek --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 61 ++++++++++++++++++= +++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg= /Library/PlatformBootManagerLib/BdsPlatform.c index 57870cb856..e56ffc141a 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -1,7 +1,7 @@ /** @file Platform BDS customizations. =20 - Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1676,3 +1676,62 @@ PlatformBootManagerWaitCallback ( ); } =20 +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ) +{ + EFI_STATUS Status; + EFI_INPUT_KEY Key; + EFI_BOOT_MANAGER_LOAD_OPTION BootManagerMenu; + UINTN Index; + + // + // BootManagerMenu doesn't contain the correct information when return s= tatus is EFI_NOT_FOUND. + // + Status =3D EfiBootManagerGetBootManagerMenu (&BootManagerMenu); + if (EFI_ERROR (Status)) { + return; + } + // + // 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 + ); + Status =3D gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index); + ASSERT_EFI_ERROR (Status); + ASSERT (Index =3D=3D 0); + + // + // Drain any queued keys. + // + while (!EFI_ERROR (gST->ConIn->ReadKeyStroke (gST->ConIn, &Key))) { + // + // just throw away Key + // + } + } + + for (;;) { + EfiBootManagerBoot (&BootManagerMenu); + } +} + --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530599865280526.3685789934689; Mon, 2 Jul 2018 23:37:45 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ED8A8210F3772; Mon, 2 Jul 2018 23:37:34 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 4E318210F2D0C for ; Mon, 2 Jul 2018 23:37:33 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:32 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:25 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207095" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:40 +0800 Message-Id: <20180703063743.373172-5-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 4/7] Nt32Pkg/PlatformBDS: Implement PlatformBootManagerUnableToBoot 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: , Cc: Hao A Wu MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Hao A Wu Reviewed-by: Hao Wu --- .../PlatformBootManagerLib/PlatformBootManager.c | 19 +++++++++++++++= +++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c b= /Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c index 99f30f9ec2..cf8289faff 100644 --- a/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -2,7 +2,7 @@ This file include all platform action which can be customized by IBV/OEM. =20 -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License @@ -403,3 +403,20 @@ PlatformBootManagerWaitCallback ( 0 ); } + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ) +{ + return; +} + --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530599866496575.0968414244863; Mon, 2 Jul 2018 23:37:46 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 26E8D210F3777; Mon, 2 Jul 2018 23:37:35 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 469B5210F2CF6 for ; Mon, 2 Jul 2018 23:37:33 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:32 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:26 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207109" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:41 +0800 Message-Id: <20180703063743.373172-6-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 5/7] QuarkPlatform/PlatformBDS: Implement PlatformBootManagerUnableToBoot 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: , Cc: Michael D Kinney MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Michael D Kinney Cc: Kelly Steele --- .../PlatformBootManagerLib/PlatformBootManager.c | 19 +++++++++++++++= +++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootMa= nager.c b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManag= er.c index 53391c6077..8b25f55f1c 100644 --- a/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c +++ b/QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c @@ -2,7 +2,7 @@ This file include all platform action which can be customized by IBV/OEM. =20 -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -459,3 +459,20 @@ PlatformBootManagerWaitCallback ( { Print (L"\r%-2d seconds remained...", TimeoutRemain); } + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + + If this function returns, BDS attempts to enter an infinite loop. +**/ +VOID +EFIAPI +PlatformBootManagerUnableToBoot ( + VOID + ) +{ + return; +} + --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530599877310811.7093410685114; Mon, 2 Jul 2018 23:37:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A25E4210F3D63; Mon, 2 Jul 2018 23:37:35 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 8787B210F2D17 for ; Mon, 2 Jul 2018 23:37:33 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:32 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:27 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207111" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:42 +0800 Message-Id: <20180703063743.373172-7-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 6/7] 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: , Cc: Laszlo Ersek , Eric Dong MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 launched. Now since PlatformBootManagerUnableToBoot() is added, the commit can be reverted. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Eric Dong Cc: Laszlo Ersek 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 (); } --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun Apr 28 19:46:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1530599870017530.6909022838712; Mon, 2 Jul 2018 23:37:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4F2AF210F377C; Mon, 2 Jul 2018 23:37:35 -0700 (PDT) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 6D219210F2D14 for ; Mon, 2 Jul 2018 23:37:33 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 23:37:32 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2018 23:37:28 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,302,1526367600"; d="scan'208";a="69207103" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 3 Jul 2018 14:37:43 +0800 Message-Id: <20180703063743.373172-8-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 In-Reply-To: <20180703063743.373172-1-ruiyu.ni@intel.com> References: <20180703063743.373172-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH v3 7/7] MdeModulePkg/BdsDxe: Call PlatformBootManagerUnableToBoot() 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: , Cc: Laszlo Ersek , Michael Turner MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When no boot option can be launched, BDS core calls PlatformBootManagerUnableToBoot() to let platform BdsDxe handle it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Laszlo Ersek Cc: Sean Brogan Cc: Michael Turner Cc: Sunny Wang Reviewed-by: Laszlo Ersek --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Univer= sal/BdsDxe/BdsEntry.c index 39b643c77a..a25663ea43 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -1043,6 +1043,7 @@ BdsEntry ( } =20 DEBUG ((EFI_D_ERROR, "[Bds] Unable to boot!\n")); + PlatformBootManagerUnableToBoot (); CpuDeadLoop (); } =20 --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel