From patchwork Wed May 25 12:36:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 68593 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1187268qge; Wed, 25 May 2016 05:37:12 -0700 (PDT) X-Received: by 10.98.101.198 with SMTP id z189mr5457403pfb.76.1464179831956; Wed, 25 May 2016 05:37:11 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id o4si12503315pas.14.2016.05.25.05.37.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 May 2016 05:37:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E1DAB1A1E4A; Wed, 25 May 2016 05:37:17 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5F8471A1E3A for ; Wed, 25 May 2016 05:37:16 -0700 (PDT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9DC5764473; Wed, 25 May 2016 12:37:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-94.phx2.redhat.com [10.3.116.94]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4PCaoa8027839; Wed, 25 May 2016 08:37:04 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Wed, 25 May 2016 14:36:46 +0200 Message-Id: <1464179806-24099-7-git-send-email-lersek@redhat.com> In-Reply-To: <1464179806-24099-1-git-send-email-lersek@redhat.com> References: <1464179806-24099-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 25 May 2016 12:37:05 +0000 (UTC) Subject: [edk2] [PATCH 6/6] ArmVirtPkg/PlatformBootManagerLib: introduce the progress bar X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" ArmVirtPkg's Platform BDS has never had a progress bar. We can easily add one, by copying the PlatformBootManagerWaitCallback() function verbatim from Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c It can be tested by passing the following option to QEMU (5 seconds): -boot menu=on,splash-time=5000 Cc: Ard Biesheuvel Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index b7e02f3d00f4..88441949492b 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -573,4 +573,21 @@ PlatformBootManagerWaitCallback ( UINT16 TimeoutRemain ) { + EFI_GRAPHICS_OUTPUT_BLT_PIXEL Black; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL White; + UINT16 Timeout; + + Timeout = PcdGet16 (PcdPlatformBootTimeOut); + + Black.Blue = Black.Green = Black.Red = Black.Reserved = 0; + White.Blue = White.Green = White.Red = White.Reserved = 0xFF; + + BootLogoUpdateProgress ( + White, + Black, + L"Start boot option", + White, + (Timeout - TimeoutRemain) * 100 / Timeout, + 0 + ); }