From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web10.2004.1570808632256191683 for ; Fri, 11 Oct 2019 08:43:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=TbLr1E1h; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.68, mailfrom: pete@akeo.ie) Received: by mail-wr1-f68.google.com with SMTP id o18so12415262wrv.13 for ; Fri, 11 Oct 2019 08:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eaKxSjLEKlBMeuOiZDPOj2KOhXZB+exI1WFfHRmS5C0=; b=TbLr1E1hlMgt0chGWMUYLI/xPKSI7J/iiKho7uRZCAgUS6Ti2malDqt/bZaJDoCiJ5 cT0CsKXCElwOyfVG3L/o6pZfrE//rTjwsZdFnY+idiux0P2S3xSqv6gM/iaHK8cVw+be cvurLXLZBI6y36gzJax/pE0Np4wKTmfUGi8l2ITTpQUgTD314APmNDlIsb64KvDGwXqE H75nMXTU40kmVE+mnXcdScTvShZt4qtITcUyhqofYQumyZO+WqXZiJEDPp/Og3ZwnB9Q bDfmNW5I6FjQUvYZzf/pjyXbXNBIwiSOgU8QL5Js8pTNpoliTTRYHR3gXHyOuRZsRwFE BAyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eaKxSjLEKlBMeuOiZDPOj2KOhXZB+exI1WFfHRmS5C0=; b=IM3CvZAfjYkXKOSodp47yUJoHAIYLNQ1OIUCQRjocrHzbF4IrDidr8WiNbOOh2m1nA 0NYiO6b6Cxw5gjERY7xnhqAgUx9AxMsdcoEGm80qxvtcx3kWLqqdiHlBjfZGIDUlFy4P AixO1SZrzb1oHJ8JSTvdMnHJl8rgRfBKNNUmuywsyULPNF+ZQM8ToyRRe4sktZx9Y5Ym TZ8Qlf1i3Bz8ySuXR5aUVipJLRmHiPCB9dNy4Dm/iTGRWvDORxHrwXIJ7zbchBwQYXIF TlJhcSbXdW2yGK2VzqPzNdCNtEhE0Dc6DwFHIN1o9v6H1BHdqLWWBISFZ/3gUMiGIYlc pLJg== X-Gm-Message-State: APjAAAW3EqZHurtNj92jSEpNajN9GwSBpH3TITrf/fn2dk0N8tE5uwfV ATr5P7xR7PAOms7i0yAX2CeO5aCUfuk= X-Google-Smtp-Source: APXvYqwUG4wMpBjML+eG0kesmiAGo5aL8NyYTOcwEJcR60SxuXonvF7jUT63r8pw5B8iN773+nRaKg== X-Received: by 2002:a5d:66c7:: with SMTP id k7mr13421832wrw.210.1570808630528; Fri, 11 Oct 2019 08:43:50 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.40.122]) by smtp.gmail.com with ESMTPSA id e3sm9436052wme.39.2019.10.11.08.43.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2019 08:43:49 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: afish@apple.com, lersek@redhat.com, liming.gao@intel.com Subject: [PATCH 1/1] MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0 Date: Fri, 11 Oct 2019 16:43:37 +0100 Message-Id: <20191011154337.1652-2-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20191011154337.1652-1-pete@akeo.ie> References: <20191011154337.1652-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Laszlo Ersek Commit 2de1f611be06ded3a59726a4052a9039be7d459b introduced a regression whereas platforms that did set PcdPlatformBootTimeOut to 0 are now getting an unexpected call to PlatformBootManagerWaitCallback(). This patch also ensures that, if PcdPlatformBootTimeOut is 0xFFFF we don't call PlatformBootManagerWaitCallback() with a zero argument as doing so would produce an unwarranted jump to full progress completion which is likely to throw off users. Signed-off-by: Pete Batard --- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c index 7968a58f3454..d6ec31118c1f 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -341,7 +341,17 @@ BdsWait ( TimeoutRemain--; } } - PlatformBootManagerWaitCallback (0); + + // + // If the platform configured a nonzero and finite time-out, and we have + // actually reached that, report 100% completion to the platform. + // + // Note that the (TimeoutRemain == 0) condition excludes + // PcdPlatformBootTimeOut=0xFFFF, and that's deliberate. + // + if (PcdGet16 (PcdPlatformBootTimeOut) != 0 && TimeoutRemain == 0) { + PlatformBootManagerWaitCallback (0); + } DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n")); } -- 2.21.0.windows.1