]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Add Boot Logo 2 Protocol
authorKinney, Michael D <michael.d.kinney@intel.com>
Wed, 20 Dec 2017 20:43:50 +0000 (12:43 -0800)
committerMichael D Kinney <michael.d.kinney@intel.com>
Wed, 28 Feb 2018 19:57:02 +0000 (11:57 -0800)
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 <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
MdeModulePkg/Include/Protocol/BootLogo2.h [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec

diff --git a/MdeModulePkg/Include/Protocol/BootLogo2.h b/MdeModulePkg/Include/Protocol/BootLogo2.h
new file mode 100644 (file)
index 0000000..583a253
--- /dev/null
@@ -0,0 +1,118 @@
+/**\r
+Boot Logo 2 Protocol is used to convey information of Logo dispayed during boot.\r
+\r
+The Boot Logo 2 Protocol is a replacement for the Boot Logo Protocol.  If a\r
+platform produces both the Boot Logo 2 Protocol and the Boot Logo Protocol\r
+then the Boot Logo 2 Protocol must be used instead of the Boot Logo Protocol.\r
+\r
+Copyright (c) 2016, Microsoft Corporation\r
+Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
+\r
+All rights reserved.\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions are met:\r
+1. Redistributions of source code must retain the above copyright notice,\r
+this list of conditions and the following disclaimer.\r
+2. Redistributions in binary form must reproduce the above copyright notice,\r
+this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+\r
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\r
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\r
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+**/\r
+\r
+#ifndef _BOOT_LOGO2_H_\r
+#define _BOOT_LOGO2_H_\r
+\r
+#include <Protocol/GraphicsOutput.h>\r
+\r
+#define EDKII_BOOT_LOGO2_PROTOCOL_GUID \\r
+  { \\r
+    0x4b5dc1df, 0x1eaa, 0x48b2, { 0xa7, 0xe9, 0xea, 0xc4, 0x89, 0xa0, 0xb, 0x5c } \\r
+  }\r
+\r
+//\r
+// Forward reference for pure ANSI compatability\r
+//\r
+typedef struct _EDKII_BOOT_LOGO2_PROTOCOL EDKII_BOOT_LOGO2_PROTOCOL;\r
+\r
+/**\r
+  Update information of logo image drawn on screen.\r
+\r
+  @param[in] This          The pointer to the Boot Logo protocol 2 instance.\r
+  @param[in] BltBuffer     The BLT buffer for logo drawn on screen. If BltBuffer\r
+                           is set to NULL, it indicates that logo image is no\r
+                           longer on the screen.\r
+  @param[in] DestinationX  X coordinate of destination for the BltBuffer.\r
+  @param[in] DestinationY  Y coordinate of destination for the BltBuffer.\r
+  @param[in] Width         Width of rectangle in BltBuffer in pixels.\r
+  @param[in] Height        Hight of rectangle in BltBuffer in pixels.\r
+\r
+  @retval EFI_SUCCESS            The boot logo information was updated.\r
+  @retval EFI_INVALID_PARAMETER  One of the parameters has an invalid value.\r
+  @retval EFI_OUT_OF_RESOURCES   The logo information was not updated due to\r
+                                 insufficient memory resources.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EDKII_SET_BOOT_LOGO2)(\r
+  IN EDKII_BOOT_LOGO2_PROTOCOL      *This,\r
+  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *BltBuffer       OPTIONAL,\r
+  IN UINTN                          DestinationX,\r
+  IN UINTN                          DestinationY,\r
+  IN UINTN                          Width,\r
+  IN UINTN                          Height\r
+  );\r
+\r
+/**\r
+  Get the location of the boot logo on the screen.\r
+\r
+  @param[in]  This          The pointer to the Boot Logo Protocol 2 instance\r
+  @param[out] BltBuffer     Returns pointer to the GOP BLT buffer that was\r
+                            previously registered with SetBootLogo2(). The\r
+                            buffer returned must not be modified or freed.\r
+  @param[out] DestinationX  Returns the X start position of the GOP BLT buffer\r
+                            that was previously registered with SetBootLogo2().\r
+  @param[out] DestinationY  Returns the Y start position of the GOP BLT buffer\r
+                            that was previously registered with SetBootLogo2().\r
+  @param[out] Width         Returns the width of the GOP BLT buffer\r
+                            that was previously registered with SetBootLogo2().\r
+  @param[out] Height        Returns the height of the GOP BLT buffer\r
+                            that was previously registered with SetBootLogo2().\r
+\r
+  @retval EFI_SUCCESS            The location of the boot logo was returned.\r
+  @retval EFI_NOT_READY          The boot logo has not been set.\r
+  @retval EFI_INVALID_PARAMETER  BltBuffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER  DestinationX is NULL.\r
+  @retval EFI_INVALID_PARAMETER  DestinationY is NULL.\r
+  @retval EFI_INVALID_PARAMETER  Width is NULL.\r
+  @retval EFI_INVALID_PARAMETER  Height is NULL.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EDKII_GET_BOOT_LOGO2)(\r
+  IN  EDKII_BOOT_LOGO2_PROTOCOL      *This,\r
+  OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL  **BltBuffer,\r
+  OUT UINTN                          *DestinationX,\r
+  OUT UINTN                          *DestinationY,\r
+  OUT UINTN                          *Width,\r
+  OUT UINTN                          *Height\r
+  );\r
+\r
+struct _EDKII_BOOT_LOGO2_PROTOCOL {\r
+  EDKII_SET_BOOT_LOGO2  SetBootLogo;\r
+  EDKII_GET_BOOT_LOGO2  GetBootLogo;\r
+};\r
+\r
+extern EFI_GUID  gEdkiiBootLogo2ProtocolGuid;\r
+\r
+#endif\r
index 455979386e3f7c05f7d20345ad106f89dc526d9e..ba0585936b6ece1be98b121f08112d8be9298951 100644 (file)
   ## Include/Protocol/BootLogo.h\r
   gEfiBootLogoProtocolGuid = { 0xcdea2bd3, 0xfc25, 0x4c1c, { 0xb9, 0x7c, 0xb3, 0x11, 0x86, 0x6, 0x49, 0x90 } }\r
 \r
+  # Include/Protocol/BootLogo2.h\r
+  gEdkiiBootLogo2ProtocolGuid = { 0x4b5dc1df, 0x1eaa, 0x48b2, { 0xa7, 0xe9, 0xea, 0xc4, 0x89, 0xa0, 0xb, 0x5c } }\r
+\r
   ## Include/Protocol/DisplayProtocol.h\r
   gEdkiiFormDisplayEngineProtocolGuid = { 0x9bbe29e9, 0xfda1, 0x41ec, { 0xad, 0x52, 0x45, 0x22, 0x13, 0x74, 0x2d, 0x2e } }\r
 \r