to show progress bar and LOGO.\r
\r
Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016, Microsoft Corporation<BR>\r
This program and the accompanying materials are licensed and made available under\r
the terms and conditions of the BSD License that accompanies this distribution.\r
The full text of the license may be found at\r
#include <Protocol/PlatformLogo.h>\r
#include <Protocol/UgaDraw.h>\r
#include <Protocol/BootLogo.h>\r
+#include <Protocol/BootLogo2.h>\r
#include <Library/BaseLib.h>\r
#include <Library/UefiLib.h>\r
#include <Library/BaseMemoryLib.h>\r
UINT32 RefreshRate;\r
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
EFI_BOOT_LOGO_PROTOCOL *BootLogo;\r
+ EDKII_BOOT_LOGO2_PROTOCOL *BootLogo2;\r
UINTN NumberOfLogos;\r
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LogoBlt;\r
UINTN LogoDestX;\r
BootLogo = NULL;\r
}\r
\r
+ //\r
+ // Try to open Boot Logo 2 Protocol.\r
+ //\r
+ Status = gBS->LocateProtocol (&gEdkiiBootLogo2ProtocolGuid, NULL, (VOID **) &BootLogo2);\r
+ if (EFI_ERROR (Status)) {\r
+ BootLogo2 = NULL;\r
+ }\r
+\r
//\r
// Erase Cursor from screen\r
//\r
break;\r
}\r
\r
- if (EFI_ERROR (Status)) {\r
- continue;\r
- }\r
-\r
if (Blt != NULL) {\r
FreePool (Blt);\r
}\r
}\r
}\r
\r
- if (BootLogo == NULL || NumberOfLogos == 0) {\r
+ if ((BootLogo == NULL && BootLogo2 == NULL) || NumberOfLogos == 0) {\r
//\r
// No logo displayed.\r
//\r
}\r
\r
if (!EFI_ERROR (Status)) {\r
- BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);\r
+ //\r
+ // Attempt to register logo with Boot Logo 2 Protocol first\r
+ //\r
+ if (BootLogo2 != NULL) {\r
+ Status = BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);\r
+ }\r
+ //\r
+ // If Boot Logo 2 Protocol is not available or registration with Boot Logo 2\r
+ // Protocol failed, then attempt to register logo with Boot Logo Protocol\r
+ //\r
+ if (EFI_ERROR (Status) && BootLogo != NULL) {\r
+ Status = BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);\r
+ }\r
+ //\r
+ // Status of this function is EFI_SUCCESS even if registration with Boot\r
+ // Logo 2 Protocol or Boot Logo Protocol fails.\r
+ //\r
+ Status = EFI_SUCCESS;\r
}\r
FreePool (LogoBlt);\r
\r