mirror of https://github.com/acidanthera/audk.git
add PCD PcdUgaConsumeSupport to switch on/off EFI UGA Draw Protocol's consuming, it could save size by changing PCD's value to FALSE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4911 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
18b8485750
commit
8541adab27
|
@ -35,6 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/PcdLib.h>
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
GetGraphicsBitMapFromFV (
|
GetGraphicsBitMapFromFV (
|
||||||
|
@ -390,15 +391,15 @@ Returns:
|
||||||
// Try to open GOP first
|
// Try to open GOP first
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
|
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
GraphicsOutput = NULL;
|
GraphicsOutput = NULL;
|
||||||
//
|
//
|
||||||
// Open GOP failed, try to open UGA
|
// Open GOP failed, try to open UGA
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiUgaDrawProtocolGuid, (VOID **) &UgaDraw);
|
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiUgaDrawProtocolGuid, (VOID **) &UgaDraw);
|
||||||
if (EFI_ERROR (Status)) {
|
}
|
||||||
return EFI_UNSUPPORTED;
|
if (EFI_ERROR (Status)) {
|
||||||
}
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Badging = NULL;
|
Badging = NULL;
|
||||||
|
@ -409,7 +410,7 @@ Returns:
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
||||||
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth, &RefreshRate);
|
Status = UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth, &RefreshRate);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
|
@ -539,7 +540,7 @@ Returns:
|
||||||
Height,
|
Height,
|
||||||
Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) Blt,
|
(EFI_UGA_PIXEL *) Blt,
|
||||||
|
@ -552,6 +553,8 @@ Returns:
|
||||||
Height,
|
Height,
|
||||||
Width * sizeof (EFI_UGA_PIXEL)
|
Width * sizeof (EFI_UGA_PIXEL)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
Status = EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +699,7 @@ Returns:
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;
|
HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;
|
||||||
VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;
|
VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// Get the current mode information from the UGA Draw Protocol
|
// Get the current mode information from the UGA Draw Protocol
|
||||||
//
|
//
|
||||||
|
@ -784,7 +787,7 @@ Returns:
|
||||||
GLYPH_HEIGHT,
|
GLYPH_HEIGHT,
|
||||||
BufferGlyphWidth * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
BufferGlyphWidth * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) (UINTN) LineBuffer,
|
(EFI_UGA_PIXEL *) (UINTN) LineBuffer,
|
||||||
|
@ -797,6 +800,8 @@ Returns:
|
||||||
GLYPH_HEIGHT,
|
GLYPH_HEIGHT,
|
||||||
BufferGlyphWidth * sizeof (EFI_UGA_PIXEL)
|
BufferGlyphWidth * sizeof (EFI_UGA_PIXEL)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
Status = EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
|
@ -861,7 +866,7 @@ Returns:
|
||||||
(VOID **) &GraphicsOutput
|
(VOID **) &GraphicsOutput
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
GraphicsOutput = NULL;
|
GraphicsOutput = NULL;
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
|
@ -869,10 +874,10 @@ Returns:
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
(VOID **) &UgaDraw
|
(VOID **) &UgaDraw
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
|
|
|
@ -56,3 +56,5 @@
|
||||||
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiOEMBadgingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiOEMBadgingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
|
||||||
|
[FeaturePcd.common]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
||||||
|
|
|
@ -38,6 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/DxePiLib.h>
|
#include <Library/DxePiLib.h>
|
||||||
|
#include <Library/PcdLib.h>
|
||||||
|
|
||||||
STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = {
|
STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = {
|
||||||
{ 0x00, 0x00, 0x00, 0x00 },
|
{ 0x00, 0x00, 0x00, 0x00 },
|
||||||
|
@ -113,19 +114,19 @@ Arguments:
|
||||||
|
|
||||||
ImageHandle - The driver image handle of the caller. The parameter is used to
|
ImageHandle - The driver image handle of the caller. The parameter is used to
|
||||||
optimize the loading of the image file so that the FV from which
|
optimize the loading of the image file so that the FV from which
|
||||||
the driver image is loaded will be tried first.
|
the driver image is loaded will be tried first.
|
||||||
|
|
||||||
FileNameGuid - File Name of graphics file in the FV(s).
|
FileNameGuid - File Name of graphics file in the FV(s).
|
||||||
|
|
||||||
Image - Pointer to pointer to return graphics image. If NULL, a
|
Image - Pointer to pointer to return graphics image. If NULL, a
|
||||||
buffer will be allocated.
|
buffer will be allocated.
|
||||||
|
|
||||||
ImageSize - Size of the graphics Image in bytes. Zero if no image found.
|
ImageSize - Size of the graphics Image in bytes. Zero if no image found.
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - Image and ImageSize are valid.
|
EFI_SUCCESS - Image and ImageSize are valid.
|
||||||
EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
|
EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
|
||||||
EFI_NOT_FOUND - FileNameGuid not found
|
EFI_NOT_FOUND - FileNameGuid not found
|
||||||
|
|
||||||
|
@ -370,7 +371,7 @@ Arguments:
|
||||||
LogoFile - File name of logo to display on the center of the screen.
|
LogoFile - File name of logo to display on the center of the screen.
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
||||||
displayed.
|
displayed.
|
||||||
|
@ -401,7 +402,7 @@ Arguments:
|
||||||
the driver image is loaded will be tried first.
|
the driver image is loaded will be tried first.
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
|
||||||
displayed.
|
displayed.
|
||||||
|
@ -442,15 +443,15 @@ Returns:
|
||||||
// Try to open GOP first
|
// Try to open GOP first
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID**)&GraphicsOutput);
|
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, (VOID**)&GraphicsOutput);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
GraphicsOutput = NULL;
|
GraphicsOutput = NULL;
|
||||||
//
|
//
|
||||||
// Open GOP failed, try to open UGA
|
// Open GOP failed, try to open UGwhA
|
||||||
//
|
//
|
||||||
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiUgaDrawProtocolGuid, (VOID**)&UgaDraw);
|
Status = gBS->HandleProtocol (gST->ConsoleOutHandle, &gEfiUgaDrawProtocolGuid, (VOID**)&UgaDraw);
|
||||||
if (EFI_ERROR (Status)) {
|
}
|
||||||
return EFI_UNSUPPORTED;
|
if (EFI_ERROR (Status)) {
|
||||||
}
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Badging = NULL;
|
Badging = NULL;
|
||||||
|
@ -464,7 +465,7 @@ Returns:
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
||||||
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth, &RefreshRate);
|
Status = UgaDraw->GetMode (UgaDraw, &SizeOfX, &SizeOfY, &ColorDepth, &RefreshRate);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
|
@ -593,7 +594,7 @@ Returns:
|
||||||
Height,
|
Height,
|
||||||
Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) Blt,
|
(EFI_UGA_PIXEL *) Blt,
|
||||||
|
@ -658,7 +659,7 @@ UINTN
|
||||||
_IPrint (
|
_IPrint (
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw,
|
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw,
|
||||||
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto,
|
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto,
|
||||||
IN UINTN X,
|
IN UINTN X,
|
||||||
IN UINTN Y,
|
IN UINTN Y,
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground,
|
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground,
|
||||||
|
@ -677,22 +678,22 @@ Arguments:
|
||||||
GraphicsOutput - Graphics output protocol interface
|
GraphicsOutput - Graphics output protocol interface
|
||||||
|
|
||||||
UgaDraw - UGA draw protocol interface
|
UgaDraw - UGA draw protocol interface
|
||||||
|
|
||||||
Sto - Simple text out protocol interface
|
Sto - Simple text out protocol interface
|
||||||
|
|
||||||
X - X coordinate to start printing
|
X - X coordinate to start printing
|
||||||
|
|
||||||
Y - Y coordinate to start printing
|
Y - Y coordinate to start printing
|
||||||
|
|
||||||
Foreground - Foreground color
|
Foreground - Foreground color
|
||||||
|
|
||||||
Background - Background color
|
Background - Background color
|
||||||
|
|
||||||
fmt - Format string
|
fmt - Format string
|
||||||
|
|
||||||
args - Print arguments
|
args - Print arguments
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS - success
|
EFI_SUCCESS - success
|
||||||
EFI_OUT_OF_RESOURCES - out of resources
|
EFI_OUT_OF_RESOURCES - out of resources
|
||||||
|
@ -711,7 +712,7 @@ Returns:
|
||||||
UINTN LineBufferLen;
|
UINTN LineBufferLen;
|
||||||
EFI_HII_FONT_PROTOCOL *HiiFont;
|
EFI_HII_FONT_PROTOCOL *HiiFont;
|
||||||
EFI_IMAGE_OUTPUT *Blt;
|
EFI_IMAGE_OUTPUT *Blt;
|
||||||
EFI_FONT_DISPLAY_INFO *FontInfo;
|
EFI_FONT_DISPLAY_INFO *FontInfo;
|
||||||
|
|
||||||
//
|
//
|
||||||
// For now, allocate an arbitrarily long buffer
|
// For now, allocate an arbitrarily long buffer
|
||||||
|
@ -721,24 +722,31 @@ Returns:
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HorizontalResolution = 0;
|
||||||
|
VerticalResolution = 0;
|
||||||
|
Blt = NULL;
|
||||||
|
FontInfo = NULL;
|
||||||
|
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;
|
HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;
|
||||||
VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;
|
VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate);
|
UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate);
|
||||||
|
} else {
|
||||||
|
Status = EFI_UNSUPPORTED;
|
||||||
|
goto Error;
|
||||||
}
|
}
|
||||||
ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0));
|
|
||||||
|
|
||||||
Blt = NULL;
|
ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0));
|
||||||
FontInfo = NULL;
|
|
||||||
ASSERT (GraphicsOutput != NULL);
|
ASSERT (GraphicsOutput != NULL);
|
||||||
Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &HiiFont);
|
Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &HiiFont);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnicodeVSPrint (Buffer, 0x10000, fmt, args);
|
UnicodeVSPrint (Buffer, 0x10000, fmt, args);
|
||||||
|
|
||||||
UnicodeWeight = (CHAR16 *) Buffer;
|
UnicodeWeight = (CHAR16 *) Buffer;
|
||||||
|
|
||||||
for (Index = 0; UnicodeWeight[Index] != 0; Index++) {
|
for (Index = 0; UnicodeWeight[Index] != 0; Index++) {
|
||||||
|
@ -750,7 +758,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferLen = StrLen (Buffer);
|
BufferLen = StrLen (Buffer);
|
||||||
|
|
||||||
|
|
||||||
LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT;
|
LineBufferLen = sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * HorizontalResolution * EFI_GLYPH_HEIGHT;
|
||||||
if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * BufferLen > LineBufferLen) {
|
if (EFI_GLYPH_WIDTH * EFI_GLYPH_HEIGHT * sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * BufferLen > LineBufferLen) {
|
||||||
|
@ -767,7 +775,7 @@ Returns:
|
||||||
Blt->Width = (UINT16) (HorizontalResolution);
|
Blt->Width = (UINT16) (HorizontalResolution);
|
||||||
Blt->Height = (UINT16) (VerticalResolution);
|
Blt->Height = (UINT16) (VerticalResolution);
|
||||||
Blt->Image.Screen = GraphicsOutput;
|
Blt->Image.Screen = GraphicsOutput;
|
||||||
|
|
||||||
FontInfo = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (sizeof (EFI_FONT_DISPLAY_INFO));
|
FontInfo = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (sizeof (EFI_FONT_DISPLAY_INFO));
|
||||||
if (FontInfo == NULL) {
|
if (FontInfo == NULL) {
|
||||||
Status = EFI_OUT_OF_RESOURCES;
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
@ -777,8 +785,8 @@ Returns:
|
||||||
CopyMem (&FontInfo->ForegroundColor, Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
CopyMem (&FontInfo->ForegroundColor, Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||||
} else {
|
} else {
|
||||||
CopyMem (
|
CopyMem (
|
||||||
&FontInfo->ForegroundColor,
|
&FontInfo->ForegroundColor,
|
||||||
&mEfiColors[Sto->Mode->Attribute & 0x0f],
|
&mEfiColors[Sto->Mode->Attribute & 0x0f],
|
||||||
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -786,8 +794,8 @@ Returns:
|
||||||
CopyMem (&FontInfo->BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
CopyMem (&FontInfo->BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
|
||||||
} else {
|
} else {
|
||||||
CopyMem (
|
CopyMem (
|
||||||
&FontInfo->BackgroundColor,
|
&FontInfo->BackgroundColor,
|
||||||
&mEfiColors[Sto->Mode->Attribute >> 4],
|
&mEfiColors[Sto->Mode->Attribute >> 4],
|
||||||
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -804,7 +812,7 @@ Returns:
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
SafeFreePool (Blt);
|
SafeFreePool (Blt);
|
||||||
|
@ -831,11 +839,11 @@ Routine Description:
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
X - X coordinate to start printing
|
X - X coordinate to start printing
|
||||||
|
|
||||||
Y - Y coordinate to start printing
|
Y - Y coordinate to start printing
|
||||||
|
|
||||||
ForeGround - Foreground color
|
ForeGround - Foreground color
|
||||||
|
|
||||||
BackGround - Background color
|
BackGround - Background color
|
||||||
|
|
||||||
Fmt - Format string
|
Fmt - Format string
|
||||||
|
@ -866,7 +874,7 @@ Returns:
|
||||||
);
|
);
|
||||||
|
|
||||||
UgaDraw = NULL;
|
UgaDraw = NULL;
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
GraphicsOutput = NULL;
|
GraphicsOutput = NULL;
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
|
@ -874,10 +882,9 @@ Returns:
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
(VOID**)&UgaDraw
|
(VOID**)&UgaDraw
|
||||||
);
|
);
|
||||||
|
}
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
|
|
|
@ -52,6 +52,9 @@
|
||||||
gEfiGraphicsOutputProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiGraphicsOutputProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiUgaDrawProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiUgaDrawProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiConsoleControlProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiConsoleControlProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiOEMBadgingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiOEMBadgingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiHiiFontProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiHiiFontProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
|
||||||
|
[FeaturePcd.common]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
|
@ -126,7 +126,8 @@
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE|BOOLEAN|0x00010042
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE|BOOLEAN|0x00010042
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE|BOOLEAN|0x00010043
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE|BOOLEAN|0x00010043
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord|FALSE|BOOLEAN|0x00010044
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord|FALSE|BOOLEAN|0x00010045
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x00010046
|
||||||
|
|
||||||
[PcdsFixedAtBuild.common]
|
[PcdsFixedAtBuild.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
# N/A
|
# N/A
|
||||||
# Copyright (c) 2008, Intel Corporation
|
# Copyright (c) 2008, Intel Corporation
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
gEfiMemorySubClassGuid
|
gEfiMemorySubClassGuid
|
||||||
gEfiProcessorSubClassGuid
|
gEfiProcessorSubClassGuid
|
||||||
gEfiCapsuleVendorGuid
|
gEfiCapsuleVendorGuid
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiHiiStringProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiHiiStringProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiSimpleFileSystemProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiSimpleFileSystemProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
@ -139,10 +139,11 @@
|
||||||
gEfiSerialIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiSerialIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
gEfiAcpiS3SaveProtocolGuid
|
gEfiAcpiS3SaveProtocolGuid
|
||||||
|
|
||||||
[FeaturePcd.common]
|
[FeaturePcd.common]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDepricate
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDepricate
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
||||||
|
|
||||||
[Pcd.common]
|
[Pcd.common]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes
|
||||||
|
|
|
@ -79,7 +79,7 @@ Returns:
|
||||||
&gEfiGraphicsOutputProtocolGuid,
|
&gEfiGraphicsOutputProtocolGuid,
|
||||||
(VOID **) &GraphicsOutput
|
(VOID **) &GraphicsOutput
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
GraphicsOutput = NULL;
|
GraphicsOutput = NULL;
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
|
@ -87,15 +87,17 @@ Returns:
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
(VOID **) &UgaDraw
|
(VOID **) &UgaDraw
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
}
|
||||||
return EFI_UNSUPPORTED;
|
if (EFI_ERROR (Status)) {
|
||||||
}
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SizeOfX = 0;
|
||||||
|
SizeOfY = 0;
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
||||||
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->GetMode (
|
Status = UgaDraw->GetMode (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
&SizeOfX,
|
&SizeOfX,
|
||||||
|
@ -106,6 +108,8 @@ Returns:
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockWidth = SizeOfX / 100;
|
BlockWidth = SizeOfX / 100;
|
||||||
|
@ -135,7 +139,7 @@ Returns:
|
||||||
SizeOfY - (PosY - GLYPH_HEIGHT - 1),
|
SizeOfY - (PosY - GLYPH_HEIGHT - 1),
|
||||||
SizeOfX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
SizeOfX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) &Color,
|
(EFI_UGA_PIXEL *) &Color,
|
||||||
|
@ -168,7 +172,7 @@ Returns:
|
||||||
BlockHeight,
|
BlockHeight,
|
||||||
(BlockWidth) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
(BlockWidth) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) &ProgressColor,
|
(EFI_UGA_PIXEL *) &ProgressColor,
|
||||||
|
|
|
@ -686,7 +686,7 @@ ConSplitterTextOutConstructor (
|
||||||
//
|
//
|
||||||
// When new console device is added, the new mode will be set later,
|
// When new console device is added, the new mode will be set later,
|
||||||
// so put current mode back to init state.
|
// so put current mode back to init state.
|
||||||
//
|
//
|
||||||
ConOutPrivate->TextOutMode.Mode = 0xFF;
|
ConOutPrivate->TextOutMode.Mode = 0xFF;
|
||||||
|
|
||||||
Status = ConSplitterGrowBuffer (
|
Status = ConSplitterGrowBuffer (
|
||||||
|
@ -1236,6 +1236,9 @@ Returns:
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GraphicsOutput = NULL;
|
||||||
|
UgaDraw = NULL;
|
||||||
//
|
//
|
||||||
// Try to Open Graphics Output protocol
|
// Try to Open Graphics Output protocol
|
||||||
//
|
//
|
||||||
|
@ -1247,22 +1250,19 @@ Returns:
|
||||||
mConOut.VirtualHandle,
|
mConOut.VirtualHandle,
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
GraphicsOutput = NULL;
|
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
}
|
//
|
||||||
//
|
// Open UGA_DRAW protocol
|
||||||
// Open UGA_DRAW protocol
|
//
|
||||||
//
|
Status = gBS->OpenProtocol (
|
||||||
Status = gBS->OpenProtocol (
|
ControllerHandle,
|
||||||
ControllerHandle,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
&gEfiUgaDrawProtocolGuid,
|
(VOID **) &UgaDraw,
|
||||||
(VOID **) &UgaDraw,
|
This->DriverBindingHandle,
|
||||||
This->DriverBindingHandle,
|
mConOut.VirtualHandle,
|
||||||
mConOut.VirtualHandle,
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
);
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
UgaDraw = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1270,7 +1270,7 @@ Returns:
|
||||||
// so put current mode back to init state.
|
// so put current mode back to init state.
|
||||||
//
|
//
|
||||||
mConOut.TextOutMode.Mode = 0xFF;
|
mConOut.TextOutMode.Mode = 0xFF;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If both ConOut and StdErr incorporate the same Text Out device,
|
// If both ConOut and StdErr incorporate the same Text Out device,
|
||||||
// their MaxMode and QueryData should be the intersection of both.
|
// their MaxMode and QueryData should be the intersection of both.
|
||||||
|
@ -1278,7 +1278,7 @@ Returns:
|
||||||
Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);
|
Status = ConSplitterTextOutAddDevice (&mConOut, TextOut, GraphicsOutput, UgaDraw);
|
||||||
ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
|
ConSplitterTextOutSetAttribute (&mConOut.TextOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
|
||||||
|
|
||||||
if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
if (FeaturePcdGet (PcdConOutUgaSupport) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// Match the UGA mode data of ConOut with the current mode
|
// Match the UGA mode data of ConOut with the current mode
|
||||||
//
|
//
|
||||||
|
@ -1332,13 +1332,13 @@ Returns:
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// When new console device is added, the new mode will be set later,
|
// When new console device is added, the new mode will be set later,
|
||||||
// so put current mode back to init state.
|
// so put current mode back to init state.
|
||||||
//
|
//
|
||||||
mStdErr.TextOutMode.Mode = 0xFF;
|
mStdErr.TextOutMode.Mode = 0xFF;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If both ConOut and StdErr incorporate the same Text Out device,
|
// If both ConOut and StdErr incorporate the same Text Out device,
|
||||||
// their MaxMode and QueryData should be the intersection of both.
|
// their MaxMode and QueryData should be the intersection of both.
|
||||||
|
@ -2711,7 +2711,7 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (UgaDraw != NULL) {
|
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// Graphics console driver can ensure the same mode for all GOP devices
|
// Graphics console driver can ensure the same mode for all GOP devices
|
||||||
// so we can get the current mode from this video device
|
// so we can get the current mode from this video device
|
||||||
|
@ -2751,7 +2751,7 @@ Done:
|
||||||
if (GraphicsOutput != NULL) {
|
if (GraphicsOutput != NULL) {
|
||||||
Private->CurrentNumberOfGraphicsOutput++;
|
Private->CurrentNumberOfGraphicsOutput++;
|
||||||
}
|
}
|
||||||
if (UgaDraw != NULL) {
|
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Private->CurrentNumberOfUgaDraw++;
|
Private->CurrentNumberOfUgaDraw++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2801,7 +2801,7 @@ Returns:
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
UINTN Col;
|
UINTN Col;
|
||||||
UINTN Row;
|
UINTN Row;
|
||||||
|
@ -2813,7 +2813,7 @@ Returns:
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CONSOLE_OUT_MODE *ModeInfo;
|
CONSOLE_OUT_MODE *ModeInfo;
|
||||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
||||||
|
|
||||||
PreferMode = 0xFF;
|
PreferMode = 0xFF;
|
||||||
BaseMode = 0xFF;
|
BaseMode = 0xFF;
|
||||||
TextOut = &Private->TextOut;
|
TextOut = &Private->TextOut;
|
||||||
|
@ -2832,9 +2832,9 @@ Returns:
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set to the default mode 80 x 25 required by EFI/UEFI spec;
|
// Set to the default mode 80 x 25 required by EFI/UEFI spec;
|
||||||
// user can also define other valid default console mode here.
|
// user can also define other valid default console mode here.
|
||||||
//
|
//
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
ModeInfo->Column = 80;
|
ModeInfo->Column = 80;
|
||||||
ModeInfo->Row = 25;
|
ModeInfo->Row = 25;
|
||||||
|
@ -2844,9 +2844,9 @@ Returns:
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
||||||
sizeof (CONSOLE_OUT_MODE),
|
sizeof (CONSOLE_OUT_MODE),
|
||||||
ModeInfo
|
ModeInfo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Mode = 0; Mode < MaxMode; Mode++) {
|
for (Mode = 0; Mode < MaxMode; Mode++) {
|
||||||
Status = TextOut->QueryMode (TextOut, Mode, &Col, &Row);
|
Status = TextOut->QueryMode (TextOut, Mode, &Col, &Row);
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
|
@ -2858,19 +2858,19 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = TextOut->SetMode (TextOut, PreferMode);
|
Status = TextOut->SetMode (TextOut, PreferMode);
|
||||||
|
|
||||||
//
|
//
|
||||||
// if current mode setting is failed, default 80x25 mode will be set.
|
// if current mode setting is failed, default 80x25 mode will be set.
|
||||||
//
|
//
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
Status = TextOut->SetMode (TextOut, BaseMode);
|
Status = TextOut->SetMode (TextOut, BaseMode);
|
||||||
ASSERT(!EFI_ERROR(Status));
|
ASSERT(!EFI_ERROR(Status));
|
||||||
|
|
||||||
ModeInfo->Column = 80;
|
ModeInfo->Column = 80;
|
||||||
ModeInfo->Row = 25;
|
ModeInfo->Row = 25;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update ConOutMode variable
|
// Update ConOutMode variable
|
||||||
//
|
//
|
||||||
|
@ -2880,7 +2880,7 @@ Returns:
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
||||||
sizeof (CONSOLE_OUT_MODE),
|
sizeof (CONSOLE_OUT_MODE),
|
||||||
ModeInfo
|
ModeInfo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->FreePool (ModeInfo);
|
gBS->FreePool (ModeInfo);
|
||||||
|
@ -2989,7 +2989,7 @@ Returns:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
||||||
if (UgaDraw != NULL) {
|
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->GetMode (
|
Status = UgaDraw->GetMode (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
&UgaHorizontalResolution,
|
&UgaHorizontalResolution,
|
||||||
|
@ -3043,7 +3043,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// After adding new console device, all existing console devices should be
|
// After adding new console device, all existing console devices should be
|
||||||
// synced to the current shared mode.
|
// synced to the current shared mode.
|
||||||
//
|
//
|
||||||
ConsplitterSetConsoleOutMode (Private);
|
ConsplitterSetConsoleOutMode (Private);
|
||||||
|
@ -3084,7 +3084,7 @@ Returns:
|
||||||
if (TextOutList->TextOut == TextOut) {
|
if (TextOutList->TextOut == TextOut) {
|
||||||
CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
|
CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);
|
||||||
CurrentNumOfConsoles--;
|
CurrentNumOfConsoles--;
|
||||||
if (TextOutList->UgaDraw != NULL) {
|
if (TextOutList->UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Private->CurrentNumberOfUgaDraw--;
|
Private->CurrentNumberOfUgaDraw--;
|
||||||
}
|
}
|
||||||
if (TextOutList->GraphicsOutput != NULL) {
|
if (TextOutList->GraphicsOutput != NULL) {
|
||||||
|
|
|
@ -84,3 +84,4 @@
|
||||||
[FeaturePcd.common]
|
[FeaturePcd.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
||||||
|
|
|
@ -311,7 +311,7 @@ Routine Description:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (ReturnStatus)) {
|
if (EFI_ERROR (ReturnStatus) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
UgaDraw = Private->TextOutList[Index].UgaDraw;
|
UgaDraw = Private->TextOutList[Index].UgaDraw;
|
||||||
if (UgaDraw != NULL) {
|
if (UgaDraw != NULL) {
|
||||||
Status = UgaDraw->SetMode (
|
Status = UgaDraw->SetMode (
|
||||||
|
@ -581,7 +581,7 @@ ConSpliterGraphicsOutputBlt (
|
||||||
}
|
}
|
||||||
|
|
||||||
UgaDraw = Private->TextOutList[Index].UgaDraw;
|
UgaDraw = Private->TextOutList[Index].UgaDraw;
|
||||||
if (UgaDraw != NULL) {
|
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) BltBuffer,
|
(EFI_UGA_PIXEL *) BltBuffer,
|
||||||
|
@ -628,7 +628,7 @@ DevNullGopSync (
|
||||||
Private->GraphicsOutput.Mode->Info->VerticalResolution,
|
Private->GraphicsOutput.Mode->Info->VerticalResolution,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
return UgaDraw->Blt (
|
return UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) Private->GraphicsOutputBlt,
|
(EFI_UGA_PIXEL *) Private->GraphicsOutputBlt,
|
||||||
|
@ -641,6 +641,8 @@ DevNullGopSync (
|
||||||
Private->GraphicsOutput.Mode->Info->VerticalResolution,
|
Private->GraphicsOutput.Mode->Info->VerticalResolution,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,17 +769,22 @@ ConSpliterUgaDrawSetMode (
|
||||||
// return the worst status met
|
// return the worst status met
|
||||||
//
|
//
|
||||||
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
|
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||||
UgaDraw = Private->TextOutList[Index].UgaDraw;
|
|
||||||
if (UgaDraw != NULL) {
|
ReturnStatus = EFI_UNSUPPORTED;
|
||||||
Status = UgaDraw->SetMode (
|
|
||||||
UgaDraw,
|
if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
HorizontalResolution,
|
UgaDraw = Private->TextOutList[Index].UgaDraw;
|
||||||
VerticalResolution,
|
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
ColorDepth,
|
Status = UgaDraw->SetMode (
|
||||||
RefreshRate
|
UgaDraw,
|
||||||
);
|
HorizontalResolution,
|
||||||
if (EFI_ERROR (Status)) {
|
VerticalResolution,
|
||||||
ReturnStatus = Status;
|
ColorDepth,
|
||||||
|
RefreshRate
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
ReturnStatus = Status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1043,7 +1050,7 @@ ConSpliterUgaDrawBlt (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Private->TextOutList[Index].UgaDraw != NULL) {
|
if (Private->TextOutList[Index].UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = Private->TextOutList[Index].UgaDraw->Blt (
|
Status = Private->TextOutList[Index].UgaDraw->Blt (
|
||||||
Private->TextOutList[Index].UgaDraw,
|
Private->TextOutList[Index].UgaDraw,
|
||||||
BltBuffer,
|
BltBuffer,
|
||||||
|
@ -1077,7 +1084,7 @@ DevNullUgaSync (
|
||||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UgaDraw != NULL) {
|
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
return UgaDraw->Blt (
|
return UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
Private->UgaBlt,
|
Private->UgaBlt,
|
||||||
|
@ -1090,7 +1097,7 @@ DevNullUgaSync (
|
||||||
Private->UgaVerticalResolution,
|
Private->UgaVerticalResolution,
|
||||||
Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)
|
Private->UgaHorizontalResolution * sizeof (EFI_UGA_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (GraphicsOutput != NULL) {
|
||||||
return GraphicsOutput->Blt (
|
return GraphicsOutput->Blt (
|
||||||
GraphicsOutput,
|
GraphicsOutput,
|
||||||
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Private->UgaBlt,
|
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) Private->UgaBlt,
|
||||||
|
@ -1103,6 +1110,8 @@ DevNullUgaSync (
|
||||||
Private->UgaVerticalResolution,
|
Private->UgaVerticalResolution,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,15 @@ Remaining Tasks
|
||||||
Implement optimal automatic Mode creation algorithm
|
Implement optimal automatic Mode creation algorithm
|
||||||
Solve palette issues for mixed graphics and text
|
Solve palette issues for mixed graphics and text
|
||||||
When does this protocol reset the palette?
|
When does this protocol reset the palette?
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -139,12 +139,13 @@ GraphicsConsoleControllerDriverSupported (
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
|
|
||||||
UgaDraw = NULL;
|
GraphicsOutput = NULL;
|
||||||
|
UgaDraw = NULL;
|
||||||
//
|
//
|
||||||
// Open the IO Abstraction(s) needed to perform the supported test
|
// Open the IO Abstraction(s) needed to perform the supported test
|
||||||
//
|
//
|
||||||
|
@ -156,9 +157,8 @@ GraphicsConsoleControllerDriverSupported (
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
GraphicsOutput = NULL;
|
|
||||||
//
|
//
|
||||||
// Open Graphics Output Protocol failed, try to open UGA Draw Protocol
|
// Open Graphics Output Protocol failed, try to open UGA Draw Protocol
|
||||||
//
|
//
|
||||||
|
@ -170,9 +170,9 @@ GraphicsConsoleControllerDriverSupported (
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
}
|
||||||
return Status;
|
if (EFI_ERROR (Status)) {
|
||||||
}
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -215,7 +215,7 @@ Error:
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Controller
|
Controller
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
|
@ -292,9 +292,8 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
Private->GraphicsOutput = NULL;
|
|
||||||
|
|
||||||
|
if (EFI_ERROR(Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
|
@ -303,9 +302,10 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Controller,
|
Controller,
|
||||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
}
|
||||||
goto Error;
|
|
||||||
}
|
if (EFI_ERROR (Status)) {
|
||||||
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
NarrowFontSize = ReturnNarrowFontSize ();
|
NarrowFontSize = ReturnNarrowFontSize ();
|
||||||
|
@ -325,10 +325,10 @@ GraphicsConsoleControllerDriverStart (
|
||||||
SimplifiedFont->Header.Length = (UINT32) (PackageLength - 4);
|
SimplifiedFont->Header.Length = (UINT32) (PackageLength - 4);
|
||||||
SimplifiedFont->Header.Type = EFI_HII_PACKAGE_SIMPLE_FONTS;
|
SimplifiedFont->Header.Type = EFI_HII_PACKAGE_SIMPLE_FONTS;
|
||||||
SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (NarrowFontSize / sizeof (EFI_NARROW_GLYPH));
|
SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (NarrowFontSize / sizeof (EFI_NARROW_GLYPH));
|
||||||
|
|
||||||
Location = (UINT8 *) (&SimplifiedFont->NumberOfWideGlyphs + 1);
|
Location = (UINT8 *) (&SimplifiedFont->NumberOfWideGlyphs + 1);
|
||||||
CopyMem (Location, UsStdNarrowGlyphData, NarrowFontSize);
|
CopyMem (Location, UsStdNarrowGlyphData, NarrowFontSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add this simplified font package to a package list then install it.
|
// Add this simplified font package to a package list then install it.
|
||||||
//
|
//
|
||||||
|
@ -336,7 +336,7 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Status = mHiiDatabase->NewPackageList (mHiiDatabase, PackageList, NULL, &(Private->HiiHandle));
|
Status = mHiiDatabase->NewPackageList (mHiiDatabase, PackageList, NULL, &(Private->HiiHandle));
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
SafeFreePool (PackageList);
|
SafeFreePool (PackageList);
|
||||||
SafeFreePool (Package);
|
SafeFreePool (Package);
|
||||||
|
|
||||||
mFirstAccessFlag = FALSE;
|
mFirstAccessFlag = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -349,13 +349,13 @@ GraphicsConsoleControllerDriverStart (
|
||||||
|
|
||||||
if (Private->GraphicsOutput != NULL) {
|
if (Private->GraphicsOutput != NULL) {
|
||||||
//
|
//
|
||||||
// The console is build on top of Graphics Output Protocol, find the mode number
|
// The console is build on top of Graphics Output Protocol, find the mode number
|
||||||
// for the user-defined mode; if there are multiple video devices,
|
// for the user-defined mode; if there are multiple video devices,
|
||||||
// graphic console driver will set all the video devices to the same mode.
|
// graphic console driver will set all the video devices to the same mode.
|
||||||
//
|
//
|
||||||
Status = CheckModeSupported (
|
Status = CheckModeSupported (
|
||||||
Private->GraphicsOutput,
|
Private->GraphicsOutput,
|
||||||
CURRENT_HORIZONTAL_RESOLUTION,
|
CURRENT_HORIZONTAL_RESOLUTION,
|
||||||
CURRENT_VERTICAL_RESOLUTION,
|
CURRENT_VERTICAL_RESOLUTION,
|
||||||
&ModeNumber
|
&ModeNumber
|
||||||
);
|
);
|
||||||
|
@ -370,9 +370,9 @@ GraphicsConsoleControllerDriverStart (
|
||||||
// if not supporting current mode, try 800x600 which is required by UEFI/EFI spec
|
// if not supporting current mode, try 800x600 which is required by UEFI/EFI spec
|
||||||
//
|
//
|
||||||
Status = CheckModeSupported (
|
Status = CheckModeSupported (
|
||||||
Private->GraphicsOutput,
|
Private->GraphicsOutput,
|
||||||
800,
|
800,
|
||||||
600,
|
600,
|
||||||
&ModeNumber
|
&ModeNumber
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ GraphicsConsoleControllerDriverStart (
|
||||||
VerticalResolution = Private->GraphicsOutput->Mode->Info->VerticalResolution;
|
VerticalResolution = Private->GraphicsOutput->Mode->Info->VerticalResolution;
|
||||||
ModeNumber = Private->GraphicsOutput->Mode->Mode;
|
ModeNumber = Private->GraphicsOutput->Mode->Mode;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// At first try to set user-defined resolution
|
// At first try to set user-defined resolution
|
||||||
//
|
//
|
||||||
|
@ -401,7 +401,7 @@ GraphicsConsoleControllerDriverStart (
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
HorizontalResolution = CURRENT_HORIZONTAL_RESOLUTION;
|
HorizontalResolution = CURRENT_HORIZONTAL_RESOLUTION;
|
||||||
VerticalResolution = CURRENT_VERTICAL_RESOLUTION;
|
VerticalResolution = CURRENT_VERTICAL_RESOLUTION;
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// Try to set 800*600 which is required by UEFI/EFI spec
|
// Try to set 800*600 which is required by UEFI/EFI spec
|
||||||
//
|
//
|
||||||
|
@ -475,11 +475,11 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Private->ModeData[MaxMode].DeltaY = 0;
|
Private->ModeData[MaxMode].DeltaY = 0;
|
||||||
MaxMode++;
|
MaxMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add Mode #2 that must be 100x31 (graphic mode >= 800x600)
|
// Add Mode #2 that must be 100x31 (graphic mode >= 800x600)
|
||||||
//
|
//
|
||||||
if (Columns >= 100 && Rows >= 31) {
|
if (Columns >= 100 && Rows >= 31) {
|
||||||
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
||||||
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
||||||
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
||||||
|
@ -493,7 +493,7 @@ GraphicsConsoleControllerDriverStart (
|
||||||
//
|
//
|
||||||
if (HorizontalResolution > 800 && VerticalResolution > 600) {
|
if (HorizontalResolution > 800 && VerticalResolution > 600) {
|
||||||
Private->ModeData[MaxMode].Columns = HorizontalResolution/GLYPH_WIDTH;
|
Private->ModeData[MaxMode].Columns = HorizontalResolution/GLYPH_WIDTH;
|
||||||
Private->ModeData[MaxMode].Rows = VerticalResolution/GLYPH_HEIGHT;
|
Private->ModeData[MaxMode].Rows = VerticalResolution/GLYPH_HEIGHT;
|
||||||
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
Private->ModeData[MaxMode].GopWidth = HorizontalResolution;
|
||||||
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
Private->ModeData[MaxMode].GopHeight = VerticalResolution;
|
||||||
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
Private->ModeData[MaxMode].GopModeNumber = ModeNumber;
|
||||||
|
@ -501,7 +501,7 @@ GraphicsConsoleControllerDriverStart (
|
||||||
Private->ModeData[MaxMode].DeltaY = (VerticalResolution % GLYPH_HEIGHT) >> 1;
|
Private->ModeData[MaxMode].DeltaY = (VerticalResolution % GLYPH_HEIGHT) >> 1;
|
||||||
MaxMode++;
|
MaxMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update the maximum number of modes
|
// Update the maximum number of modes
|
||||||
//
|
//
|
||||||
|
@ -541,7 +541,7 @@ Error:
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Controller
|
Controller
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
|
@ -608,7 +608,7 @@ GraphicsConsoleControllerDriverStop (
|
||||||
This->DriverBindingHandle,
|
This->DriverBindingHandle,
|
||||||
Controller
|
Controller
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
gBS->CloseProtocol (
|
gBS->CloseProtocol (
|
||||||
Controller,
|
Controller,
|
||||||
&gEfiUgaDrawProtocolGuid,
|
&gEfiUgaDrawProtocolGuid,
|
||||||
|
@ -647,11 +647,11 @@ CheckModeSupported (
|
||||||
{
|
{
|
||||||
UINT32 ModeNumber;
|
UINT32 ModeNumber;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN SizeOfInfo;
|
UINTN SizeOfInfo;
|
||||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
for (ModeNumber = 0; ModeNumber < GraphicsOutput->Mode->MaxMode; ModeNumber++) {
|
for (ModeNumber = 0; ModeNumber < GraphicsOutput->Mode->MaxMode; ModeNumber++) {
|
||||||
Status = GraphicsOutput->QueryMode (
|
Status = GraphicsOutput->QueryMode (
|
||||||
GraphicsOutput,
|
GraphicsOutput,
|
||||||
|
@ -671,13 +671,13 @@ CheckModeSupported (
|
||||||
gBS->FreePool (Info);
|
gBS->FreePool (Info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ModeNumber == GraphicsOutput->Mode->MaxMode) {
|
if (ModeNumber == GraphicsOutput->Mode->MaxMode) {
|
||||||
Status = EFI_UNSUPPORTED;
|
Status = EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
*CurrentModeNumber = ModeNumber;
|
*CurrentModeNumber = ModeNumber;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -745,27 +745,27 @@ GraphicsConsoleConOutReset (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.Reset().
|
Implements SIMPLE_TEXT_OUTPUT.Reset().
|
||||||
If ExtendeVerification is TRUE, then perform dependent Graphics Console
|
If ExtendeVerification is TRUE, then perform dependent Graphics Console
|
||||||
device reset, and set display mode to mode 0.
|
device reset, and set display mode to mode 0.
|
||||||
If ExtendedVerification is FALSE, only set display mode to mode 0.
|
If ExtendedVerification is FALSE, only set display mode to mode 0.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
ExtendedVerification - Indicates that the driver may perform a more exhaustive
|
ExtendedVerification - Indicates that the driver may perform a more exhaustive
|
||||||
verification operation of the device during reset.
|
verification operation of the device during reset.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The reset operation succeeds.
|
The reset operation succeeds.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
The Graphics Console is not functioning correctly
|
The Graphics Console is not functioning correctly
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));
|
This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));
|
||||||
|
@ -780,31 +780,31 @@ GraphicsConsoleConOutOutputString (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.OutputString().
|
Implements SIMPLE_TEXT_OUTPUT.OutputString().
|
||||||
The Unicode string will be converted to Glyphs and will be
|
The Unicode string will be converted to Glyphs and will be
|
||||||
sent to the Graphics Console.
|
sent to the Graphics Console.
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
WString - The Null-terminated Unicode string to be displayed on
|
WString - The Null-terminated Unicode string to be displayed on
|
||||||
the Graphics Console.
|
the Graphics Console.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The string is output successfully.
|
The string is output successfully.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
The Graphics Console failed to send the string out.
|
The Graphics Console failed to send the string out.
|
||||||
|
|
||||||
EFI_WARN_UNKNOWN_GLYPH
|
EFI_WARN_UNKNOWN_GLYPH
|
||||||
Indicates that some of the characters in the Unicode string could not
|
Indicates that some of the characters in the Unicode string could not
|
||||||
be rendered and are skipped.
|
be rendered and are skipped.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
GRAPHICS_CONSOLE_DEV *Private;
|
GRAPHICS_CONSOLE_DEV *Private;
|
||||||
|
@ -927,7 +927,7 @@ GraphicsConsoleConOutOutputString (
|
||||||
GLYPH_HEIGHT,
|
GLYPH_HEIGHT,
|
||||||
Delta
|
Delta
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// Scroll Screen Up One Row
|
// Scroll Screen Up One Row
|
||||||
//
|
//
|
||||||
|
@ -1084,28 +1084,28 @@ GraphicsConsoleConOutTestString (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.TestString().
|
Implements SIMPLE_TEXT_OUTPUT.TestString().
|
||||||
If one of the characters in the *Wstring is
|
If one of the characters in the *Wstring is
|
||||||
neither valid valid Unicode drawing characters,
|
neither valid valid Unicode drawing characters,
|
||||||
not ASCII code, then this function will return
|
not ASCII code, then this function will return
|
||||||
EFI_UNSUPPORTED.
|
EFI_UNSUPPORTED.
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
WString - The Null-terminated Unicode string to be tested.
|
WString - The Null-terminated Unicode string to be tested.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The Graphics Console is capable of rendering the output string.
|
The Graphics Console is capable of rendering the output string.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
Some of the characters in the Unicode string cannot be rendered.
|
Some of the characters in the Unicode string cannot be rendered.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -1145,45 +1145,45 @@ GraphicsConsoleConOutQueryMode (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.QueryMode().
|
Implements SIMPLE_TEXT_OUTPUT.QueryMode().
|
||||||
It returnes information for an available text mode
|
It returnes information for an available text mode
|
||||||
that the Graphics Console supports.
|
that the Graphics Console supports.
|
||||||
In this driver,we only support text mode 80x25, which is
|
In this driver,we only support text mode 80x25, which is
|
||||||
defined as mode 0.
|
defined as mode 0.
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
ModeNumber - The mode number to return information on.
|
ModeNumber - The mode number to return information on.
|
||||||
|
|
||||||
Columns - The returned columns of the requested mode.
|
Columns - The returned columns of the requested mode.
|
||||||
|
|
||||||
Rows - The returned rows of the requested mode.
|
Rows - The returned rows of the requested mode.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The requested mode information is returned.
|
The requested mode information is returned.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
The mode number is not valid.
|
The mode number is not valid.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
GRAPHICS_CONSOLE_DEV *Private;
|
GRAPHICS_CONSOLE_DEV *Private;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
if (ModeNumber >= (UINTN) This->Mode->MaxMode) {
|
if (ModeNumber >= (UINTN) This->Mode->MaxMode) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
|
||||||
|
|
||||||
*Columns = Private->ModeData[ModeNumber].Columns;
|
*Columns = Private->ModeData[ModeNumber].Columns;
|
||||||
|
@ -1208,28 +1208,28 @@ GraphicsConsoleConOutSetMode (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.SetMode().
|
Implements SIMPLE_TEXT_OUTPUT.SetMode().
|
||||||
Set the Graphics Console to a specified mode.
|
Set the Graphics Console to a specified mode.
|
||||||
In this driver, we only support mode 0.
|
In this driver, we only support mode 0.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
ModeNumber - The text mode to set.
|
ModeNumber - The text mode to set.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The requested text mode is set.
|
The requested text mode is set.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
The requested text mode cannot be set because of Graphics Console device error.
|
The requested text mode cannot be set because of Graphics Console device error.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
The text mode number is not valid.
|
The text mode number is not valid.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -1340,7 +1340,7 @@ GraphicsConsoleConOutSetMode (
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// Get the current UGA Draw mode information
|
// Get the current UGA Draw mode information
|
||||||
//
|
//
|
||||||
|
@ -1412,31 +1412,31 @@ GraphicsConsoleConOutSetAttribute (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.SetAttribute().
|
Implements SIMPLE_TEXT_OUTPUT.SetAttribute().
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
Attrubute - The attribute to set. Only bit0..6 are valid, all other bits
|
Attrubute - The attribute to set. Only bit0..6 are valid, all other bits
|
||||||
are undefined and must be zero.
|
are undefined and must be zero.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The requested attribute is set.
|
The requested attribute is set.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
The requested attribute cannot be set due to Graphics Console port error.
|
The requested attribute cannot be set due to Graphics Console port error.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
The attribute requested is not defined by EFI spec.
|
The attribute requested is not defined by EFI spec.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
if ((Attribute | 0xFF) != 0xFF) {
|
if ((Attribute | 0xFF) != 0xFF) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
@ -1465,27 +1465,27 @@ GraphicsConsoleConOutClearScreen (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.ClearScreen().
|
Implements SIMPLE_TEXT_OUTPUT.ClearScreen().
|
||||||
It clears the Graphics Console's display to the
|
It clears the Graphics Console's display to the
|
||||||
currently selected background color.
|
currently selected background color.
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The operation completed successfully.
|
The operation completed successfully.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
The Graphics Console cannot be cleared due to Graphics Console device error.
|
The Graphics Console cannot be cleared due to Graphics Console device error.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
The Graphics Console is not in a valid text mode.
|
The Graphics Console is not in a valid text mode.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
@ -1518,7 +1518,7 @@ GraphicsConsoleConOutClearScreen (
|
||||||
ModeData->GopHeight,
|
ModeData->GopHeight,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) (UINTN) &Background,
|
(EFI_UGA_PIXEL *) (UINTN) &Background,
|
||||||
|
@ -1531,6 +1531,8 @@ GraphicsConsoleConOutClearScreen (
|
||||||
ModeData->GopHeight,
|
ModeData->GopHeight,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
Status = EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->Mode->CursorColumn = 0;
|
This->Mode->CursorColumn = 0;
|
||||||
|
@ -1552,29 +1554,29 @@ GraphicsConsoleConOutSetCursorPosition (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.SetCursorPosition().
|
Implements SIMPLE_TEXT_OUTPUT.SetCursorPosition().
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
Column - The row to set cursor to.
|
Column - The row to set cursor to.
|
||||||
|
|
||||||
Row - The column to set cursor to.
|
Row - The column to set cursor to.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The operation completed successfully.
|
The operation completed successfully.
|
||||||
|
|
||||||
EFI_DEVICE_ERROR
|
EFI_DEVICE_ERROR
|
||||||
The request fails due to Graphics Console device error.
|
The request fails due to Graphics Console device error.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
The Graphics Console is not in a valid text mode, or the cursor position
|
The Graphics Console is not in a valid text mode, or the cursor position
|
||||||
is invalid for current mode.
|
is invalid for current mode.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
GRAPHICS_CONSOLE_DEV *Private;
|
GRAPHICS_CONSOLE_DEV *Private;
|
||||||
|
@ -1620,31 +1622,31 @@ GraphicsConsoleConOutEnableCursor (
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
Routine Description:
|
Routine Description:
|
||||||
|
|
||||||
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
|
||||||
In this driver, the cursor cannot be hidden.
|
In this driver, the cursor cannot be hidden.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
This - Indicates the calling context.
|
This - Indicates the calling context.
|
||||||
|
|
||||||
Visible - If TRUE, the cursor is set to be visible,
|
Visible - If TRUE, the cursor is set to be visible,
|
||||||
If FALSE, the cursor is set to be invisible.
|
If FALSE, the cursor is set to be invisible.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
EFI_SUCCESS
|
EFI_SUCCESS
|
||||||
The request is valid.
|
The request is valid.
|
||||||
|
|
||||||
EFI_UNSUPPORTED
|
EFI_UNSUPPORTED
|
||||||
The Graphics Console does not support a hidden cursor.
|
The Graphics Console does not support a hidden cursor.
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||||
|
|
||||||
EraseCursor (This);
|
EraseCursor (This);
|
||||||
|
|
||||||
This->Mode->CursorVisible = Visible;
|
This->Mode->CursorVisible = Visible;
|
||||||
|
@ -1729,7 +1731,7 @@ DrawUnicodeWeightAtCursorN (
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
ASSERT (Private->UgaDraw!= NULL);
|
ASSERT (Private->UgaDraw!= NULL);
|
||||||
|
|
||||||
UgaDraw = Private->UgaDraw;
|
UgaDraw = Private->UgaDraw;
|
||||||
|
@ -1765,7 +1767,7 @@ DrawUnicodeWeightAtCursorN (
|
||||||
// always be 1. ASSERT here to make sure.
|
// always be 1. ASSERT here to make sure.
|
||||||
//
|
//
|
||||||
ASSERT (RowInfoArraySize == 1);
|
ASSERT (RowInfoArraySize == 1);
|
||||||
|
|
||||||
Status = UgaDraw->Blt (
|
Status = UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) Blt->Image.Bitmap,
|
(EFI_UGA_PIXEL *) Blt->Image.Bitmap,
|
||||||
|
@ -1782,6 +1784,8 @@ DrawUnicodeWeightAtCursorN (
|
||||||
|
|
||||||
SafeFreePool (RowInfoArray);
|
SafeFreePool (RowInfoArray);
|
||||||
SafeFreePool (Blt->Image.Bitmap);
|
SafeFreePool (Blt->Image.Bitmap);
|
||||||
|
} else {
|
||||||
|
Status = EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeFreePool (Blt);
|
SafeFreePool (Blt);
|
||||||
|
@ -1840,7 +1844,7 @@ EraseCursor (
|
||||||
GLYPH_HEIGHT,
|
GLYPH_HEIGHT,
|
||||||
GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
UgaDraw->Blt (
|
UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) (UINTN) BltChar,
|
(EFI_UGA_PIXEL *) (UINTN) BltChar,
|
||||||
|
@ -1881,7 +1885,7 @@ EraseCursor (
|
||||||
GLYPH_HEIGHT,
|
GLYPH_HEIGHT,
|
||||||
GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
GLYPH_WIDTH * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||||
);
|
);
|
||||||
} else {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
UgaDraw->Blt (
|
UgaDraw->Blt (
|
||||||
UgaDraw,
|
UgaDraw,
|
||||||
(EFI_UGA_PIXEL *) (UINTN) BltChar,
|
(EFI_UGA_PIXEL *) (UINTN) BltChar,
|
||||||
|
@ -1902,9 +1906,9 @@ EraseCursor (
|
||||||
/**
|
/**
|
||||||
The user Entry Point for module GraphicsConsole. The user code starts with this function.
|
The user Entry Point for module GraphicsConsole. The user code starts with this function.
|
||||||
|
|
||||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||||
@retval other Some error occurs when executing this entry point.
|
@retval other Some error occurs when executing this entry point.
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
Module Name:
|
Module Name:
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Module Name:
|
||||||
|
|
||||||
Abstract:
|
Abstract:
|
||||||
|
|
||||||
|
|
||||||
Revision History
|
Revision History
|
||||||
|
|
||||||
--*/
|
--*/
|
||||||
|
@ -24,7 +24,6 @@ Revision History
|
||||||
#define _GRAPHICS_CONSOLE_H
|
#define _GRAPHICS_CONSOLE_H
|
||||||
|
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
//#include <Protocol/FrameworkHii.h>
|
|
||||||
#include <Protocol/SimpleTextOut.h>
|
#include <Protocol/SimpleTextOut.h>
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
#include <Protocol/UgaDraw.h>
|
#include <Protocol/UgaDraw.h>
|
||||||
|
@ -32,12 +31,12 @@ Revision History
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/UefiDriverEntryPoint.h>
|
#include <Library/UefiDriverEntryPoint.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
//#include <Library/FrameworkHiiLib.h>
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/HiiLib.h>
|
#include <Library/HiiLib.h>
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/PcdLib.h>
|
||||||
|
|
||||||
#include <MdeModuleHii.h>
|
#include <MdeModuleHii.h>
|
||||||
|
|
||||||
|
|
|
@ -61,4 +61,6 @@
|
||||||
gEfiUgaDrawProtocolGuid # PROTOCOL TO_START
|
gEfiUgaDrawProtocolGuid # PROTOCOL TO_START
|
||||||
gEfiHiiFontProtocolGuid
|
gEfiHiiFontProtocolGuid
|
||||||
gEfiHiiDatabaseProtocolGuid
|
gEfiHiiDatabaseProtocolGuid
|
||||||
|
|
||||||
|
[FeaturePcd.common]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport
|
Loading…
Reference in New Issue