From nobody Mon Dec 23 10:58:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1518574058406842.983370246305; Tue, 13 Feb 2018 18:07:38 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7A4D6223972CD; Tue, 13 Feb 2018 18:01:39 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 D5B2D222DE153 for ; Tue, 13 Feb 2018 18:01:36 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2018 18:07:27 -0800 Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.72]) by fmsmga006.fm.intel.com with ESMTP; 13 Feb 2018 18:07:27 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=michael.d.kinney@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,510,1511856000"; d="scan'208";a="204007805" From: "Kinney, Michael D" To: edk2-devel@lists.01.org Date: Tue, 13 Feb 2018 18:07:22 -0800 Message-Id: <20180214020722.5412-4-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.14.2.windows.3 In-Reply-To: <20180214020722.5412-1-michael.d.kinney@intel.com> References: <20180214020722.5412-1-michael.d.kinney@intel.com> Subject: [edk2] [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Dong , Jiewen Yao , Michael D Kinney , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D799 Based on content from the following branch/commit: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2= e60302b2d Add check to see if the Boot Logo 2 Protocol is available and attempt to set the location and size of the boot logo using both the Boot Logo Protocol and the Boot Logo 2 Protocol. Cc: Sean Brogan Cc: Bret Barkelew Cc: Jiewen Yao Cc: Star Zeng Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney --- MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 18 +++++++++++++++++- MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/= Library/BootLogoLib/BootLogoLib.c index 8bd9985cb2..9872f7eeea 100644 --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c @@ -3,6 +3,7 @@ to show progress bar and LOGO. =20 Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2016, Microsoft Corporation
This program and the accompanying materials are licensed and made availabl= e under the terms and conditions of the BSD License that accompanies this distribu= tion. The full text of the license may be found at @@ -26,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER= EXPRESS OR IMPLIED. #include #include #include +#include =20 /** Show LOGO returned from Edkii Platform Logo protocol on all consoles. @@ -56,6 +58,7 @@ BootLogoEnableLogo ( UINT32 RefreshRate; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; EFI_BOOT_LOGO_PROTOCOL *BootLogo; + EDKII_BOOT_LOGO2_PROTOCOL *BootLogo2; UINTN NumberOfLogos; EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LogoBlt; UINTN LogoDestX; @@ -98,6 +101,14 @@ BootLogoEnableLogo ( BootLogo =3D NULL; } =20 + // + // Try to open Boot Logo 2 Protocol. + // + Status =3D gBS->LocateProtocol (&gEdkiiBootLogo2ProtocolGuid, NULL, (VOI= D **) &BootLogo2); + if (EFI_ERROR (Status)) { + BootLogo2 =3D NULL; + } + // // Erase Cursor from screen // @@ -330,7 +341,12 @@ BootLogoEnableLogo ( } =20 if (!EFI_ERROR (Status)) { - BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWi= dth, LogoHeight); + if (BootLogo !=3D NULL) { + BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, Logo= Width, LogoHeight); + } + if (BootLogo2 !=3D NULL) { + BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, Lo= goWidth, LogoHeight); + } } FreePool (LogoBlt); =20 diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePk= g/Library/BootLogoLib/BootLogoLib.inf index 79b5fc511a..47969cc05a 100644 --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf @@ -3,6 +3,7 @@ # to show progress bar and logo. # =20 # Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2016, Microsoft Corporation
# This program and the accompanying materials are licensed and made avail= able under # the terms and conditions of the BSD License that accompanies this distr= ibution. # The full text of the license may be found at @@ -49,6 +50,7 @@ [Protocols] gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport ## SOMETIMES_CONSUMES gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES =20 + gEdkiiBootLogo2ProtocolGuid ## SOMETIMES_CONSUMES gEfiUserManagerProtocolGuid ## CONSUMES gEdkiiPlatformLogoProtocolGuid ## CONSUMES =20 --=20 2.14.2.windows.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel