From patchwork Wed Oct 22 13:21:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 39293 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 872D2202DB for ; Wed, 22 Oct 2014 13:22:36 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gi9sf1963141lab.10 for ; Wed, 22 Oct 2014 06:22:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=XPKITLrEcMrasgYz1hiDen7vCmc26z7W617whFgJ4c4=; b=m6yXwF2fnkR/X5mlnU5WqTQRdB7QqVWpRzahHwDPJzeBPjSv5j3Q0WYI+luJeAl7d6 tjXo0gI8pX5A4g2wELkAhjB4PNnLrNLkQEnGNFRkimjNQreC75kNmiHqNxpYmhpmDBqZ GOUsllWzYUj7OrXIyzVzAH8xZjz62ZZVl4blgKOid6QrTOzzrFdpfCG+T5vKHME427mR kbyEi121qpTaBC0xtmw5nM3FMrmjrh3Q3ZWQr55JD8zff5aK4WS8YFNQqSfwPJ67f9p7 nb4GHuiDEJT+3rQl0QY6EzKZz2rQGADvyga5VR11z0N+Dr9RuWCOcoaL7MZIEpefxZu9 7ItA== X-Gm-Message-State: ALoCoQlQlm7WkCzBPya0gUduRzAwy6lUaOn6QORMdI3jXAgp5shr6AsZxyJX8yEDQYmWVuYIL7Ux X-Received: by 10.180.105.74 with SMTP id gk10mr5698537wib.0.1413984154861; Wed, 22 Oct 2014 06:22:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.52 with SMTP id o20ls208998laa.3.gmail; Wed, 22 Oct 2014 06:22:34 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr41154908laa.57.1413984154675; Wed, 22 Oct 2014 06:22:34 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id tl10si23260329lbb.131.2014.10.22.06.22.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Oct 2014 06:22:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id p9so2758274lbv.7 for ; Wed, 22 Oct 2014 06:22:34 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr40903082lbb.74.1413984154526; Wed, 22 Oct 2014 06:22:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp69752lbz; Wed, 22 Oct 2014 06:22:33 -0700 (PDT) X-Received: by 10.51.17.69 with SMTP id gc5mr32075978igd.24.1413984152445; Wed, 22 Oct 2014 06:22:32 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id qn8si1859335igb.23.2014.10.22.06.22.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Oct 2014 06:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Xgvrr-0001oC-Va; Wed, 22 Oct 2014 13:22:24 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Xgvrq-0001nv-UN for edk2-devel@lists.sourceforge.net; Wed, 22 Oct 2014 13:22:22 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=lersek@redhat.com; helo=mx1.redhat.com; Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Xgvrp-0002Zv-LT for edk2-devel@lists.sourceforge.net; Wed, 22 Oct 2014 13:22:22 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9MDMFik006169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 22 Oct 2014 09:22:15 -0400 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-81.ams2.redhat.com [10.36.116.81]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9MDM2M8016088 for ; Wed, 22 Oct 2014 09:22:14 -0400 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net Date: Wed, 22 Oct 2014 15:21:56 +0200 Message-Id: <1413984117-20000-7-git-send-email-lersek@redhat.com> In-Reply-To: <1413984117-20000-1-git-send-email-lersek@redhat.com> References: <1413984117-20000-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -2.9 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1Xgvrp-0002Zv-LT Subject: [edk2] [PATCH 6/7] OvmfPkg: BDS: drop custom boot timeout, revert to IntelFrameworkModulePkg's X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lersek@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 PlatformBdsEnterFrontPage() already implements a keypress wait (for entering the setup utility at boot) with a nice progress bar, only OVMF has not been using it. Removing our custom code and utilizing PlatformBdsEnterFrontPage()'s builtin wait has the following benefits: - It simplifies OVMF's BDS code. - Because now we call PlatformBdsEnterFrontPage() unconditionally, it actually has a chance to look at the EFI_OS_INDICATIONS_BOOT_TO_FW_UI bit of the "OsIndications" variable, improving compliance with the UEFI specification. References: - https://bugzilla.redhat.com/show_bug.cgi?id=1153927 - http://thread.gmane.org/gmane.comp.bios.tianocore.devel/10487 - The progress bar looks nice. (And it keeps the earlier behavior intact, when the user presses a key on the TianoCore splash screen.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c | 38 ++-------------------------- OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + 4 files changed, 5 insertions(+), 36 deletions(-) diff --git a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c index e974d3f..4b76c6e 100644 --- a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c @@ -1062,10 +1062,6 @@ Returns: { EFI_STATUS Status; UINT16 Timeout; - EFI_EVENT UserInputDurationTime; - UINTN Index; - EFI_INPUT_KEY Key; - EFI_TPL OldTpl; EFI_BOOT_MODE BootMode; DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n")); @@ -1114,19 +1110,7 @@ Returns: // PlatformBdsNoConsoleAction (); } - // - // Create a 300ms duration event to ensure user has enough input time to enter Setup - // - Status = gBS->CreateEvent ( - EVT_TIMER, - 0, - NULL, - NULL, - &UserInputDurationTime - ); - ASSERT (Status == EFI_SUCCESS); - Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 3000000); - ASSERT (Status == EFI_SUCCESS); + // // Memory test and Logo show // @@ -1153,25 +1137,7 @@ Returns: // BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); - // - // To give the User a chance to enter Setup here, if user set TimeOut is 0. - // BDS should still give user a chance to enter Setup - // - // Check whether the user input after the duration time has expired - // - OldTpl = EfiGetCurrentTpl(); - gBS->RestoreTPL (TPL_APPLICATION); - gBS->WaitForEvent (1, &UserInputDurationTime, &Index); - gBS->CloseEvent (UserInputDurationTime); - Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); - gBS->RaiseTPL (OldTpl); - - if (!EFI_ERROR (Status)) { - // - // Enter Setup if user input - // - PlatformBdsEnterFrontPage (Timeout, TRUE); - } + PlatformBdsEnterFrontPage (Timeout, TRUE); } VOID diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 8527ece..de58cb4 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -331,6 +331,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 ################################################################################ # diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 823f005..7134852 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -337,6 +337,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 ################################################################################ # diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 4f1404d..dbf7ee7 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -358,6 +358,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3 ################################################################################ #