From patchwork Thu May 5 19:22:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 67238 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp917600qge; Thu, 5 May 2016 12:23:03 -0700 (PDT) X-Received: by 10.98.68.208 with SMTP id m77mr23095002pfi.25.1462476183610; Thu, 05 May 2016 12:23:03 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id ib14si12977553pab.122.2016.05.05.12.23.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 May 2016 12:23:03 -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 2AFF01A1F9D; Thu, 5 May 2016 12:22:52 -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 2DF5C1A1F9D for ; Thu, 5 May 2016 12:22:51 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (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 BD7F01B1C; Thu, 5 May 2016 19:22:50 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-77.phx2.redhat.com [10.3.113.77]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u45JMVdu015691; Thu, 5 May 2016 15:22:49 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 5 May 2016 21:22:25 +0200 Message-Id: <1462476147-10404-12-git-send-email-lersek@redhat.com> In-Reply-To: <1462476147-10404-1-git-send-email-lersek@redhat.com> References: <1462476147-10404-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Subject: [edk2] [PATCH 11/13] ArmVirtPkg/PlatformBootManagerLib: add EnableQuietBoot & DisableQuietBoot 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" UefiBootManagerLib does not provide these functions, we have to implement them. (EnableQuietBoot() puts up the nice TianoCore logo.) OvmfPkg commits 817fb3ac2a78 and 8e8fd3037788 have extracted these functions already, - from "IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c" - to "OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c". Copy the latter file, with minimal changes. Cc: Ard Biesheuvel Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 7 +++++ ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h | 29 ++++++++++++++++++++ {OvmfPkg => ArmVirtPkg}/Library/PlatformBootManagerLib/QuietBoot.c | 9 +++++- 3 files changed, 44 insertions(+), 1 deletion(-) -- 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/PlatformBootManagerLib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 28d546027d5e..2500ad9d6805 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -33,6 +33,7 @@ [Defines] [Sources] PlatformBm.c QemuKernel.c + QuietBoot.c [Packages] IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec @@ -46,6 +47,7 @@ [LibraryClasses] BaseMemoryLib DebugLib DevicePathLib + DxeServicesLib MemoryAllocationLib PcdLib PrintLib @@ -56,6 +58,10 @@ [LibraryClasses] UefiLib UefiRuntimeServicesTableLib +[FeaturePcd] + gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootlogoOnlyEnable + gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport + [FixedPcd] gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile @@ -79,5 +85,6 @@ [Protocols] gEfiDevicePathProtocolGuid gEfiGraphicsOutputProtocolGuid gEfiLoadedImageProtocolGuid + gEfiOEMBadgingProtocolGuid gEfiPciRootBridgeIoProtocolGuid gEfiSimpleFileSystemProtocolGuid diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h index df1519c24175..22df65f73026 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h @@ -48,4 +48,33 @@ TryRunningQemuKernel ( VOID ); +/** + Use SystemTable Conout to stop video based Simple Text Out consoles from + going to the video device. Put up LogoFile on every video device that is a + console. + + @param[in] LogoFile File name of logo to display on the center of the + screen. + + @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo + displayed. + @retval EFI_UNSUPPORTED Logo not found +**/ +EFI_STATUS +EnableQuietBoot ( + IN EFI_GUID *LogoFile + ); + +/** + Use SystemTable Conout to turn on video based Simple Text Out consoles. The + Simple Text Out screens will now be synced up with all non video output + devices + + @retval EFI_SUCCESS UGA devices are back in text mode and synced up. +**/ +EFI_STATUS +DisableQuietBoot ( + VOID + ); + #endif // _PLATFORM_BM_H_ diff --git a/OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c b/ArmVirtPkg/Library/PlatformBootManagerLib/QuietBoot.c similarity index 95% copy from OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c copy to ArmVirtPkg/Library/PlatformBootManagerLib/QuietBoot.c index 972050fa9cc7..687bda0e0480 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/QuietBoot.c @@ -1,6 +1,7 @@ /** @file Platform BDS function for quiet boot support. +Copyright (C) 2016, Red Hat, Inc. Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -12,7 +13,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#include "BdsPlatform.h" +#include +#include +#include +#include +#include + +#include "PlatformBm.h" /** Convert a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer