From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web10.22427.1594655067324171282 for ; Mon, 13 Jul 2020 08:44:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MpT4RaKx; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594655066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yxfWhnJHItCYAWuJ9c39bEQIu5XA8yjSpY/00HpW9d4=; b=MpT4RaKxXmaNXPoP3+RLPQFo5+ZS9BN17xDD50xHsxlEO4nAoO+GJKxp0q5e1I9cYQl2Yl xVEbNNs6g8gXQeVjL7tUepixObeK06fkB9gl+Xap54/eVmLVqYx9NSwlf613BTER034eNp YpRtVcJWs1XHlXDVQn9WREsOsgNUa9c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-7yyyzi-ZNRK9AeCaVF0hsw-1; Mon, 13 Jul 2020 11:44:16 -0400 X-MC-Unique: 7yyyzi-ZNRK9AeCaVF0hsw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34522193F565; Mon, 13 Jul 2020 15:44:14 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-183.ams2.redhat.com [10.36.114.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8737B5C1BB; Mon, 13 Jul 2020 15:44:13 +0000 (UTC) Subject: Re: [edk2-devel] EFI Timeout variable is ignored (initialized to default on every boot) To: devel@edk2.groups.io, arvidjaar@gmail.com References: <824523a7-4c5e-5fae-66b5-2cc4bd4beb26@gmail.com> From: "Laszlo Ersek" Message-ID: <2c5ad688-fd7d-5211-e525-48cff7503905@redhat.com> Date: Mon, 13 Jul 2020 17:44:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <824523a7-4c5e-5fae-66b5-2cc4bd4beb26@gmail.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, On 07/11/20 15:12, Andrei Borzenkov wrote: > Using 202005 version I am not able to change "Boot Maintenance Manager" > - "Auto Boot Time-out" or set Timeout variable from within Linux with > efibootmgr - value is overwritten with default (normally 0) on every > boot. The only possibility is to use -boot menu=on QEMU option. Looking > at code, PlatformBootManagerBeforeConsole() unconditionally sets Timeout > to value obtained from GetFrontPageTimeoutFromQemu() which in turn > returns PcdPlatformBootTimeOut (default 0) if nothing was present on > command line (or in general passed via fw_cfg). > > I'd expect that default should be current value of Timeout unless > overridden by command line/fw_cfg. It is OK to initialize it for the > first time to PcdPlatformBootTimeOut if Timeout was not defined, but > certainly not every time on every boot. BdsDxe overwrites the Timeout non-volatile variable with PcdPlatformBootTimeOut, before calling PlatformBootManagerBeforeConsole(). OvmfPkg platform code does not write to the Timeout non-volatile variable. OvmfPkg platform code only sets PcdPlatformBootTimeOut (from fw_cfg), but that happens only after BdsDxe has overwritten Timeout with PcdPlatformBootTimeOut. https://bugzilla.tianocore.org/show_bug.cgi?id=2488#c1 Laszlo