2 BDS Lib functions which contain all the code to connect console device
4 Copyright (c) 2004 - 2009, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "InternalBdsLib.h"
19 Check if we need to save the EFI variable with "ConVarName" as name
22 @param ConVarName The name of the EFI variable.
24 @retval TRUE Set the EFI variable as NV type.
25 @retval FALSE EFI variable as NV type can be set NonNV.
37 // If the variable includes "Dev" at last, we consider
38 // it does not support NV attribute.
40 while (*Ptr
!= L
'\0') {
44 if ((*(Ptr
- 3) == 'D') && (*(Ptr
- 2) == 'e') && (*(Ptr
- 1) == 'v')) {
52 Fill console handle in System Table if there are no valid console handle in.
54 Firstly, check the validation of console handle in System Table. If it is invalid,
55 update it by the first console device handle from EFI console variable.
57 @param VarName The name of the EFI console variable.
58 @param ConsoleGuid Specified Console protocol GUID.
59 @param ConsoleHandle On IN, console handle in System Table to be checked.
60 On OUT, new console hanlde in system table.
61 @param ProtocolInterface On IN, console protocol on console handle in System Table to be checked.
62 On OUT, new console protocol on new console hanlde in system table.
64 @retval TRUE System Table has been updated.
65 @retval FALSE System Table hasn't been updated.
69 UpdateSystemTableConsole (
71 IN EFI_GUID
*ConsoleGuid
,
72 IN OUT EFI_HANDLE
*ConsoleHandle
,
73 IN OUT VOID
**ProtocolInterface
78 EFI_DEVICE_PATH_PROTOCOL
*FullDevicePath
;
79 EFI_DEVICE_PATH_PROTOCOL
*VarConsole
;
80 EFI_DEVICE_PATH_PROTOCOL
*Instance
;
84 ASSERT (VarName
!= NULL
);
85 ASSERT (ConsoleHandle
!= NULL
);
86 ASSERT (ConsoleGuid
!= NULL
);
87 ASSERT (ProtocolInterface
!= NULL
);
89 if (*ConsoleHandle
!= NULL
) {
90 Status
= gBS
->HandleProtocol (
95 if (Status
== EFI_SUCCESS
&& Interface
== *ProtocolInterface
) {
97 // If ConsoleHandle is valid and console protocol on this handle also
98 // also matched, just return.
105 // Get all possible consoles device path from EFI variable
107 VarConsole
= BdsLibGetVariableAndSize (
109 &gEfiGlobalVariableGuid
,
112 if (VarConsole
== NULL
) {
114 // If there is no any console device, just return.
119 FullDevicePath
= VarConsole
;
123 // Check every instance of the console variable
125 Instance
= GetNextDevicePathInstance (&VarConsole
, &DevicePathSize
);
126 if (Instance
== NULL
) {
127 FreePool (FullDevicePath
);
132 // Find console device handle by device path instance
134 Status
= gBS
->LocateDevicePath (
139 if (!EFI_ERROR (Status
)) {
141 // Get the console protocol on this console device handle
143 Status
= gBS
->HandleProtocol (
148 if (!EFI_ERROR (Status
)) {
150 // Update new console handle in System Table.
152 *ConsoleHandle
= NewHandle
;
153 *ProtocolInterface
= Interface
;
158 } while (Instance
!= NULL
);
161 // No any available console devcie found.
167 This function update console variable based on ConVarName, it can
168 add or remove one specific console device path from the variable
170 @param ConVarName Console related variable name, ConIn, ConOut,
172 @param CustomizedConDevicePath The console device path which will be added to
173 the console variable ConVarName, this parameter
174 can not be multi-instance.
175 @param ExclusiveDevicePath The console device path which will be removed
176 from the console variable ConVarName, this
177 parameter can not be multi-instance.
179 @retval EFI_UNSUPPORTED The added device path is same to the removed one.
180 @retval EFI_SUCCESS Success add or remove the device path from the
186 BdsLibUpdateConsoleVariable (
187 IN CHAR16
*ConVarName
,
188 IN EFI_DEVICE_PATH_PROTOCOL
*CustomizedConDevicePath
,
189 IN EFI_DEVICE_PATH_PROTOCOL
*ExclusiveDevicePath
192 EFI_DEVICE_PATH_PROTOCOL
*VarConsole
;
193 UINTN DevicePathSize
;
194 EFI_DEVICE_PATH_PROTOCOL
*NewDevicePath
;
195 EFI_DEVICE_PATH_PROTOCOL
*TempNewDevicePath
;
202 // Notes: check the device path point, here should check
203 // with compare memory
205 if (CustomizedConDevicePath
== ExclusiveDevicePath
) {
206 return EFI_UNSUPPORTED
;
209 // Delete the ExclusiveDevicePath from current default console
211 VarConsole
= BdsLibGetVariableAndSize (
213 &gEfiGlobalVariableGuid
,
218 // Initialize NewDevicePath
220 NewDevicePath
= VarConsole
;
223 // If ExclusiveDevicePath is even the part of the instance in VarConsole, delete it.
224 // In the end, NewDevicePath is the final device path.
226 if (ExclusiveDevicePath
!= NULL
&& VarConsole
!= NULL
) {
227 NewDevicePath
= BdsLibDelPartMatchInstance (VarConsole
, ExclusiveDevicePath
);
230 // Try to append customized device path to NewDevicePath.
232 if (CustomizedConDevicePath
!= NULL
) {
233 if (!BdsLibMatchDevicePaths (NewDevicePath
, CustomizedConDevicePath
)) {
235 // Check if there is part of CustomizedConDevicePath in NewDevicePath, delete it.
237 NewDevicePath
= BdsLibDelPartMatchInstance (NewDevicePath
, CustomizedConDevicePath
);
239 // In the first check, the default console variable will be _ModuleEntryPoint,
240 // just append current customized device path
242 TempNewDevicePath
= NewDevicePath
;
243 NewDevicePath
= AppendDevicePathInstance (NewDevicePath
, CustomizedConDevicePath
);
244 if (TempNewDevicePath
!= NULL
) {
245 FreePool(TempNewDevicePath
);
251 // The attribute for ConInDev, ConOutDev and ErrOutDev does not include NV.
253 if (IsNvNeed(ConVarName
)) {
255 // ConVarName has NV attribute.
257 Attributes
= EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS
| EFI_VARIABLE_NON_VOLATILE
;
260 // ConVarName does not have NV attribute.
262 Attributes
= EFI_VARIABLE_BOOTSERVICE_ACCESS
| EFI_VARIABLE_RUNTIME_ACCESS
;
266 // Finally, Update the variable of the default console by NewDevicePath
270 &gEfiGlobalVariableGuid
,
272 GetDevicePathSize (NewDevicePath
),
276 if (VarConsole
== NewDevicePath
) {
277 if (VarConsole
!= NULL
) {
278 FreePool(VarConsole
);
281 if (VarConsole
!= NULL
) {
282 FreePool(VarConsole
);
284 if (NewDevicePath
!= NULL
) {
285 FreePool(NewDevicePath
);
295 Connect the console device base on the variable ConVarName, if
296 device path of the ConVarName is multi-instance device path, if
297 anyone of the instances is connected success, then this function
300 @param ConVarName Console related variable name, ConIn, ConOut,
303 @retval EFI_NOT_FOUND There is not any console devices connected
305 @retval EFI_SUCCESS Success connect any one instance of the console
306 device path base on the variable ConVarName.
311 BdsLibConnectConsoleVariable (
312 IN CHAR16
*ConVarName
316 EFI_DEVICE_PATH_PROTOCOL
*StartDevicePath
;
318 EFI_DEVICE_PATH_PROTOCOL
*Instance
;
319 EFI_DEVICE_PATH_PROTOCOL
*Next
;
320 EFI_DEVICE_PATH_PROTOCOL
*CopyOfDevicePath
;
324 Status
= EFI_SUCCESS
;
328 // Check if the console variable exist
330 StartDevicePath
= BdsLibGetVariableAndSize (
332 &gEfiGlobalVariableGuid
,
335 if (StartDevicePath
== NULL
) {
336 return EFI_UNSUPPORTED
;
339 CopyOfDevicePath
= StartDevicePath
;
342 // Check every instance of the console variable
344 Instance
= GetNextDevicePathInstance (&CopyOfDevicePath
, &Size
);
345 if (Instance
== NULL
) {
346 FreePool (StartDevicePath
);
347 return EFI_UNSUPPORTED
;
351 while (!IsDevicePathEndType (Next
)) {
352 Next
= NextDevicePathNode (Next
);
355 SetDevicePathEndNode (Next
);
357 // Check USB1.1 console
359 if ((DevicePathType (Instance
) == MESSAGING_DEVICE_PATH
) &&
360 ((DevicePathSubType (Instance
) == MSG_USB_CLASS_DP
)
361 || (DevicePathSubType (Instance
) == MSG_USB_WWID_DP
)
364 // Check the Usb console in Usb2.0 bus firstly, then Usb1.1 bus
366 Status
= BdsLibConnectUsbDevByShortFormDP (PCI_CLASSC_PI_EHCI
, Instance
);
367 if (!EFI_ERROR (Status
)) {
371 Status
= BdsLibConnectUsbDevByShortFormDP (PCI_CLASSC_PI_UHCI
, Instance
);
372 if (!EFI_ERROR (Status
)) {
377 // Connect the instance device path
379 Status
= BdsLibConnectDevicePath (Instance
);
380 if (EFI_ERROR (Status
)) {
382 // Delete the instance from the console varialbe
384 BdsLibUpdateConsoleVariable (ConVarName
, NULL
, Instance
);
390 } while (CopyOfDevicePath
!= NULL
);
392 FreePool (StartDevicePath
);
395 return EFI_NOT_FOUND
;
403 This function will search every simpletext device in current system,
404 and make every simpletext device as pertantial console device.
409 BdsLibConnectAllConsoles (
414 EFI_DEVICE_PATH_PROTOCOL
*ConDevicePath
;
416 EFI_HANDLE
*HandleBuffer
;
421 ConDevicePath
= NULL
;
424 // Update all the console variables
426 gBS
->LocateHandleBuffer (
428 &gEfiSimpleTextInProtocolGuid
,
434 for (Index
= 0; Index
< HandleCount
; Index
++) {
435 gBS
->HandleProtocol (
437 &gEfiDevicePathProtocolGuid
,
438 (VOID
**) &ConDevicePath
440 BdsLibUpdateConsoleVariable (L
"ConIn", ConDevicePath
, NULL
);
443 if (HandleBuffer
!= NULL
) {
444 FreePool(HandleBuffer
);
448 gBS
->LocateHandleBuffer (
450 &gEfiSimpleTextOutProtocolGuid
,
455 for (Index
= 0; Index
< HandleCount
; Index
++) {
456 gBS
->HandleProtocol (
458 &gEfiDevicePathProtocolGuid
,
459 (VOID
**) &ConDevicePath
461 BdsLibUpdateConsoleVariable (L
"ConOut", ConDevicePath
, NULL
);
462 BdsLibUpdateConsoleVariable (L
"ErrOut", ConDevicePath
, NULL
);
465 if (HandleBuffer
!= NULL
) {
466 FreePool(HandleBuffer
);
470 // Connect all console variables
472 BdsLibConnectAllDefaultConsoles ();
477 This function will connect console device base on the console
478 device variable ConIn, ConOut and ErrOut.
480 @retval EFI_SUCCESS At least one of the ConIn and ConOut device have
481 been connected success.
482 @retval EFI_STATUS Return the status of BdsLibConnectConsoleVariable ().
487 BdsLibConnectAllDefaultConsoles (
492 BOOLEAN SystemTableUpdated
;
495 // Connect all default console variables
499 // It seems impossible not to have any ConOut device on platform,
500 // so we check the status here.
502 Status
= BdsLibConnectConsoleVariable (L
"ConOut");
503 if (EFI_ERROR (Status
)) {
508 // Insert the performance probe for Console Out
510 PERF_START (NULL
, "ConOut", "BDS", 1);
511 PERF_END (NULL
, "ConOut", "BDS", 0);
514 // Because possibly the platform is legacy free, in such case,
515 // ConIn devices (Serial Port and PS2 Keyboard ) does not exist,
516 // so we need not check the status.
518 BdsLibConnectConsoleVariable (L
"ConIn");
521 // The _ModuleEntryPoint err out var is legal.
523 BdsLibConnectConsoleVariable (L
"ErrOut");
525 SystemTableUpdated
= FALSE
;
527 // Fill console handles in System Table if no console device assignd.
529 if (UpdateSystemTableConsole (L
"ConIn", &gEfiSimpleTextInProtocolGuid
, &gST
->ConsoleInHandle
, (VOID
**) &gST
->ConIn
)) {
530 SystemTableUpdated
= TRUE
;
532 if (UpdateSystemTableConsole (L
"ConOut", &gEfiSimpleTextOutProtocolGuid
, &gST
->ConsoleOutHandle
, (VOID
**) &gST
->ConOut
)) {
533 SystemTableUpdated
= TRUE
;
535 if (UpdateSystemTableConsole (L
"ErrOut", &gEfiSimpleTextOutProtocolGuid
, &gST
->StandardErrorHandle
, (VOID
**) &gST
->StdErr
)) {
536 SystemTableUpdated
= TRUE
;
539 if (SystemTableUpdated
) {
541 // Update the CRC32 in the EFI System Table header
544 gBS
->CalculateCrc32 (
556 Convert a *.BMP graphics image to a GOP blt buffer. If a NULL Blt buffer
557 is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt
558 buffer is passed in it will be used if it is big enough.
560 @param BmpImage Pointer to BMP file
561 @param BmpImageSize Number of bytes in BmpImage
562 @param GopBlt Buffer containing GOP version of BmpImage.
563 @param GopBltSize Size of GopBlt in bytes.
564 @param PixelHeight Height of GopBlt/BmpImage in pixels
565 @param PixelWidth Width of GopBlt/BmpImage in pixels
567 @retval EFI_SUCCESS GopBlt and GopBltSize are returned.
568 @retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image
569 @retval EFI_BUFFER_TOO_SMALL The passed in GopBlt buffer is not big enough.
570 GopBltSize will contain the required size.
571 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate.
577 IN UINTN BmpImageSize
,
578 IN OUT VOID
**GopBlt
,
579 IN OUT UINTN
*GopBltSize
,
580 OUT UINTN
*PixelHeight
,
581 OUT UINTN
*PixelWidth
586 BMP_IMAGE_HEADER
*BmpHeader
;
587 BMP_COLOR_MAP
*BmpColorMap
;
588 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
;
589 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*Blt
;
597 BmpHeader
= (BMP_IMAGE_HEADER
*) BmpImage
;
599 if (BmpHeader
->CharB
!= 'B' || BmpHeader
->CharM
!= 'M') {
600 return EFI_UNSUPPORTED
;
604 // Doesn't support compress.
606 if (BmpHeader
->CompressionType
!= 0) {
607 return EFI_UNSUPPORTED
;
611 // Calculate Color Map offset in the image.
614 BmpColorMap
= (BMP_COLOR_MAP
*) (Image
+ sizeof (BMP_IMAGE_HEADER
));
617 // Calculate graphics image data address in the image
619 Image
= ((UINT8
*) BmpImage
) + BmpHeader
->ImageOffset
;
623 // Calculate the BltBuffer needed size.
625 BltBufferSize
= BmpHeader
->PixelWidth
* BmpHeader
->PixelHeight
* sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL
);
627 if (*GopBlt
== NULL
) {
629 // GopBlt is not allocated by caller.
631 *GopBltSize
= BltBufferSize
;
632 *GopBlt
= AllocatePool (*GopBltSize
);
634 if (*GopBlt
== NULL
) {
635 return EFI_OUT_OF_RESOURCES
;
639 // GopBlt has been allocated by caller.
641 if (*GopBltSize
< BltBufferSize
) {
642 *GopBltSize
= BltBufferSize
;
643 return EFI_BUFFER_TOO_SMALL
;
647 *PixelWidth
= BmpHeader
->PixelWidth
;
648 *PixelHeight
= BmpHeader
->PixelHeight
;
651 // Convert image from BMP to Blt buffer format
654 for (Height
= 0; Height
< BmpHeader
->PixelHeight
; Height
++) {
655 Blt
= &BltBuffer
[(BmpHeader
->PixelHeight
- Height
- 1) * BmpHeader
->PixelWidth
];
656 for (Width
= 0; Width
< BmpHeader
->PixelWidth
; Width
++, Image
++, Blt
++) {
657 switch (BmpHeader
->BitPerPixel
) {
660 // Convert 1-bit (2 colors) BMP to 24-bit color
662 for (Index
= 0; Index
< 8 && Width
< BmpHeader
->PixelWidth
; Index
++) {
663 Blt
->Red
= BmpColorMap
[((*Image
) >> (7 - Index
)) & 0x1].Red
;
664 Blt
->Green
= BmpColorMap
[((*Image
) >> (7 - Index
)) & 0x1].Green
;
665 Blt
->Blue
= BmpColorMap
[((*Image
) >> (7 - Index
)) & 0x1].Blue
;
676 // Convert 4-bit (16 colors) BMP Palette to 24-bit color
678 Index
= (*Image
) >> 4;
679 Blt
->Red
= BmpColorMap
[Index
].Red
;
680 Blt
->Green
= BmpColorMap
[Index
].Green
;
681 Blt
->Blue
= BmpColorMap
[Index
].Blue
;
682 if (Width
< (BmpHeader
->PixelWidth
- 1)) {
685 Index
= (*Image
) & 0x0f;
686 Blt
->Red
= BmpColorMap
[Index
].Red
;
687 Blt
->Green
= BmpColorMap
[Index
].Green
;
688 Blt
->Blue
= BmpColorMap
[Index
].Blue
;
694 // Convert 8-bit (256 colors) BMP Palette to 24-bit color
696 Blt
->Red
= BmpColorMap
[*Image
].Red
;
697 Blt
->Green
= BmpColorMap
[*Image
].Green
;
698 Blt
->Blue
= BmpColorMap
[*Image
].Blue
;
705 Blt
->Blue
= *Image
++;
706 Blt
->Green
= *Image
++;
712 // Other bit format BMP is not supported.
718 return EFI_UNSUPPORTED
;
724 ImageIndex
= (UINTN
) (Image
- ImageHeader
);
725 if ((ImageIndex
% 4) != 0) {
727 // Bmp Image starts each row on a 32-bit boundary!
729 Image
= Image
+ (4 - (ImageIndex
% 4));
738 Use Console Control Protocol to lock the Console In Spliter virtual handle.
739 This is the ConInHandle and ConIn handle in the EFI system table. All key
740 presses will be ignored until the Password is typed in. The only way to
741 disable the password is to type it in to a ConIn device.
743 @param Password Password used to lock ConIn device.
745 @retval EFI_SUCCESS lock the Console In Spliter virtual handle successfully.
746 @retval EFI_UNSUPPORTED Password not found
755 return EFI_UNSUPPORTED
;
760 Use Console Control to turn off UGA based Simple Text Out consoles from going
761 to the UGA device. Put up LogoFile on every UGA device that is a console
763 @param[in] LogoFile File name of logo to display on the center of the screen.
765 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
766 @retval EFI_UNSUPPORTED Logo not found
772 IN EFI_GUID
*LogoFile
776 EFI_OEM_BADGING_PROTOCOL
*Badging
;
785 EFI_BADGING_FORMAT Format
;
786 EFI_BADGING_DISPLAY_ATTRIBUTE Attribute
;
791 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*Blt
;
792 EFI_UGA_DRAW_PROTOCOL
*UgaDraw
;
795 EFI_GRAPHICS_OUTPUT_PROTOCOL
*GraphicsOutput
;
799 // Try to open GOP first
801 Status
= gBS
->HandleProtocol (gST
->ConsoleOutHandle
, &gEfiGraphicsOutputProtocolGuid
, (VOID
**) &GraphicsOutput
);
802 if (EFI_ERROR (Status
) && FeaturePcdGet (PcdUgaConsumeSupport
)) {
803 GraphicsOutput
= NULL
;
805 // Open GOP failed, try to open UGA
807 Status
= gBS
->HandleProtocol (gST
->ConsoleOutHandle
, &gEfiUgaDrawProtocolGuid
, (VOID
**) &UgaDraw
);
809 if (EFI_ERROR (Status
)) {
810 return EFI_UNSUPPORTED
;
814 // Erase Cursor from screen
816 gST
->ConOut
->EnableCursor (gST
->ConOut
, FALSE
);
819 Status
= gBS
->LocateProtocol (&gEfiOEMBadgingProtocolGuid
, NULL
, (VOID
**) &Badging
);
821 if (GraphicsOutput
!= NULL
) {
822 SizeOfX
= GraphicsOutput
->Mode
->Info
->HorizontalResolution
;
823 SizeOfY
= GraphicsOutput
->Mode
->Info
->VerticalResolution
;
825 } else if (UgaDraw
!= NULL
&& FeaturePcdGet (PcdUgaConsumeSupport
)) {
826 Status
= UgaDraw
->GetMode (UgaDraw
, &SizeOfX
, &SizeOfY
, &ColorDepth
, &RefreshRate
);
827 if (EFI_ERROR (Status
)) {
828 return EFI_UNSUPPORTED
;
831 return EFI_UNSUPPORTED
;
839 if (Badging
!= NULL
) {
841 // Get image from OEMBadging protocol.
843 Status
= Badging
->GetImage (
853 if (EFI_ERROR (Status
)) {
858 // Currently only support BMP format.
860 if (Format
!= EfiBadgingFormatBMP
) {
861 if (ImageData
!= NULL
) {
862 FreePool (ImageData
);
868 // Get the specified image from FV.
870 Status
= GetSectionFromAnyFv (LogoFile
, EFI_SECTION_RAW
, 0, (VOID
**) &ImageData
, &ImageSize
);
871 if (EFI_ERROR (Status
)) {
872 return EFI_UNSUPPORTED
;
877 Attribute
= EfiBadgingDisplayAttributeCenter
;
881 Status
= ConvertBmpToGopBlt (
889 if (EFI_ERROR (Status
)) {
890 FreePool (ImageData
);
892 if (Badging
== NULL
) {
900 // Calculate the display position according to Attribute.
903 case EfiBadgingDisplayAttributeLeftTop
:
908 case EfiBadgingDisplayAttributeCenterTop
:
909 DestX
= (SizeOfX
- Width
) / 2;
913 case EfiBadgingDisplayAttributeRightTop
:
914 DestX
= (SizeOfX
- Width
- CoordinateX
);
915 DestY
= CoordinateY
;;
918 case EfiBadgingDisplayAttributeCenterRight
:
919 DestX
= (SizeOfX
- Width
- CoordinateX
);
920 DestY
= (SizeOfY
- Height
) / 2;
923 case EfiBadgingDisplayAttributeRightBottom
:
924 DestX
= (SizeOfX
- Width
- CoordinateX
);
925 DestY
= (SizeOfY
- Height
- CoordinateY
);
928 case EfiBadgingDisplayAttributeCenterBottom
:
929 DestX
= (SizeOfX
- Width
) / 2;
930 DestY
= (SizeOfY
- Height
- CoordinateY
);
933 case EfiBadgingDisplayAttributeLeftBottom
:
935 DestY
= (SizeOfY
- Height
- CoordinateY
);
938 case EfiBadgingDisplayAttributeCenterLeft
:
940 DestY
= (SizeOfY
- Height
) / 2;
943 case EfiBadgingDisplayAttributeCenter
:
944 DestX
= (SizeOfX
- Width
) / 2;
945 DestY
= (SizeOfY
- Height
) / 2;
954 if ((DestX
>= 0) && (DestY
>= 0)) {
955 if (GraphicsOutput
!= NULL
) {
956 Status
= GraphicsOutput
->Blt (
966 Width
* sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL
)
968 } else if (UgaDraw
!= NULL
&& FeaturePcdGet (PcdUgaConsumeSupport
)) {
969 Status
= UgaDraw
->Blt (
971 (EFI_UGA_PIXEL
*) Blt
,
972 EfiUgaBltBufferToVideo
,
979 Width
* sizeof (EFI_UGA_PIXEL
)
982 Status
= EFI_UNSUPPORTED
;
986 FreePool (ImageData
);
992 if (Badging
== NULL
) {
1001 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
1002 Simple Text Out screens will now be synced up with all non UGA output devices
1004 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
1015 // Enable Cursor on Screen
1017 gST
->ConOut
->EnableCursor (gST
->ConOut
, TRUE
);