From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web11.4166.1571065408153138104 for ; Mon, 14 Oct 2019 08:03:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=rvCB+CRt; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.67, mailfrom: pete@akeo.ie) Received: by mail-wr1-f67.google.com with SMTP id o18so20091717wrv.13 for ; Mon, 14 Oct 2019 08:03:27 -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=ZkjQG78nTs6iNkGivJRdx0Klz0kZk11pELBKSze/Yp0=; b=rvCB+CRtRYW0cp+H9Wfv4tD3Ihg5ZVGaMzKgS9Tkpg8vtmay2b9sf/8TSYyG1tpn3m bZdYNtJKHuOGiAPk4mkTeYoC4dTpUNXuIoE+LE4gdDnSeqYwuCxWk+lrHREfa/4Mc8eZ fTSe9oZmwxVY2MYx7dCpJx/A0ou2KNii/U8UT/IpEXcpTYfkJXzGcsnIwF7UzTNdJ9Cb kzV6J0Qso3YOAiB/a09rdOJqLretX3evipSb6FD5I5oBgPO0kVUObadXcgyZP69PA6Zw 9TQZOyenBrCOrO26koXEtjc69saF1jHI0/0Lm/Ngfuv6Bg3DsyhRsEhgAYMpUMQEFors mBzA== 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=ZkjQG78nTs6iNkGivJRdx0Klz0kZk11pELBKSze/Yp0=; b=KC9rEEAsij7E4ORVWFU9TEQBL6KBAINEDbqsHKRYoUjmp5XZgSmCeAgGiDTEtp7Za/ 015w8bNZI52ISQdRcX9kQ7+e1b7nqp7hOV92TKnXK718c0gp1PPg4y4gQyXUpAU+U03g qTUva4IXO3y7w2KGixDFBKe4ovvln6VHoReOQnuyD5K4z2I42P/k1NnIK1wiWi+32hta TqFNkGARFnkT/fyMGH+bgDaPW2v84zakOWUUYsXEbYFU1he/tdUO9q+ihLRHsJevLtfb ZC9uXw3vUGoRmMwBHRoUBCyNgbQ8qfFBIf+YKoi0bKgV/KEGpMXSIWtyNGGvPBycmfI1 DVOg== X-Gm-Message-State: APjAAAUg2ZQ8dYmic6D8y4Sdq2Uk9IwIVWc+P52cTHQuBB6nzeMTRhpC EOoQgRzF4u0vNwhexykIogft2uV7JvE= X-Google-Smtp-Source: APXvYqxgS+x9nE1VSznuwu39Y0Ahm/QfMKbI8BWgEHy5dVPTamMhtWqIsI4OqRu0ErKdoAECNfNPiw== X-Received: by 2002:adf:fad2:: with SMTP id a18mr27899916wrs.279.1571065406411; Mon, 14 Oct 2019 08:03:26 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.40.122]) by smtp.gmail.com with ESMTPSA id k24sm391750wmi.1.2019.10.14.08.03.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Oct 2019 08:03:25 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: afish@apple.com, lersek@redhat.com, liming.gao@intel.com Subject: [PATCH v2 2/2] ArmVirtPkg/PlatformBootManagerLib: Don't update progress if Pcd is 0 Date: Mon, 14 Oct 2019 16:03:11 +0100 Message-Id: <20191014150311.16740-3-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20191014150311.16740-1-pete@akeo.ie> References: <20191014150311.16740-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Similar to what we now do for OVMF, we need to consider the possibility that PlatformBootManagerWaitCallback () may be called with a PcdPlatformBootTimeOut that was set to zero, in which case the call should simply return. We also change the initial timeout variable name to make the code explicit. Signed-off-by: Pete Batard Reviewed-by: Laszlo Ersek --- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 30c015eec5b0..5f6cfe64daca 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -842,9 +842,17 @@ PlatformBootManagerWaitCallback ( { EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black; EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White; - UINT16 Timeout; + UINT16 TimeoutInitial; - Timeout = PcdGet16 (PcdPlatformBootTimeOut); + TimeoutInitial = PcdGet16 (PcdPlatformBootTimeOut); + + // + // If PcdPlatformBootTimeOut is set to zero, then we consider + // that no progress update should be enacted. + // + if (TimeoutInitial == 0) { + return; + } Black.Raw = 0x00000000; White.Raw = 0x00FFFFFF; @@ -854,7 +862,7 @@ PlatformBootManagerWaitCallback ( Black.Pixel, L"Start boot option", White.Pixel, - (Timeout - TimeoutRemain) * 100 / Timeout, + (TimeoutInitial - TimeoutRemain) * 100 / TimeoutInitial, 0 ); } -- 2.21.0.windows.1