2 BDS Lib functions which contain all the code to connect console device
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "InternalBdsLib.h"
13 Check if we need to save the EFI variable with "ConVarName" as name
15 If ConVarName is NULL, then ASSERT().
17 @param ConVarName The name of the EFI variable.
19 @retval TRUE Set the EFI variable as NV type.
20 @retval FALSE EFI variable as NV type can be set NonNV.
29 ASSERT (ConVarName
!= NULL
);
34 // If the variable includes "Dev" at last, we consider
35 // it does not support NV attribute.
37 while (*Ptr
!= L
'\0') {
41 if (((INTN
)((UINTN
)Ptr
- (UINTN
)ConVarName
) / sizeof (CHAR16
)) <= 3) {
45 if ((*(Ptr
- 3) == 'D') && (*(Ptr
- 2) == 'e') && (*(Ptr
- 1) == 'v')) {
53 Fill console handle in System Table if there are no valid console handle in.
55 Firstly, check the validation of console handle in System Table. If it is invalid,
56 update it by the first console device handle from EFI console variable.
58 @param VarName The name of the EFI console variable.
59 @param ConsoleGuid Specified Console protocol GUID.
60 @param ConsoleHandle On IN, console handle in System Table to be checked.
61 On OUT, new console handle in system table.
62 @param ProtocolInterface On IN, console protocol on console handle in System Table to be checked.
63 On OUT, new console protocol on new console handle in system table.
65 @retval TRUE System Table has been updated.
66 @retval FALSE System Table hasn't been updated.
70 UpdateSystemTableConsole (
72 IN EFI_GUID
*ConsoleGuid
,
73 IN OUT EFI_HANDLE
*ConsoleHandle
,
74 IN OUT VOID
**ProtocolInterface
79 EFI_DEVICE_PATH_PROTOCOL
*FullDevicePath
;
80 EFI_DEVICE_PATH_PROTOCOL
*VarConsole
;
81 EFI_DEVICE_PATH_PROTOCOL
*Instance
;
84 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*TextOut
;
86 ASSERT (VarName
!= NULL
);
87 ASSERT (ConsoleHandle
!= NULL
);
88 ASSERT (ConsoleGuid
!= NULL
);
89 ASSERT (ProtocolInterface
!= NULL
);
91 if (*ConsoleHandle
!= NULL
) {
92 Status
= gBS
->HandleProtocol (
97 if (Status
== EFI_SUCCESS
&& Interface
== *ProtocolInterface
) {
99 // If ConsoleHandle is valid and console protocol on this handle also
100 // also matched, just return.
107 // Get all possible consoles device path from EFI variable
109 VarConsole
= BdsLibGetVariableAndSize (
111 &gEfiGlobalVariableGuid
,
114 if (VarConsole
== NULL
) {
116 // If there is no any console device, just return.
121 FullDevicePath
= VarConsole
;
125 // Check every instance of the console variable
127 Instance
= GetNextDevicePathInstance (&VarConsole
, &DevicePathSize
);
128 if (Instance
== NULL
) {
129 FreePool (FullDevicePath
);
134 // Find console device handle by device path instance
136 Status
= gBS
->LocateDevicePath (
141 if (!EFI_ERROR (Status
)) {
143 // Get the console protocol on this console device handle
145 Status
= gBS
->HandleProtocol (
150 if (!EFI_ERROR (Status
)) {
152 // Update new console handle in System Table.
154 *ConsoleHandle
= NewHandle
;
155 *ProtocolInterface
= Interface
;
156 if (CompareGuid (ConsoleGuid
, &gEfiSimpleTextOutProtocolGuid
)) {
158 // If it is console out device, set console mode 80x25 if current mode is invalid.
160 TextOut
= (EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*) Interface
;
161 if (TextOut
->Mode
->Mode
== -1) {
162 TextOut
->SetMode (TextOut
, 0);
169 } while (Instance
!= NULL
);
172 // No any available console devcie found.
178 This function update console variable based on ConVarName, it can
179 add or remove one specific console device path from the variable
181 @param ConVarName Console related variable name, ConIn, ConOut,
183 @param CustomizedConDevicePath The console device path which will be added to
184 the console variable ConVarName, this parameter
185 can not be multi-instance.
186 @param ExclusiveDevicePath The console device path which will be removed
187 from the console variable ConVarName, this
188 parameter can not be multi-instance.
190 @retval EFI_UNSUPPORTED The added device path is same to the removed one.
191 @retval EFI_SUCCESS Success add or remove the device path from the
197 BdsLibUpdateConsoleVariable (
198 IN CHAR16
*ConVarName
,
199 IN EFI_DEVICE_PATH_PROTOCOL
*CustomizedConDevicePath
,
200 IN EFI_DEVICE_PATH_PROTOCOL
*ExclusiveDevicePath
204 EFI_DEVICE_PATH_PROTOCOL
*VarConsole
;
205 UINTN DevicePathSize
;
206 EFI_DEVICE_PATH_PROTOCOL
*NewDevicePath
;
207 EFI_DEVICE_PATH_PROTOCOL
*TempNewDevicePath
;
214 // Notes: check the device path point, here should check
215 // with compare memory
217 if (CustomizedConDevicePath
== ExclusiveDevicePath
) {
218 return EFI_UNSUPPORTED
;
221 // Delete the ExclusiveDevicePath from current default console
223 VarConsole
= BdsLibGetVariableAndSize (
225 &gEfiGlobalVariableGuid
,
230 // Initialize NewDevicePath
232 NewDevicePath
= VarConsole
;
235 // If ExclusiveDevicePath is even the part of the instance in VarConsole, delete it.
236 // In the end, NewDevicePath is the final device path.
238 if (ExclusiveDevicePath
!= NULL
&& VarConsole
!= NULL
) {
239 NewDevicePath
= BdsLibDelPartMatchInstance (VarConsole
, ExclusiveDevicePath
);
242 // Try to append customized device path to NewDevicePath.
244 if (CustomizedConDevicePath
!= NULL
) {
245 if (!BdsLibMatchDevicePaths (NewDevicePath
, CustomizedConDevicePath
)) {
247 // Check if there is part of CustomizedConDevicePath in NewDevicePath, delete it.
249 NewDevicePath
= BdsLibDelPartMatchInstance (NewDevicePath
, CustomizedConDevicePath
);
251 // In the first check, the default console variable will be _ModuleEntryPoint,
252 // just append current customized device path
254 TempNewDevicePath
= NewDevicePath
;
255 NewDevicePath
= AppendDevicePathInstance (NewDevicePath
, CustomizedConDevicePath
);
256 if (TempNewDevicePath
!= NULL
) {
257 FreePool(TempNewDevicePath
);
263 // The attribute for ConInDev, ConOutDev and ErrOutDev does not include NV.
265 if (IsNvNeed(ConVarName
)) {
267 // ConVarName has NV attribute.
269 Attributes
= EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS
| EFI_VARIABLE_NON_VOLATILE
;
272 // ConVarName does not have NV attribute.
274 Attributes
= EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS
;
278 // Finally, Update the variable of the default console by NewDevicePath
280 DevicePathSize
= GetDevicePathSize (NewDevicePath
);
281 Status
= SetVariableAndReportStatusCodeOnError (
283 &gEfiGlobalVariableGuid
,
288 if ((DevicePathSize
== 0) && (Status
== EFI_NOT_FOUND
)) {
289 Status
= EFI_SUCCESS
;
292 if (VarConsole
== NewDevicePath
) {
293 if (VarConsole
!= NULL
) {
294 FreePool(VarConsole
);
297 if (VarConsole
!= NULL
) {
298 FreePool(VarConsole
);
300 if (NewDevicePath
!= NULL
) {
301 FreePool(NewDevicePath
);
311 Connect the console device base on the variable ConVarName, if
312 device path of the ConVarName is multi-instance device path and
313 anyone of the instances is connected success, then this function
315 If the handle associate with one device path node can not
316 be created successfully, then still give chance to do the dispatch,
317 which load the missing drivers if possible..
319 @param ConVarName Console related variable name, ConIn, ConOut,
322 @retval EFI_NOT_FOUND There is not any console devices connected
324 @retval EFI_SUCCESS Success connect any one instance of the console
325 device path base on the variable ConVarName.
330 BdsLibConnectConsoleVariable (
331 IN CHAR16
*ConVarName
335 EFI_DEVICE_PATH_PROTOCOL
*StartDevicePath
;
337 EFI_DEVICE_PATH_PROTOCOL
*Instance
;
338 EFI_DEVICE_PATH_PROTOCOL
*Next
;
339 EFI_DEVICE_PATH_PROTOCOL
*CopyOfDevicePath
;
343 Status
= EFI_SUCCESS
;
347 // Check if the console variable exist
349 StartDevicePath
= BdsLibGetVariableAndSize (
351 &gEfiGlobalVariableGuid
,
354 if (StartDevicePath
== NULL
) {
355 return EFI_UNSUPPORTED
;
358 CopyOfDevicePath
= StartDevicePath
;
361 // Check every instance of the console variable
363 Instance
= GetNextDevicePathInstance (&CopyOfDevicePath
, &Size
);
364 if (Instance
== NULL
) {
365 FreePool (StartDevicePath
);
366 return EFI_UNSUPPORTED
;
370 while (!IsDevicePathEndType (Next
)) {
371 Next
= NextDevicePathNode (Next
);
374 SetDevicePathEndNode (Next
);
376 // Connect the USB console
377 // USB console device path is a short-form device path that
378 // starts with the first element being a USB WWID
379 // or a USB Class device path
381 if ((DevicePathType (Instance
) == MESSAGING_DEVICE_PATH
) &&
382 ((DevicePathSubType (Instance
) == MSG_USB_CLASS_DP
)
383 || (DevicePathSubType (Instance
) == MSG_USB_WWID_DP
)
385 Status
= BdsLibConnectUsbDevByShortFormDP (0xFF, Instance
);
386 if (!EFI_ERROR (Status
)) {
391 // Connect the instance device path
393 Status
= BdsLibConnectDevicePath (Instance
);
395 if (EFI_ERROR (Status
)) {
397 // Delete the instance from the console varialbe
399 BdsLibUpdateConsoleVariable (ConVarName
, NULL
, Instance
);
405 } while (CopyOfDevicePath
!= NULL
);
407 FreePool (StartDevicePath
);
410 return EFI_NOT_FOUND
;
417 This function will search every simpletext device in current system,
418 and make every simpletext device as pertantial console device.
423 BdsLibConnectAllConsoles (
428 EFI_DEVICE_PATH_PROTOCOL
*ConDevicePath
;
430 EFI_HANDLE
*HandleBuffer
;
435 ConDevicePath
= NULL
;
438 // Update all the console variables
440 gBS
->LocateHandleBuffer (
442 &gEfiSimpleTextInProtocolGuid
,
448 for (Index
= 0; Index
< HandleCount
; Index
++) {
449 gBS
->HandleProtocol (
451 &gEfiDevicePathProtocolGuid
,
452 (VOID
**) &ConDevicePath
454 BdsLibUpdateConsoleVariable (L
"ConIn", ConDevicePath
, NULL
);
457 if (HandleBuffer
!= NULL
) {
458 FreePool(HandleBuffer
);
462 gBS
->LocateHandleBuffer (
464 &gEfiSimpleTextOutProtocolGuid
,
469 for (Index
= 0; Index
< HandleCount
; Index
++) {
470 gBS
->HandleProtocol (
472 &gEfiDevicePathProtocolGuid
,
473 (VOID
**) &ConDevicePath
475 BdsLibUpdateConsoleVariable (L
"ConOut", ConDevicePath
, NULL
);
476 BdsLibUpdateConsoleVariable (L
"ErrOut", ConDevicePath
, NULL
);
479 if (HandleBuffer
!= NULL
) {
480 FreePool(HandleBuffer
);
484 // Connect all console variables
486 BdsLibConnectAllDefaultConsoles ();
491 This function will connect console device base on the console
492 device variable ConIn, ConOut and ErrOut.
494 @retval EFI_SUCCESS At least one of the ConIn and ConOut device have
495 been connected success.
496 @retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
501 BdsLibConnectAllDefaultConsoles (
506 BOOLEAN SystemTableUpdated
;
509 // Connect all default console variables
513 // It seems impossible not to have any ConOut device on platform,
514 // so we check the status here.
516 Status
= BdsLibConnectConsoleVariable (L
"ConOut");
517 if (EFI_ERROR (Status
)) {
522 // Insert the performance probe for Console Out
524 PERF_START (NULL
, "ConOut", "BDS", 1);
525 PERF_END (NULL
, "ConOut", "BDS", 0);
528 // Because possibly the platform is legacy free, in such case,
529 // ConIn devices (Serial Port and PS2 Keyboard ) does not exist,
530 // so we need not check the status.
532 BdsLibConnectConsoleVariable (L
"ConIn");
535 // The _ModuleEntryPoint err out var is legal.
537 BdsLibConnectConsoleVariable (L
"ErrOut");
539 SystemTableUpdated
= FALSE
;
541 // Fill console handles in System Table if no console device assignd.
543 if (UpdateSystemTableConsole (L
"ConIn", &gEfiSimpleTextInProtocolGuid
, &gST
->ConsoleInHandle
, (VOID
**) &gST
->ConIn
)) {
544 SystemTableUpdated
= TRUE
;
546 if (UpdateSystemTableConsole (L
"ConOut", &gEfiSimpleTextOutProtocolGuid
, &gST
->ConsoleOutHandle
, (VOID
**) &gST
->ConOut
)) {
547 SystemTableUpdated
= TRUE
;
549 if (UpdateSystemTableConsole (L
"ErrOut", &gEfiSimpleTextOutProtocolGuid
, &gST
->StandardErrorHandle
, (VOID
**) &gST
->StdErr
)) {
550 SystemTableUpdated
= TRUE
;
553 if (SystemTableUpdated
) {
555 // Update the CRC32 in the EFI System Table header
558 gBS
->CalculateCrc32 (
570 This function will connect console device except ConIn base on the console
571 device variable ConOut and ErrOut.
573 @retval EFI_SUCCESS At least one of the ConOut device have
574 been connected success.
575 @retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
580 BdsLibConnectAllDefaultConsolesWithOutConIn (
585 BOOLEAN SystemTableUpdated
;
588 // Connect all default console variables except ConIn
592 // It seems impossible not to have any ConOut device on platform,
593 // so we check the status here.
595 Status
= BdsLibConnectConsoleVariable (L
"ConOut");
596 if (EFI_ERROR (Status
)) {
601 // Insert the performance probe for Console Out
603 PERF_START (NULL
, "ConOut", "BDS", 1);
604 PERF_END (NULL
, "ConOut", "BDS", 0);
607 // The _ModuleEntryPoint err out var is legal.
609 BdsLibConnectConsoleVariable (L
"ErrOut");
611 SystemTableUpdated
= FALSE
;
613 // Fill console handles in System Table if no console device assignd.
615 if (UpdateSystemTableConsole (L
"ConOut", &gEfiSimpleTextOutProtocolGuid
, &gST
->ConsoleOutHandle
, (VOID
**) &gST
->ConOut
)) {
616 SystemTableUpdated
= TRUE
;
618 if (UpdateSystemTableConsole (L
"ErrOut", &gEfiSimpleTextOutProtocolGuid
, &gST
->StandardErrorHandle
, (VOID
**) &gST
->StdErr
)) {
619 SystemTableUpdated
= TRUE
;
622 if (SystemTableUpdated
) {
624 // Update the CRC32 in the EFI System Table header
627 gBS
->CalculateCrc32 (
639 Use SystemTable Conout to stop video based Simple Text Out consoles from going
640 to the video device. Put up LogoFile on every video device that is a console.
642 @param[in] LogoFile File name of logo to display on the center of the screen.
644 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
645 @retval EFI_UNSUPPORTED Logo not found
651 IN EFI_GUID
*LogoFile
655 EFI_OEM_BADGING_PROTOCOL
*Badging
;
664 EFI_BADGING_FORMAT Format
;
665 EFI_BADGING_DISPLAY_ATTRIBUTE Attribute
;
670 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*Blt
;
671 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
674 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
675 EFI_BOOT_LOGO_PROTOCOL
*BootLogo
;
677 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*LogoBlt
;
690 // Try to open GOP first
692 Status
= gBS
->HandleProtocol (gST
->ConsoleOutHandle
, &gEfiGraphicsOutputProtocolGuid
, (VOID
**) &GraphicsOutput
);
693 if (EFI_ERROR (Status
) && FeaturePcdGet (PcdUgaConsumeSupport
)) {
694 GraphicsOutput
= NULL
;
696 // Open GOP failed, try to open UGA
698 Status
= gBS
->HandleProtocol (gST
->ConsoleOutHandle
, &gEfiUgaDrawProtocolGuid
, (VOID
**) &UgaDraw
);
700 if (EFI_ERROR (Status
)) {
701 return EFI_UNSUPPORTED
;
705 // Try to open Boot Logo Protocol.
708 gBS
->LocateProtocol (&gEfiBootLogoProtocolGuid
, NULL
, (VOID
**) &BootLogo
);
711 // Erase Cursor from screen
713 gST
->ConOut
->EnableCursor (gST
->ConOut
, FALSE
);
716 Status
= gBS
->LocateProtocol (&gEfiOEMBadgingProtocolGuid
, NULL
, (VOID
**) &Badging
);
718 if (GraphicsOutput
!= NULL
) {
719 SizeOfX
= GraphicsOutput
->Mode
->Info
->HorizontalResolution
;
720 SizeOfY
= GraphicsOutput
->Mode
->Info
->VerticalResolution
;
722 } else if (UgaDraw
!= NULL
&& FeaturePcdGet (PcdUgaConsumeSupport
)) {
723 Status
= UgaDraw
->GetMode (UgaDraw
, &SizeOfX
, &SizeOfY
, &ColorDepth
, &RefreshRate
);
724 if (EFI_ERROR (Status
)) {
725 return EFI_UNSUPPORTED
;
728 return EFI_UNSUPPORTED
;
746 if (Badging
!= NULL
) {
748 // Get image from OEMBadging protocol.
750 Status
= Badging
->GetImage (
760 if (EFI_ERROR (Status
)) {
765 // Currently only support BMP format.
767 if (Format
!= EfiBadgingFormatBMP
) {
768 if (ImageData
!= NULL
) {
769 FreePool (ImageData
);
775 // Get the specified image from FV.
777 Status
= GetSectionFromAnyFv (LogoFile
, EFI_SECTION_RAW
, 0, (VOID
**) &ImageData
, &ImageSize
);
778 if (EFI_ERROR (Status
)) {
779 return EFI_UNSUPPORTED
;
784 if (!FeaturePcdGet(PcdBootlogoOnlyEnable
)) {
785 Attribute
= EfiBadgingDisplayAttributeCenter
;
787 Attribute
= EfiBadgingDisplayAttributeCustomized
;
795 Status
= TranslateBmpToGopBlt (
803 if (EFI_ERROR (Status
)) {
804 FreePool (ImageData
);
806 if (Badging
== NULL
) {
814 // Calculate the display position according to Attribute.
817 case EfiBadgingDisplayAttributeLeftTop
:
822 case EfiBadgingDisplayAttributeCenterTop
:
823 DestX
= (SizeOfX
- Width
) / 2;
827 case EfiBadgingDisplayAttributeRightTop
:
828 DestX
= (SizeOfX
- Width
- CoordinateX
);
829 DestY
= CoordinateY
;;
832 case EfiBadgingDisplayAttributeCenterRight
:
833 DestX
= (SizeOfX
- Width
- CoordinateX
);
834 DestY
= (SizeOfY
- Height
) / 2;
837 case EfiBadgingDisplayAttributeRightBottom
:
838 DestX
= (SizeOfX
- Width
- CoordinateX
);
839 DestY
= (SizeOfY
- Height
- CoordinateY
);
842 case EfiBadgingDisplayAttributeCenterBottom
:
843 DestX
= (SizeOfX
- Width
) / 2;
844 DestY
= (SizeOfY
- Height
- CoordinateY
);
847 case EfiBadgingDisplayAttributeLeftBottom
:
849 DestY
= (SizeOfY
- Height
- CoordinateY
);
852 case EfiBadgingDisplayAttributeCenterLeft
:
854 DestY
= (SizeOfY
- Height
) / 2;
857 case EfiBadgingDisplayAttributeCenter
:
858 DestX
= (SizeOfX
- Width
) / 2;
859 DestY
= (SizeOfY
- Height
) / 2;
862 case EfiBadgingDisplayAttributeCustomized
:
863 DestX
= (SizeOfX
- Width
) / 2;
864 DestY
= ((SizeOfY
* 382) / 1000) - Height
/ 2;
873 if ((DestX
>= 0) && (DestY
>= 0)) {
874 if (GraphicsOutput
!= NULL
) {
875 Status
= GraphicsOutput
->Blt (
885 Width
* sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL
)
887 } else if (UgaDraw
!= NULL
&& FeaturePcdGet (PcdUgaConsumeSupport
)) {
888 Status
= UgaDraw
->Blt (
890 (EFI_UGA_PIXEL
*) Blt
,
891 EfiUgaBltBufferToVideo
,
898 Width
* sizeof (EFI_UGA_PIXEL
)
901 Status
= EFI_UNSUPPORTED
;
905 // Report displayed Logo information.
907 if (!EFI_ERROR (Status
)) {
910 if (LogoWidth
== 0) {
914 LogoDestX
= (UINTN
) DestX
;
915 LogoDestY
= (UINTN
) DestY
;
920 // Merge new logo with old one.
922 NewDestX
= MIN ((UINTN
) DestX
, LogoDestX
);
923 NewDestY
= MIN ((UINTN
) DestY
, LogoDestY
);
924 NewWidth
= MAX ((UINTN
) DestX
+ Width
, LogoDestX
+ LogoWidth
) - NewDestX
;
925 NewHeight
= MAX ((UINTN
) DestY
+ Height
, LogoDestY
+ LogoHeight
) - NewDestY
;
927 LogoDestX
= NewDestX
;
928 LogoDestY
= NewDestY
;
929 LogoWidth
= NewWidth
;
930 LogoHeight
= NewHeight
;
935 FreePool (ImageData
);
937 if (Badging
== NULL
) {
943 if (BootLogo
== NULL
|| NumberOfLogos
== 0) {
945 // No logo displayed.
955 // Advertise displayed Logo information.
957 if (NumberOfLogos
== 1) {
959 // Only one logo displayed, use its Blt buffer directly for BootLogo protocol.
962 Status
= EFI_SUCCESS
;
965 // More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation.
972 // Ensure the LogoHeight * LogoWidth doesn't overflow
974 if (LogoHeight
> DivU64x64Remainder ((UINTN
) ~0, LogoWidth
, NULL
)) {
975 return EFI_UNSUPPORTED
;
977 BufferSize
= MultU64x64 (LogoWidth
, LogoHeight
);
980 // Ensure the BufferSize * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) doesn't overflow
982 if (BufferSize
> DivU64x32 ((UINTN
) ~0, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL
))) {
983 return EFI_UNSUPPORTED
;
986 LogoBlt
= AllocateZeroPool ((UINTN
)BufferSize
* sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL
));
987 if (LogoBlt
== NULL
) {
988 return EFI_OUT_OF_RESOURCES
;
991 if (GraphicsOutput
!= NULL
) {
992 Status
= GraphicsOutput
->Blt (
995 EfiBltVideoToBltBuffer
,
1002 LogoWidth
* sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL
)
1004 } else if (UgaDraw
!= NULL
&& FeaturePcdGet (PcdUgaConsumeSupport
)) {
1005 Status
= UgaDraw
->Blt (
1007 (EFI_UGA_PIXEL
*) LogoBlt
,
1008 EfiUgaVideoToBltBuffer
,
1015 LogoWidth
* sizeof (EFI_UGA_PIXEL
)
1018 Status
= EFI_UNSUPPORTED
;
1022 if (!EFI_ERROR (Status
)) {
1023 BootLogo
->SetBootLogo (BootLogo
, LogoBlt
, LogoDestX
, LogoDestY
, LogoWidth
, LogoHeight
);
1031 Use SystemTable Conout to turn on video based Simple Text Out consoles. The
1032 Simple Text Out screens will now be synced up with all non video output devices
1034 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
1045 // Enable Cursor on Screen
1047 gST
->ConOut
->EnableCursor (gST
->ConOut
, TRUE
);