From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 CDAF8222DE14C for ; Tue, 13 Feb 2018 18:01:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False 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:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,510,1511856000"; d="scan'208";a="204007798" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.72]) by fmsmga006.fm.intel.com with ESMTP; 13 Feb 2018 18:07:26 -0800 From: "Kinney, Michael D" To: edk2-devel@lists.01.org Cc: Sean Brogan , Bret Barkelew , Jiewen Yao , Star Zeng , Eric Dong , Michael D Kinney Date: Tue, 13 Feb 2018 18:07:20 -0800 Message-Id: <20180214020722.5412-2-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: [Patch 1/3] MdeModulePkg: Add 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: , X-List-Received-Date: Wed, 14 Feb 2018 02:01:37 -0000 https://bugzilla.tianocore.org/show_bug.cgi?id=799 Based on content from the following branch/commit: https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport https://github.com/Microsoft/MS_UEFI/commit/33bab4031a417d7d5a7d356c15a14c2e60302b2d Add new Boot Logo 2 Protocol that adds a GetBootLogo() service that can be used to retrieve the GOP BLT buffer, location, and size of the boot logo that was previously registered with the SetBootLogo() service. The Boot Logo 2 Protocol service GetBootLogo() is amended to return the pointer to the GOP BLT buffer previously registered with the SetBootLogo() service. 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/Include/Protocol/BootLogo2.h | 114 ++++++++++++++++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 3 + 2 files changed, 117 insertions(+) create mode 100644 MdeModulePkg/Include/Protocol/BootLogo2.h diff --git a/MdeModulePkg/Include/Protocol/BootLogo2.h b/MdeModulePkg/Include/Protocol/BootLogo2.h new file mode 100644 index 0000000000..91318c8adb --- /dev/null +++ b/MdeModulePkg/Include/Protocol/BootLogo2.h @@ -0,0 +1,114 @@ +/** +Boot Logo 2 Protocol is used to convey information of Logo dispayed during boot. + +Copyright (c) 2016, Microsoft Corporation +Copyright (c) 2018, Intel Corporation. All rights reserved.
+ +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +**/ + +#ifndef _BOOT_LOGO2_H_ +#define _BOOT_LOGO2_H_ + +#include + +#define EDKII_BOOT_LOGO2_PROTOCOL_GUID \ + { \ + 0x4b5dc1df, 0x1eaa, 0x48b2, { 0xa7, 0xe9, 0xea, 0xc4, 0x89, 0xa0, 0xb, 0x5c } \ + } + +// +// Forward reference for pure ANSI compatability +// +typedef struct _EDKII_BOOT_LOGO2_PROTOCOL EDKII_BOOT_LOGO2_PROTOCOL; + +/** + Update information of logo image drawn on screen. + + @param[in] This The pointer to the Boot Logo protocol 2 instance. + @param[in] BltBuffer The BLT buffer for logo drawn on screen. If BltBuffer + is set to NULL, it indicates that logo image is no + longer on the screen. + @param[in] DestinationX X coordinate of destination for the BltBuffer. + @param[in] DestinationY Y coordinate of destination for the BltBuffer. + @param[in] Width Width of rectangle in BltBuffer in pixels. + @param[in] Height Hight of rectangle in BltBuffer in pixels. + + @retval EFI_SUCCESS The boot logo information was updated. + @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. + @retval EFI_OUT_OF_RESOURCES The logo information was not updated due to + insufficient memory resources. +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_SET_BOOT_LOGO2)( + IN EDKII_BOOT_LOGO2_PROTOCOL *This, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, + IN UINTN DestinationX, + IN UINTN DestinationY, + IN UINTN Width, + IN UINTN Height + ); + +/** + Get the location of the boot logo on the screen. + + @param[in] This The pointer to the Boot Logo Protocol 2 instance + @param[out] BltBuffer Returns pointer to the GOP BLT buffer that was + previously registered with SetBootLogo2(). The + buffer returned must not be modified or freed. + @param[out] DestinationX Returns the X start position of the GOP BLT buffer + that was previously registers with SetBootLogo2(). + @param[out] DestinationY Returns the Y start position of the GOP BLT buffer + that was previously registers with SetBootLogo2(). + @param[out] Width Returns the width of the GOP BLT buffer + that was previously registers with SetBootLogo2(). + @param[out] Height Returns the height of the GOP BLT buffer + that was previously registers with SetBootLogo2(). + + @retval EFI_SUCCESS The location of the boot logo was returned. + @retval EFI_NOT_READY The boot logo has not been set. + @retval EFI_INVALID_PARAMETER BltBuffer is NULL. + @retval EFI_INVALID_PARAMETER DestinationX is NULL. + @retval EFI_INVALID_PARAMETER DestinationY is NULL. + @retval EFI_INVALID_PARAMETER Width is NULL. + @retval EFI_INVALID_PARAMETER Height is NULL. +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_GET_BOOT_LOGO2)( + IN EDKII_BOOT_LOGO2_PROTOCOL *This, + OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **BltBuffer, + OUT UINTN *DestinationX, + OUT UINTN *DestinationY, + OUT UINTN *Width, + OUT UINTN *Height + ); + +struct _EDKII_BOOT_LOGO2_PROTOCOL { + EDKII_SET_BOOT_LOGO2 SetBootLogo; + EDKII_GET_BOOT_LOGO2 GetBootLogo; +}; + +extern EFI_GUID gEdkiiBootLogo2ProtocolGuid; + +#endif diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 455979386e..ba0585936b 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -538,6 +538,9 @@ [Protocols] ## Include/Protocol/BootLogo.h gEfiBootLogoProtocolGuid = { 0xcdea2bd3, 0xfc25, 0x4c1c, { 0xb9, 0x7c, 0xb3, 0x11, 0x86, 0x6, 0x49, 0x90 } } + # Include/Protocol/BootLogo2.h + gEdkiiBootLogo2ProtocolGuid = { 0x4b5dc1df, 0x1eaa, 0x48b2, { 0xa7, 0xe9, 0xea, 0xc4, 0x89, 0xa0, 0xb, 0x5c } } + ## Include/Protocol/DisplayProtocol.h gEdkiiFormDisplayEngineProtocolGuid = { 0x9bbe29e9, 0xfda1, 0x41ec, { 0xad, 0x52, 0x45, 0x22, 0x13, 0x74, 0x2d, 0x2e } } -- 2.14.2.windows.3