40 EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute;
66 Status =
gBS->LocateProtocol (&gEdkiiPlatformLogoProtocolGuid,
NULL, (VOID **)&PlatformLogo);
67 if (EFI_ERROR (Status)) {
68 return EFI_UNSUPPORTED;
75 Status =
gBS->HandleProtocol (
gST->
ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **)&GraphicsOutput);
76 if (EFI_ERROR (Status) &&
FeaturePcdGet (PcdUgaConsumeSupport)) {
77 GraphicsOutput =
NULL;
82 if (EFI_ERROR (Status)) {
87 if (EFI_ERROR (Status)) {
88 return EFI_UNSUPPORTED;
94 Status =
gBS->LocateProtocol (&gEfiBootLogoProtocolGuid,
NULL, (VOID **)&BootLogo);
95 if (EFI_ERROR (Status)) {
102 Status =
gBS->LocateProtocol (&gEdkiiBootLogo2ProtocolGuid,
NULL, (VOID **)&BootLogo2);
103 if (EFI_ERROR (Status)) {
112 if (GraphicsOutput !=
NULL) {
116 ASSERT (UgaDraw !=
NULL);
117 Status = UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth, &RefreshRate);
118 if (EFI_ERROR (Status)) {
119 return EFI_UNSUPPORTED;
138 Status = PlatformLogo->GetImage (
146 if (EFI_ERROR (Status)) {
160 case EdkiiPlatformLogoDisplayAttributeLeftTop:
164 case EdkiiPlatformLogoDisplayAttributeCenterTop:
165 DestX = (SizeOfX - Image.Width) / 2;
168 case EdkiiPlatformLogoDisplayAttributeRightTop:
169 DestX = SizeOfX - Image.Width;
173 case EdkiiPlatformLogoDisplayAttributeCenterLeft:
175 DestY = (SizeOfY - Image.Height) / 2;
177 case EdkiiPlatformLogoDisplayAttributeCenter:
178 DestX = (SizeOfX - Image.Width) / 2;
179 DestY = (SizeOfY - Image.Height) / 2;
181 case EdkiiPlatformLogoDisplayAttributeCenterRight:
182 DestX = SizeOfX - Image.Width;
183 DestY = (SizeOfY - Image.Height) / 2;
186 case EdkiiPlatformLogoDisplayAttributeLeftBottom:
188 DestY = SizeOfY - Image.Height;
190 case EdkiiPlatformLogoDisplayAttributeCenterBottom:
191 DestX = (SizeOfX - Image.Width) / 2;
192 DestY = SizeOfY - Image.Height;
194 case EdkiiPlatformLogoDisplayAttributeRightBottom:
195 DestX = SizeOfX - Image.Width;
196 DestY = SizeOfY - Image.Height;
208 if ((DestX >= 0) && (DestY >= 0)) {
209 if (GraphicsOutput !=
NULL) {
210 Status = GraphicsOutput->Blt (
223 ASSERT (UgaDraw !=
NULL);
224 Status = UgaDraw->Blt (
241 if (!EFI_ERROR (Status)) {
244 if (NumberOfLogos == 1) {
248 LogoDestX = (
UINTN)DestX;
249 LogoDestY = (
UINTN)DestY;
250 LogoWidth = Image.Width;
251 LogoHeight = Image.Height;
256 NewDestX =
MIN ((
UINTN)DestX, LogoDestX);
257 NewDestY =
MIN ((
UINTN)DestY, LogoDestY);
258 LogoWidth =
MAX ((
UINTN)DestX + Image.Width, LogoDestX + LogoWidth) - NewDestX;
259 LogoHeight =
MAX ((
UINTN)DestY + Image.Height, LogoDestY + LogoHeight) - NewDestY;
261 LogoDestX = NewDestX;
262 LogoDestY = NewDestY;
268 if (((BootLogo ==
NULL) && (BootLogo2 ==
NULL)) || (NumberOfLogos == 0)) {
282 if (NumberOfLogos == 1) {
300 return EFI_UNSUPPORTED;
306 if (LogoBlt ==
NULL) {
307 return EFI_OUT_OF_RESOURCES;
310 if (GraphicsOutput !=
NULL) {
311 Status = GraphicsOutput->Blt (
324 Status = UgaDraw->Blt (
339 if (!EFI_ERROR (Status)) {
343 if (BootLogo2 !=
NULL) {
344 Status = BootLogo2->SetBootLogo (BootLogo2, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
351 if (EFI_ERROR (Status) && (BootLogo !=
NULL)) {
352 Status = BootLogo->SetBootLogo (BootLogo, LogoBlt, LogoDestX, LogoDestY, LogoWidth, LogoHeight);
427 if (Progress > 100) {
428 return EFI_INVALID_PARAMETER;
432 Status =
gBS->HandleProtocol (
gST->
ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **)&GraphicsOutput);
433 if (EFI_ERROR (Status) &&
FeaturePcdGet (PcdUgaConsumeSupport)) {
434 GraphicsOutput =
NULL;
437 if (EFI_ERROR (Status)) {
442 if (EFI_ERROR (Status)) {
443 return EFI_UNSUPPORTED;
448 if (GraphicsOutput !=
NULL) {
451 }
else if (UgaDraw !=
NULL) {
452 Status = UgaDraw->GetMode (
459 if (EFI_ERROR (Status)) {
460 return EFI_UNSUPPORTED;
463 return EFI_UNSUPPORTED;
466 BlockWidth = SizeOfX / 100;
467 BlockHeight = SizeOfY / 50;
472 PosY = SizeOfY * 48 / 50;
480 if (GraphicsOutput !=
NULL) {
481 Status = GraphicsOutput->Blt (
488 PosY - EFI_GLYPH_HEIGHT - 1,
490 SizeOfY - (PosY - EFI_GLYPH_HEIGHT - 1),
494 Status = UgaDraw->Blt (
501 PosY - EFI_GLYPH_HEIGHT - 1,
503 SizeOfY - (PosY - EFI_GLYPH_HEIGHT - 1),
507 return EFI_UNSUPPORTED;
514 for (Index = PreviousValue; Index < BlockNum; Index++) {
515 PosX = Index * BlockWidth;
516 if (GraphicsOutput !=
NULL) {
517 Status = GraphicsOutput->Blt (
530 Status = UgaDraw->Blt (
543 return EFI_UNSUPPORTED;
548 (SizeOfX -
StrLen (Title) * EFI_GLYPH_WIDTH) / 2,
549 PosY - EFI_GLYPH_HEIGHT - 1,
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
EFI_STATUS EFIAPI BootLogoUpdateProgress(IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleForeground, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL TitleBackground, IN CHAR16 *Title, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL ProgressColor, IN UINTN Progress, IN UINTN PreviousValue)
EFI_STATUS EFIAPI BootLogoDisableLogo(VOID)
EFI_STATUS EFIAPI BootLogoEnableLogo(VOID)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define FeaturePcdGet(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
UINTN EFIAPI PrintXY(IN UINTN PointX, IN UINTN PointY, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, IN CONST CHAR16 *Format,...)
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE * Mode
UINT32 VerticalResolution
UINT32 HorizontalResolution
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION * Info
EFI_HANDLE ConsoleOutHandle
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut