* [Patch 0/3] MdeModulePkg: Add Boot Logo 2 Protocol
@ 2018-02-14 2:07 Kinney, Michael D
2018-02-14 2:07 ` [Patch 1/3] " Kinney, Michael D
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Kinney, Michael D @ 2018-02-14 2:07 UTC (permalink / raw)
To: edk2-devel
Cc: Sean Brogan, Bret Barkelew, Jiewen Yao, Star Zeng, Eric Dong,
Michael D Kinney
Branch for review:
https://github.com/mdkinney/edk2/tree/Bug_799_BootLogo2Protocol_V3
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>
Kinney, Michael D (2):
MdeModulePkg: Add Boot Logo 2 Protocol
MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
Michael D Kinney (1):
MdeModulePkg/BootGraphicsResourceDxe: Add Boot Logo 2 Protocol
MdeModulePkg/Include/Protocol/BootLogo2.h | 114 +++++++++++
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 18 +-
MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf | 2 +
MdeModulePkg/MdeModulePkg.dec | 3 +
.../BootGraphicsResourceTableDxe.c | 208 +++++++++++++++++++--
.../BootGraphicsResourceTableDxe.inf | 2 +
6 files changed, 332 insertions(+), 15 deletions(-)
create mode 100644 MdeModulePkg/Include/Protocol/BootLogo2.h
--
2.14.2.windows.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Patch 1/3] MdeModulePkg: Add Boot Logo 2 Protocol
2018-02-14 2:07 [Patch 0/3] MdeModulePkg: Add Boot Logo 2 Protocol Kinney, Michael D
@ 2018-02-14 2:07 ` Kinney, Michael D
2018-02-14 2:07 ` [Patch 2/3] MdeModulePkg/BootGraphicsResourceDxe: " Kinney, Michael D
2018-02-14 2:07 ` [Patch 3/3] MdeModulePkg/BootLogoLib: Use " Kinney, Michael D
2 siblings, 0 replies; 6+ messages in thread
From: Kinney, Michael D @ 2018-02-14 2:07 UTC (permalink / raw)
To: edk2-devel
Cc: Sean Brogan, Bret Barkelew, Jiewen Yao, Star Zeng, Eric Dong,
Michael D Kinney
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>
---
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.<BR>
+
+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 <Protocol/GraphicsOutput.h>
+
+#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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Patch 2/3] MdeModulePkg/BootGraphicsResourceDxe: Add Boot Logo 2 Protocol
2018-02-14 2:07 [Patch 0/3] MdeModulePkg: Add Boot Logo 2 Protocol Kinney, Michael D
2018-02-14 2:07 ` [Patch 1/3] " Kinney, Michael D
@ 2018-02-14 2:07 ` Kinney, Michael D
2018-02-14 2:07 ` [Patch 3/3] MdeModulePkg/BootLogoLib: Use " Kinney, Michael D
2 siblings, 0 replies; 6+ messages in thread
From: Kinney, Michael D @ 2018-02-14 2:07 UTC (permalink / raw)
To: edk2-devel
Cc: Michael D Kinney, Sean Brogan, Bret Barkelew, Jiewen Yao,
Star Zeng, Eric Dong
From: Michael D Kinney <michael.d.kinney@intel.com>
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
Update BootGraphicsResourceDxe to produce both the Boot Logo
Protocol and the Boot Logo 2 Protocol.
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>
---
.../BootGraphicsResourceTableDxe.c | 208 +++++++++++++++++++--
.../BootGraphicsResourceTableDxe.inf | 2 +
2 files changed, 196 insertions(+), 14 deletions(-)
diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c
index 118fb4a922..85e79c6ce6 100644
--- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c
+++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c
@@ -2,6 +2,7 @@
This module install ACPI Boot Graphics Resource Table (BGRT).
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2016, Microsoft Corporation<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -18,6 +19,7 @@
#include <Protocol/AcpiTable.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/BootLogo.h>
+#include <Protocol/BootLogo2.h>
#include <Guid/EventGroup.h>
@@ -33,20 +35,19 @@
/**
Update information of logo image drawn on screen.
- @param This The pointer to the Boot Logo protocol instance.
- @param 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 DestinationX X coordinate of destination for the BltBuffer.
- @param DestinationY Y coordinate of destination for the BltBuffer.
- @param Width Width of rectangle in BltBuffer in pixels.
- @param 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.
+ @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.
**/
EFI_STATUS
EFIAPI
@@ -59,6 +60,69 @@ SetBootLogo (
IN UINTN Height
);
+/**
+ 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.
+**/
+EFI_STATUS
+EFIAPI
+SetBootLogo2 (
+ 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.
+**/
+EFI_STATUS
+EFIAPI
+GetBootLogo2 (
+ 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
+ );
+
//
// Boot Logo Protocol Handle
//
@@ -71,6 +135,14 @@ EFI_BOOT_LOGO_PROTOCOL mBootLogoProtocolTemplate = {
SetBootLogo
};
+///
+/// Boot Logo 2 Protocol instance
+///
+EDKII_BOOT_LOGO2_PROTOCOL mBootLogo2ProtocolTemplate = {
+ SetBootLogo2,
+ GetBootLogo2
+};
+
EFI_EVENT mBootGraphicsReadyToBootEvent;
UINTN mBootGraphicsResourceTableKey = 0;
BOOLEAN mIsLogoValid = FALSE;
@@ -137,6 +209,47 @@ SetBootLogo (
IN UINTN Width,
IN UINTN Height
)
+{
+ //
+ // Call same service in Boot Logo 2 Protocol
+ //
+ return SetBootLogo2 (
+ &mBootLogo2ProtocolTemplate,
+ BltBuffer,
+ DestinationX,
+ DestinationY,
+ Width,
+ Height
+ );
+}
+
+/**
+ 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.
+**/
+EFI_STATUS
+EFIAPI
+SetBootLogo2 (
+ 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
+ )
{
EFI_STATUS Status;
UINTN BufferSize;
@@ -227,6 +340,71 @@ SetBootLogo (
return EFI_SUCCESS;
}
+/**
+ 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.
+**/
+EFI_STATUS
+EFIAPI
+GetBootLogo2 (
+ 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
+ )
+{
+ //
+ // If the boot logo has not been set with SetBootLogo() or SetBootLogo() was
+ // called with a NULL BltBuffer then the boot logo is not valid and
+ // EFI_NOT_READY is returned.
+ //
+ if (mLogoBltBuffer == NULL) {
+ DEBUG ((DEBUG_ERROR, "Request to get boot logo location before boot logo has been set.\n"));
+ return EFI_NOT_READY;
+ }
+
+ //
+ // Make sure none of the boot logo location parameters are NULL.
+ //
+ if (BltBuffer == NULL || DestinationX == NULL || DestinationY == NULL ||
+ Width == NULL || Height == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
+ // Boot logo is valid. Return values from module globals.
+ //
+ *BltBuffer = mLogoBltBuffer;
+ *DestinationX = mLogoDestX;
+ *DestinationY = mLogoDestY;
+ *Width = mLogoWidth;
+ *Height = mLogoHeight;
+
+ return EFI_SUCCESS;
+}
+
/**
Notify function for event group EFI_EVENT_GROUP_READY_TO_BOOT. This is used to
install the Boot Graphics Resource Table.
@@ -401,12 +579,14 @@ BootGraphicsDxeEntryPoint (
Header->CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
//
- // Install Boot Logo protocol.
+ // Install Boot Logo and Boot Logo 2 Protocols.
//
Status = gBS->InstallMultipleProtocolInterfaces (
&mBootLogoHandle,
&gEfiBootLogoProtocolGuid,
&mBootLogoProtocolTemplate,
+ &gEdkiiBootLogo2ProtocolGuid,
+ &mBootLogo2ProtocolTemplate,
NULL
);
ASSERT_EFI_ERROR (Status);
diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
index ff33405acd..bc1c10e981 100644
--- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
+++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
@@ -2,6 +2,7 @@
# This module install ACPI Boot Graphics Resource Table (BGRT).
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2016, Microsoft Corporation<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -49,6 +50,7 @@ [LibraryClasses]
[Protocols]
gEfiAcpiTableProtocolGuid ## CONSUMES
gEfiBootLogoProtocolGuid ## PRODUCES
+ gEdkiiBootLogo2ProtocolGuid ## PRODUCES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## CONSUMES
--
2.14.2.windows.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
2018-02-14 2:07 [Patch 0/3] MdeModulePkg: Add Boot Logo 2 Protocol Kinney, Michael D
2018-02-14 2:07 ` [Patch 1/3] " Kinney, Michael D
2018-02-14 2:07 ` [Patch 2/3] MdeModulePkg/BootGraphicsResourceDxe: " Kinney, Michael D
@ 2018-02-14 2:07 ` Kinney, Michael D
2018-02-14 3:20 ` Sean Brogan
2 siblings, 1 reply; 6+ messages in thread
From: Kinney, Michael D @ 2018-02-14 2:07 UTC (permalink / raw)
To: edk2-devel
Cc: Sean Brogan, Bret Barkelew, Jiewen Yao, Star Zeng, Eric Dong,
Michael D Kinney
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 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 <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>
---
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.
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016, Microsoft Corporation<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
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 <Library/PcdLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
+#include <Protocol/BootLogo2.h>
/**
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 = NULL;
}
+ //
+ // Try to open Boot Logo 2 Protocol.
+ //
+ Status = gBS->LocateProtocol (&gEdkiiBootLogo2ProtocolGuid, NULL, (VOID **) &BootLogo2);
+ if (EFI_ERROR (Status)) {
+ BootLogo2 = NULL;
+ }
+
//
// Erase Cursor from screen
//
@@ -330,7 +341,12 @@ BootLogoEnableLogo (
}
if (!EFI_ERROR (Status)) {
- BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ if (BootLogo != NULL) {
+ BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
+ if (BootLogo2 != NULL) {
+ BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
}
FreePool (LogoBlt);
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/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.
#
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2016, Microsoft Corporation<BR>
# This program and the accompanying materials are licensed and made available under
# the terms and conditions of the BSD License that accompanies this distribution.
# 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
+ gEdkiiBootLogo2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiUserManagerProtocolGuid ## CONSUMES
gEdkiiPlatformLogoProtocolGuid ## CONSUMES
--
2.14.2.windows.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
2018-02-14 2:07 ` [Patch 3/3] MdeModulePkg/BootLogoLib: Use " Kinney, Michael D
@ 2018-02-14 3:20 ` Sean Brogan
2018-02-15 22:52 ` Kinney, Michael D
0 siblings, 1 reply; 6+ messages in thread
From: Sean Brogan @ 2018-02-14 3:20 UTC (permalink / raw)
To: Kinney, Michael D, edk2-devel@lists.01.org
Cc: Bret Barkelew, Jiewen Yao, Star Zeng, Eric Dong
Mike,
Looking over the MdeModulePkg library changes it seems wasteful to call both protocols for Set. In the previously submitted protocol implementation you actually allocate/free memory and copy the buffer in the set routines. For a high resolution screen/logo this could be an expensive operation.
I would suggest that if BootLogo2 exists then maybe BootLogo can be ignored?
if (!EFI_ERROR (Status)) {
- BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ if (BootLogo != NULL) {
+ BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
+ if (BootLogo2 != NULL) {
+ BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
}
Thanks
Sean
________________________________
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Tuesday, February 13, 2018 6:07 PM
To: edk2-devel@lists.01.org
Cc: Sean Brogan; Bret Barkelew; Jiewen Yao; Star Zeng; Eric Dong; Michael D Kinney
Subject: [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D799&data=04%7C01%7Csean.brogan%40microsoft.com%7Cb3a0f58079524830920308d5734fb3d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636541708515157356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=p7ewroezUhc94MuBjA%2Fo9GziZ5wSpS9Yb876GKyzvuY%3D&reserved=0
Based on content from the following branch/commit:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FMS_UEFI%2Ftree%2Fshare%2FMsCapsuleSupport&data=04%7C01%7Csean.brogan%40microsoft.com%7Cb3a0f58079524830920308d5734fb3d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636541708515157356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=ByXtODKvhwrOV3mkK5MnCXLzYwFy9tKyIr16FRkDmB0%3D&reserved=0
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FMS_UEFI%2Fcommit%2F33bab4031a417d7d5a7d356c15a14c2e60302b2d&data=04%7C01%7Csean.brogan%40microsoft.com%7Cb3a0f58079524830920308d5734fb3d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636541708515157356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=TWY5Okohr1%2FbJ1Wpyx12QF4ZgRikfvuCk%2FE6B3DT9sM%3D&reserved=0
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 <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>
---
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.
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016, Microsoft Corporation<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
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 <Library/PcdLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
+#include <Protocol/BootLogo2.h>
/**
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 = NULL;
}
+ //
+ // Try to open Boot Logo 2 Protocol.
+ //
+ Status = gBS->LocateProtocol (&gEdkiiBootLogo2ProtocolGuid, NULL, (VOID **) &BootLogo2);
+ if (EFI_ERROR (Status)) {
+ BootLogo2 = NULL;
+ }
+
//
// Erase Cursor from screen
//
@@ -330,7 +341,12 @@ BootLogoEnableLogo (
}
if (!EFI_ERROR (Status)) {
- BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ if (BootLogo != NULL) {
+ BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
+ if (BootLogo2 != NULL) {
+ BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
}
FreePool (LogoBlt);
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/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.
#
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2016, Microsoft Corporation<BR>
# This program and the accompanying materials are licensed and made available under
# the terms and conditions of the BSD License that accompanies this distribution.
# 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
+ gEdkiiBootLogo2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiUserManagerProtocolGuid ## CONSUMES
gEdkiiPlatformLogoProtocolGuid ## CONSUMES
--
2.14.2.windows.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
2018-02-14 3:20 ` Sean Brogan
@ 2018-02-15 22:52 ` Kinney, Michael D
0 siblings, 0 replies; 6+ messages in thread
From: Kinney, Michael D @ 2018-02-15 22:52 UTC (permalink / raw)
To: Sean Brogan, edk2-devel@lists.01.org, Kinney, Michael D
Cc: Bret Barkelew, Yao, Jiewen, Zeng, Star, Dong, Eric
Sean,
Thanks for the feedback. I have posted V2 with this change.
Mike
From: Sean Brogan [mailto:sean.brogan@microsoft.com]
Sent: Tuesday, February 13, 2018 7:21 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-devel@lists.01.org
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>; Yao, Jiewen <jiewen.yao@intel.com>; Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: Re: [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
Mike,
Looking over the MdeModulePkg library changes it seems wasteful to call both protocols for Set. In the previously submitted protocol implementation you actually allocate/free memory and copy the buffer in the set routines. For a high resolution screen/logo this could be an expensive operation.
I would suggest that if BootLogo2 exists then maybe BootLogo can be ignored?
if (!EFI_ERROR (Status)) {
- BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ if (BootLogo != NULL) {
+ BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
+ if (BootLogo2 != NULL) {
+ BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
}
Thanks
Sean
________________________________
From: Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Sent: Tuesday, February 13, 2018 6:07 PM
To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Sean Brogan; Bret Barkelew; Jiewen Yao; Star Zeng; Eric Dong; Michael D Kinney
Subject: [Patch 3/3] MdeModulePkg/BootLogoLib: Use Boot Logo 2 Protocol
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D799&data=04%7C01%7Csean.brogan%40microsoft.com%7Cb3a0f58079524830920308d5734fb3d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636541708515157356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=p7ewroezUhc94MuBjA%2Fo9GziZ5wSpS9Yb876GKyzvuY%3D&reserved=0
Based on content from the following branch/commit:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FMS_UEFI%2Ftree%2Fshare%2FMsCapsuleSupport&data=04%7C01%7Csean.brogan%40microsoft.com%7Cb3a0f58079524830920308d5734fb3d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636541708515157356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=ByXtODKvhwrOV3mkK5MnCXLzYwFy9tKyIr16FRkDmB0%3D&reserved=0
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2FMS_UEFI%2Fcommit%2F33bab4031a417d7d5a7d356c15a14c2e60302b2d&data=04%7C01%7Csean.brogan%40microsoft.com%7Cb3a0f58079524830920308d5734fb3d2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636541708515157356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwifQ%3D%3D%7C-1&sdata=TWY5Okohr1%2FbJ1Wpyx12QF4ZgRikfvuCk%2FE6B3DT9sM%3D&reserved=0
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 <sean.brogan@microsoft.com<mailto:sean.brogan@microsoft.com>>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com<mailto:Bret.Barkelew@microsoft.com>>
Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
Cc: Eric Dong <eric.dong@intel.com<mailto:eric.dong@intel.com>>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
---
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.
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016, Microsoft Corporation<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
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 <Library/PcdLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
+#include <Protocol/BootLogo2.h>
/**
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 = NULL;
}
+ //
+ // Try to open Boot Logo 2 Protocol.
+ //
+ Status = gBS->LocateProtocol (&gEdkiiBootLogo2ProtocolGuid, NULL, (VOID **) &BootLogo2);
+ if (EFI_ERROR (Status)) {
+ BootLogo2 = NULL;
+ }
+
//
// Erase Cursor from screen
//
@@ -330,7 +341,12 @@ BootLogoEnableLogo (
}
if (!EFI_ERROR (Status)) {
- BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ if (BootLogo != NULL) {
+ BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
+ if (BootLogo2 != NULL) {
+ BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
+ }
}
FreePool (LogoBlt);
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/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.
#
# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2016, Microsoft Corporation<BR>
# This program and the accompanying materials are licensed and made available under
# the terms and conditions of the BSD License that accompanies this distribution.
# 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
+ gEdkiiBootLogo2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiUserManagerProtocolGuid ## CONSUMES
gEdkiiPlatformLogoProtocolGuid ## CONSUMES
--
2.14.2.windows.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-02-15 22:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 2:07 [Patch 0/3] MdeModulePkg: Add Boot Logo 2 Protocol Kinney, Michael D
2018-02-14 2:07 ` [Patch 1/3] " Kinney, Michael D
2018-02-14 2:07 ` [Patch 2/3] MdeModulePkg/BootGraphicsResourceDxe: " Kinney, Michael D
2018-02-14 2:07 ` [Patch 3/3] MdeModulePkg/BootLogoLib: Use " Kinney, Michael D
2018-02-14 3:20 ` Sean Brogan
2018-02-15 22:52 ` Kinney, Michael D
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox