From patchwork Thu Oct 23 11:33:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 39353 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E912A24048 for ; Thu, 23 Oct 2014 11:34:26 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf478773lbg.9 for ; Thu, 23 Oct 2014 04:34:25 -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=5OqqMO5uwMfpWvbaTLEwWBNYVbmxAY76MEoOPTtqzWo=; b=OermioCydQykZr1XIwjD5zugS8OuwdYHv4ifNfMQfRS4SFQrI+eImSX9uVMZ/2132S UHNNKffpb2baAbxYeqozZ1/wF+TLiP8QOFxjQ0aYy2gyi9YT6uzBjVf2muQrCbEbINxe Yt7JVWF2OD4hG0hyQL6qJOZ2Jmk4Kj3HWPmH3fmvrbfRLknF0z+A6vKCX/gWIXBXaStR +TtQnIFJszAMsBS1VYTLE9v58b4MJLP8yKZOYLAtc3KCSNxzGKOYD1XpAd5Vr3B9HUeB Dis3yrhuFXtLGAaUxIdfwH83y4AXpUYYLg4b/sv0euXD9UJORrCoeY007FdCRB8W/w43 DJhQ== X-Gm-Message-State: ALoCoQmSZFy0ztTjH92tENsldgKvf46xflPcBk4e4nXOPJyXABx5wd/CWSZ9A7izJLmmg2SXRw92 X-Received: by 10.112.89.195 with SMTP id bq3mr944598lbb.9.1414064065787; Thu, 23 Oct 2014 04:34:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.100 with SMTP id it4ls303597lac.7.gmail; Thu, 23 Oct 2014 04:34:25 -0700 (PDT) X-Received: by 10.153.7.107 with SMTP id db11mr4401141lad.35.1414064065546; Thu, 23 Oct 2014 04:34:25 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id s7si2191802lbb.38.2014.10.23.04.34.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Oct 2014 04:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id w7so650714lbi.36 for ; Thu, 23 Oct 2014 04:34:25 -0700 (PDT) X-Received: by 10.152.120.199 with SMTP id le7mr4262870lab.67.1414064065459; Thu, 23 Oct 2014 04:34:25 -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 c5csp238306lbz; Thu, 23 Oct 2014 04:34:24 -0700 (PDT) X-Received: by 10.107.155.9 with SMTP id d9mr4478491ioe.12.1414064063697; Thu, 23 Oct 2014 04:34:23 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id qg1si2361414igb.3.2014.10.23.04.34.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Oct 2014 04:34:23 -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-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XhGel-0000z6-MM; Thu, 23 Oct 2014 11:34:15 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XhGek-0000yx-6g for edk2-devel@lists.sourceforge.net; Thu, 23 Oct 2014 11:34:14 +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 1XhGej-0001bz-8B for edk2-devel@lists.sourceforge.net; Thu, 23 Oct 2014 11:34:14 +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 s9NBY7UY023083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 23 Oct 2014 07:34:07 -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 s9NBXtPY027262 for ; Thu, 23 Oct 2014 07:34:06 -0400 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net Date: Thu, 23 Oct 2014 13:33:46 +0200 Message-Id: <1414064030-11029-6-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: 1XhGej-0001bz-8B Subject: [edk2] [PATCH v2 5/9] OvmfPkg: BDS: don't overwrite the BDS Front Page timeout 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.177 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 The PlatformBdsEnterFrontPage() function's first parameter, "TimeoutDefault", determines the behavior of the setup utility: - If (TimeoutDefault == 0), then the usual boot order is to be acted upon immediately. - If (TimeoutDefault == 0xFFFF), then the setup utility is entered unconditionally. - If (0 < TimeoutDefault && TimeoutDefault < 0xFFFF), then the PlatformBdsEnterFrontPage() function displays a progress bar, waiting for TimeoutDefault seconds. If the user presses a key, then the setup utility is entered, otherwise the normal boot option processing takes place. The TimeoutDefault parameter is supposed to be set from gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut which has the following (matching) documentation in "IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec": The number of seconds that the firmware will wait before initiating the original default boot selection. A value of 0 indicates that the default boot selection is to be initiated immediately on boot. The value of 0xFFFF then firmware will wait for user input before booting. OVMF does this actually -- see the Timeout variable in PlatformBdsPolicyBehavior() -- but right before calling PlatformBdsEnterFrontPage(), OVMF hardwires TimeoutDefault to 0xFFFF. This has been acceptable until now, because OVMF implements its own "wait for keypress at the splash screen" logic in PlatformBdsPolicyBehavior(), completely avoiding the progress bar mentioned above. OVMF only calls PlatformBdsEnterFrontPage() when the user presses a key during its own "splash screen wait", and *then* it indeed makes sense to enter the setup utility unconditionally. However, even that way, the Timeout = 0xffff; assignment is superfluous, because 0xFFFF is already the default value of PcdPlatformBootTimeOut in "IntelFrameworkModulePkg.dec", and OvmfPkg doesn't override it in its DSC files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- Notes: v2: - updated the commit message wrt. (TimeoutDefault == 0): it is valid to call PlatformBdsEnterFrontPage() with such a timeout. OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c | 1 - 1 file changed, 1 deletion(-) diff --git a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c index 9a079ab..f2ece66 100644 --- a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c @@ -1193,7 +1193,6 @@ Returns: // // Enter Setup if user input // - Timeout = 0xffff; PlatformBdsEnterFrontPage (Timeout, FALSE); } }