From patchwork Thu Oct 23 11:33:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 39357 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A050324022 for ; Thu, 23 Oct 2014 11:34:33 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf477347lab.11 for ; Thu, 23 Oct 2014 04:34:32 -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=VPtHUV6qEax1b3riuITgXj56/cywgNegHZnB+TKFLHw=; b=ICLrJEmQe7f6vWhZkHo6noadC0szhftebSdmwOomQY+yHzRmnNwPViEJBpWIVayfPT +ayrbbYMlnCacDFOneb7pfFeQAIL+HHO44+YlS7mJEAS3+M0WKYROJAHBdH1e6X7mAQg 2fM1u0JGSzLFVoVRU7zcl0X/UjgAg7bwBDfbBkYCTMM0ClcA1iuw8u18eNyEnWaKMJp1 YRUlidYPctBXRUz/imuDHLKPbW5dXBe2n0OSNG9c594zif4b3yqEguOBwyWpEHPmFQ8R dawfglZOKEoeFXJasI8TOGD/ZoQqtJJTCfUg8h0OrbxjmjZ7SAxSTCCsdE7phVzC9mRl AoOg== X-Gm-Message-State: ALoCoQmI3/sNI/vKrSIZVxyoqBIR2xriCWxiYRtmxEB1gQH296ltt2Jc3tTIZayAOaJZIObT2hyL X-Received: by 10.112.138.202 with SMTP id qs10mr917515lbb.5.1414064072422; Thu, 23 Oct 2014 04:34:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.97 with SMTP id p1ls261379laj.87.gmail; Thu, 23 Oct 2014 04:34:32 -0700 (PDT) X-Received: by 10.152.44.233 with SMTP id h9mr4307054lam.73.1414064072172; Thu, 23 Oct 2014 04:34:32 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id u2si2155624lal.70.2014.10.23.04.34.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Oct 2014 04:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id z11so659980lbi.13 for ; Thu, 23 Oct 2014 04:34:32 -0700 (PDT) X-Received: by 10.152.5.38 with SMTP id p6mr4434600lap.44.1414064072069; Thu, 23 Oct 2014 04:34:32 -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 c5csp238323lbz; Thu, 23 Oct 2014 04:34:31 -0700 (PDT) X-Received: by 10.50.79.231 with SMTP id m7mr11945661igx.16.1414064070318; Thu, 23 Oct 2014 04:34:30 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id wr11si2215814icb.102.2014.10.23.04.34.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Oct 2014 04:34:30 -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 1XhGer-0002Jz-PD; Thu, 23 Oct 2014 11:34:21 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XhGeq-0002JV-An for edk2-devel@lists.sourceforge.net; Thu, 23 Oct 2014 11:34:20 +0000 Received-SPF: pass (sog-mx-3.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-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XhGep-0005MD-3v for edk2-devel@lists.sourceforge.net; Thu, 23 Oct 2014 11:34:20 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9NBYCYj019350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 23 Oct 2014 07:34:12 -0400 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-105.ams2.redhat.com [10.36.116.105]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9NBXtPb027262 for ; Thu, 23 Oct 2014 07:34:11 -0400 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net Date: Thu, 23 Oct 2014 13:33:49 +0200 Message-Id: <1414064030-11029-9-git-send-email-lersek@redhat.com> In-Reply-To: <1414064030-11029-1-git-send-email-lersek@redhat.com> References: <1414064030-11029-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 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: 1XhGep-0005MD-3v Subject: [edk2] [PATCH v2 8/9] 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.182 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.) In any case, we set the timeout to 0 (which doesn't show the progress bar and proceeds to the boot options immediately) in order to keep the boot time down. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- Notes: v2: - changed PcdPlatformBootTimeOut from 3 to 0 [Jordan] - updated commit message accordingly 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..22bb71d 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -331,6 +331,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0 ################################################################################ # diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 823f005..0cf2ca1 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -337,6 +337,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0 ################################################################################ # diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 4f1404d..3730d02 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -358,6 +358,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|800 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|600 + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0 ################################################################################ #