15 GRAPHICS_CONSOLE_DEV_SIGNATURE,
33 EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK),
57VOID *mHiiRegistration;
60 0xf5f219d3, 0x7006, 0x4648, { 0xac, 0x8d, 0xd6, 0x1d, 0xfb, 0x7b, 0xc6, 0xad }
63CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
69 { 0x00, 0x00, 0x00, 0x00 },
70 { 0x98, 0x00, 0x00, 0x00 },
71 { 0x00, 0x98, 0x00, 0x00 },
72 { 0x98, 0x98, 0x00, 0x00 },
73 { 0x00, 0x00, 0x98, 0x00 },
74 { 0x98, 0x00, 0x98, 0x00 },
75 { 0x00, 0x98, 0x98, 0x00 },
76 { 0x98, 0x98, 0x98, 0x00 },
77 { 0x30, 0x30, 0x30, 0x00 },
78 { 0xff, 0x00, 0x00, 0x00 },
79 { 0x00, 0xff, 0x00, 0x00 },
80 { 0xff, 0xff, 0x00, 0x00 },
81 { 0x00, 0x00, 0xff, 0x00 },
82 { 0xff, 0x00, 0xff, 0x00 },
83 { 0x00, 0xff, 0xff, 0x00 },
84 { 0xff, 0xff, 0xff, 0x00 }
90 { 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF }
93CHAR16 SpaceStr[] = { NARROW_CHAR,
' ', 0 };
133 GraphicsOutput =
NULL;
138 Status =
gBS->OpenProtocol (
140 &gEfiGraphicsOutputProtocolGuid,
141 (VOID **)&GraphicsOutput,
142 This->DriverBindingHandle,
144 EFI_OPEN_PROTOCOL_BY_DRIVER
147 if (EFI_ERROR (Status) &&
FeaturePcdGet (PcdUgaConsumeSupport)) {
151 Status =
gBS->OpenProtocol (
153 &gEfiUgaDrawProtocolGuid,
155 This->DriverBindingHandle,
157 EFI_OPEN_PROTOCOL_BY_DRIVER
161 if (EFI_ERROR (Status)) {
170 Status =
gBS->OpenProtocol (
172 &gEfiDevicePathProtocolGuid,
173 (VOID **)&DevicePath,
174 This->DriverBindingHandle,
176 EFI_OPEN_PROTOCOL_BY_DRIVER
178 if (!EFI_ERROR (Status)) {
181 &gEfiDevicePathProtocolGuid,
182 This->DriverBindingHandle,
198 if (GraphicsOutput !=
NULL) {
201 &gEfiGraphicsOutputProtocolGuid,
202 This->DriverBindingHandle,
208 &gEfiUgaDrawProtocolGuid,
209 This->DriverBindingHandle,
235 IN UINT32 HorizontalResolution,
236 IN UINT32 VerticalResolution,
237 IN UINT32 GopModeNumber,
251 if ((TextModeCount ==
NULL) || (TextModeData ==
NULL)) {
252 return EFI_INVALID_PARAMETER;
261 MaxColumns = HorizontalResolution / EFI_GLYPH_WIDTH;
262 MaxRows = VerticalResolution / EFI_GLYPH_HEIGHT;
267 ASSERT ((MaxColumns >= 80) && (MaxRows >= 25));
272 mGraphicsConsoleModeData[Count - 1].Columns = MaxColumns;
273 mGraphicsConsoleModeData[Count - 1].Rows = MaxRows;
278 ModeBuffer = mGraphicsConsoleModeData;
286 ASSERT (NewModeBuffer !=
NULL);
293 NewModeBuffer[ValidCount].Columns = 80;
294 NewModeBuffer[ValidCount].Rows = 25;
295 NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
296 NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
297 NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
298 NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (NewModeBuffer[ValidCount].Columns * EFI_GLYPH_WIDTH)) >> 1;
299 NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1;
302 if ((MaxColumns >= 80) && (MaxRows >= 50)) {
303 NewModeBuffer[ValidCount].Columns = 80;
304 NewModeBuffer[ValidCount].Rows = 50;
305 NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (80 * EFI_GLYPH_WIDTH)) >> 1;
306 NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1;
309 NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
310 NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
311 NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
317 for (Index = 0; Index < Count; Index++) {
318 if ((ModeBuffer[Index].Columns == 0) || (ModeBuffer[Index].Rows == 0) ||
319 (ModeBuffer[Index].Columns > MaxColumns) || (ModeBuffer[Index].Rows > MaxRows))
327 for (ValidIndex = 0; ValidIndex < ValidCount; ValidIndex++) {
328 if ((ModeBuffer[Index].Columns == NewModeBuffer[ValidIndex].Columns) &&
329 (ModeBuffer[Index].Rows == NewModeBuffer[ValidIndex].Rows))
338 if (ValidIndex == ValidCount) {
339 NewModeBuffer[ValidCount].Columns = ModeBuffer[Index].Columns;
340 NewModeBuffer[ValidCount].Rows = ModeBuffer[Index].Rows;
341 NewModeBuffer[ValidCount].GopWidth = HorizontalResolution;
342 NewModeBuffer[ValidCount].GopHeight = VerticalResolution;
343 NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;
344 NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (NewModeBuffer[ValidCount].Columns * EFI_GLYPH_WIDTH)) >> 1;
345 NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1;
351 for (Index = 0; Index < ValidCount; Index++) {
354 "Graphics - Mode %d, Column = %d, Row = %d\n",
356 NewModeBuffer[Index].Columns,
357 NewModeBuffer[Index].Rows
366 *TextModeCount = ValidCount;
367 *TextModeData = NewModeBuffer;
395 UINT32 HorizontalResolution;
396 UINT32 VerticalResolution;
419 &mGraphicsConsoleDevTemplate
421 if (Private ==
NULL) {
422 return EFI_OUT_OF_RESOURCES;
425 Private->SimpleTextOutput.
Mode = &(Private->SimpleTextOutputMode);
427 Status =
gBS->OpenProtocol (
429 &gEfiGraphicsOutputProtocolGuid,
430 (VOID **)&Private->GraphicsOutput,
431 This->DriverBindingHandle,
433 EFI_OPEN_PROTOCOL_BY_DRIVER
436 if (EFI_ERROR (Status) &&
FeaturePcdGet (PcdUgaConsumeSupport)) {
437 Status =
gBS->OpenProtocol (
439 &gEfiUgaDrawProtocolGuid,
440 (VOID **)&Private->UgaDraw,
441 This->DriverBindingHandle,
443 EFI_OPEN_PROTOCOL_BY_DRIVER
447 if (EFI_ERROR (Status)) {
451 HorizontalResolution =
PcdGet32 (PcdVideoHorizontalResolution);
452 VerticalResolution =
PcdGet32 (PcdVideoVerticalResolution);
454 if (Private->GraphicsOutput !=
NULL) {
460 if ((HorizontalResolution == 0x0) || (VerticalResolution == 0x0)) {
466 for (ModeIndex = 0; ModeIndex < MaxMode; ModeIndex++) {
467 Status = Private->GraphicsOutput->QueryMode (
468 Private->GraphicsOutput,
473 if (!EFI_ERROR (Status)) {
479 ModeNumber = ModeIndex;
486 if ((HorizontalResolution == 0x0) || (VerticalResolution == 0x0)) {
487 Status = EFI_UNSUPPORTED;
495 Private->GraphicsOutput,
496 HorizontalResolution,
500 if (EFI_ERROR (Status)) {
504 HorizontalResolution = 800;
505 VerticalResolution = 600;
507 Private->GraphicsOutput,
508 HorizontalResolution,
512 Mode = Private->GraphicsOutput->
Mode;
513 if (EFI_ERROR (Status) && (Mode->
MaxMode != 0)) {
519 ModeNumber = Mode->
Mode;
524 if (EFI_ERROR (Status) || (ModeNumber != Private->GraphicsOutput->
Mode->
Mode)) {
529 Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);
530 if (EFI_ERROR (Status)) {
543 Status = Private->UgaDraw->SetMode (
545 HorizontalResolution,
550 if (EFI_ERROR (Status)) {
554 Status = Private->UgaDraw->SetMode (
561 if (EFI_ERROR (Status)) {
562 Status = Private->UgaDraw->GetMode (
564 &HorizontalResolution,
569 if (EFI_ERROR (Status)) {
576 DEBUG ((DEBUG_INFO,
"GraphicsConsole video resolution %d x %d\n", HorizontalResolution, VerticalResolution));
582 HorizontalResolution,
589 if (EFI_ERROR (Status)) {
596 Private->SimpleTextOutputMode.
MaxMode = (INT32)MaxMode;
602 DefaultColumn =
PcdGet32 (PcdConOutColumn);
603 DefaultRow =
PcdGet32 (PcdConOutRow);
606 for (Index = 0; Index < (INT32)MaxMode; Index++) {
607 if ((DefaultColumn != 0) && (DefaultRow != 0)) {
608 if ((Private->ModeData[Index].Columns == DefaultColumn) &&
609 (Private->ModeData[Index].Rows == DefaultRow))
615 if ((Private->ModeData[Index].Columns > Column) &&
616 (Private->ModeData[Index].Rows > Row))
618 Column = Private->ModeData[Index].Columns;
619 Row = Private->ModeData[Index].Rows;
625 Private->SimpleTextOutput.
Mode->
Mode = (INT32)PreferMode;
626 DEBUG ((DEBUG_INFO,
"Graphics Console Started, Mode: %d\n", PreferMode));
631 Status =
gBS->InstallMultipleProtocolInterfaces (
633 &gEfiSimpleTextOutProtocolGuid,
634 &Private->SimpleTextOutput,
639 if (EFI_ERROR (Status)) {
643 if (Private->GraphicsOutput !=
NULL) {
646 &gEfiGraphicsOutputProtocolGuid,
647 This->DriverBindingHandle,
653 &gEfiUgaDrawProtocolGuid,
654 This->DriverBindingHandle,
659 if (Private->LineBuffer !=
NULL) {
663 if (Private->ModeData !=
NULL) {
707 Status =
gBS->OpenProtocol (
709 &gEfiSimpleTextOutProtocolGuid,
710 (VOID **)&SimpleTextOutput,
711 This->DriverBindingHandle,
713 EFI_OPEN_PROTOCOL_GET_PROTOCOL
715 if (EFI_ERROR (Status)) {
716 return EFI_NOT_STARTED;
719 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (SimpleTextOutput);
721 Status =
gBS->UninstallProtocolInterface (
723 &gEfiSimpleTextOutProtocolGuid,
724 &Private->SimpleTextOutput
727 if (!EFI_ERROR (Status)) {
731 if (Private->GraphicsOutput !=
NULL) {
734 &gEfiGraphicsOutputProtocolGuid,
735 This->DriverBindingHandle,
741 &gEfiUgaDrawProtocolGuid,
742 This->DriverBindingHandle,
747 if (Private->LineBuffer !=
NULL) {
751 if (Private->ModeData !=
NULL) {
786 IN UINT32 HorizontalResolution,
787 IN UINT32 VerticalResolution,
788 OUT UINT32 *CurrentModeNumber
800 for (ModeNumber = 0; ModeNumber < MaxMode; ModeNumber++) {
801 Status = GraphicsOutput->QueryMode (
807 if (!EFI_ERROR (Status)) {
820 Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
821 if (!EFI_ERROR (Status)) {
833 Status = EFI_UNSUPPORTED;
836 *CurrentModeNumber = ModeNumber;
856 Status =
gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid,
NULL, (VOID **)&mHiiDatabase);
857 if (EFI_ERROR (Status)) {
861 Status =
gBS->LocateProtocol (&gEfiHiiFontProtocolGuid,
NULL, (VOID **)&mHiiFont);
891 IN BOOLEAN ExtendedVerification
896 Status = This->SetMode (This, 0);
897 if (EFI_ERROR (Status)) {
901 Status = This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BACKGROUND_BLACK));
951 INT32 OriginAttribute;
954 if (This->Mode->Mode == -1) {
958 return EFI_UNSUPPORTED;
963 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
967 Mode = This->Mode->Mode;
968 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
969 GraphicsOutput = Private->GraphicsOutput;
970 UgaDraw = Private->UgaDraw;
972 MaxColumn = Private->ModeData[Mode].Columns;
973 MaxRow = Private->ModeData[Mode].Rows;
974 DeltaX = (
UINTN)Private->ModeData[Mode].DeltaX;
975 DeltaY = (
UINTN)Private->ModeData[Mode].DeltaY;
976 Width = MaxColumn * EFI_GLYPH_WIDTH;
977 Height = (MaxRow - 1) * EFI_GLYPH_HEIGHT;
992 OriginAttribute = This->Mode->Attribute;
994 while (*WString != L
'\0') {
995 if (*WString == CHAR_BACKSPACE) {
1000 if ((This->Mode->CursorColumn == 0) && (This->Mode->CursorRow > 0)) {
1001 This->Mode->CursorRow--;
1002 This->Mode->CursorColumn = (INT32)(MaxColumn - 1);
1003 This->OutputString (This, SpaceStr);
1005 This->Mode->CursorRow--;
1006 This->Mode->CursorColumn = (INT32)(MaxColumn - 1);
1007 }
else if (This->Mode->CursorColumn > 0) {
1012 This->Mode->CursorColumn--;
1013 This->OutputString (This, SpaceStr);
1015 This->Mode->CursorColumn--;
1019 }
else if (*WString == CHAR_LINEFEED) {
1025 if (This->Mode->CursorRow == (INT32)(MaxRow - 1)) {
1026 if (GraphicsOutput !=
NULL) {
1030 GraphicsOutput->Blt (
1035 DeltaY + EFI_GLYPH_HEIGHT,
1046 GraphicsOutput->Blt (
1067 DeltaY + EFI_GLYPH_HEIGHT,
1092 This->Mode->CursorRow++;
1096 }
else if (*WString == CHAR_CARRIAGE_RETURN) {
1100 This->Mode->CursorColumn = 0;
1102 }
else if (*WString == WIDE_CHAR) {
1103 This->Mode->Attribute |= EFI_WIDE_ATTRIBUTE;
1105 }
else if (*WString == NARROW_CHAR) {
1106 This->Mode->Attribute &= (~(UINT32)EFI_WIDE_ATTRIBUTE);
1122 for (Count = 0, Index = 0; (This->Mode->CursorColumn + Index) < MaxColumn; Count++, Index++) {
1123 if ((WString[Count] == CHAR_NULL) ||
1124 (WString[Count] == CHAR_BACKSPACE) ||
1125 (WString[Count] == CHAR_LINEFEED) ||
1126 (WString[Count] == CHAR_CARRIAGE_RETURN) ||
1127 (WString[Count] == WIDE_CHAR) ||
1128 (WString[Count] == NARROW_CHAR))
1136 if ((This->Mode->Attribute & EFI_WIDE_ATTRIBUTE) != 0) {
1146 if ((This->Mode->CursorColumn + Index + 1) > MaxColumn) {
1154 if (EFI_ERROR (Status)) {
1162 This->Mode->CursorColumn += (INT32)Index;
1163 if (This->Mode->CursorColumn > (INT32)MaxColumn) {
1164 This->Mode->CursorColumn -= 2;
1165 This->OutputString (This, SpaceStr);
1168 if (This->Mode->CursorColumn >= (INT32)MaxColumn) {
1170 This->OutputString (This, mCrLfString);
1176 This->Mode->Attribute = OriginAttribute;
1181 Status = EFI_WARN_UNKNOWN_GLYPH;
1184 gBS->RestoreTPL (OldTpl);
1222 while (WString[Count] != 0) {
1223 Status = mHiiFont->GetGlyph (
1237 if (EFI_ERROR (Status)) {
1238 return EFI_UNSUPPORTED;
1275 if (ModeNumber >= (
UINTN)This->Mode->MaxMode) {
1276 return EFI_UNSUPPORTED;
1279 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1282 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
1284 *Columns = Private->ModeData[ModeNumber].Columns;
1285 *Rows = Private->ModeData[ModeNumber].Rows;
1287 if ((*Columns <= 0) || (*Rows <= 0)) {
1288 Status = EFI_UNSUPPORTED;
1293 gBS->RestoreTPL (OldTpl);
1323 UINT32 HorizontalResolution;
1324 UINT32 VerticalResolution;
1331 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1333 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
1334 GraphicsOutput = Private->GraphicsOutput;
1335 UgaDraw = Private->UgaDraw;
1340 if (ModeNumber >= (
UINTN)This->Mode->MaxMode) {
1341 Status = EFI_UNSUPPORTED;
1345 ModeData = &(Private->ModeData[ModeNumber]);
1347 if ((ModeData->Columns <= 0) && (ModeData->Rows <= 0)) {
1348 Status = EFI_UNSUPPORTED;
1355 if (Private->LineBuffer !=
NULL) {
1359 if ((INT32)ModeNumber == This->Mode->Mode) {
1363 This->ClearScreen (This);
1382 if (NewLineBuffer ==
NULL) {
1387 Status = EFI_OUT_OF_RESOURCES;
1394 Private->LineBuffer = NewLineBuffer;
1396 if (GraphicsOutput !=
NULL) {
1397 if (ModeData->GopModeNumber != GraphicsOutput->
Mode->
Mode) {
1401 Status = GraphicsOutput->SetMode (GraphicsOutput, ModeData->GopModeNumber);
1402 if (EFI_ERROR (Status)) {
1412 Status = GraphicsOutput->Blt (
1414 &mGraphicsEfiColors[0],
1421 ModeData->GopHeight,
1429 Status = UgaDraw->GetMode (
1431 &HorizontalResolution,
1432 &VerticalResolution,
1436 if (EFI_ERROR (Status) || (HorizontalResolution != ModeData->GopWidth) || (VerticalResolution != ModeData->GopHeight)) {
1440 Status = UgaDraw->SetMode (
1443 ModeData->GopHeight,
1447 if (EFI_ERROR (Status)) {
1457 Status = UgaDraw->Blt (
1466 ModeData->GopHeight,
1475 This->Mode->Mode = (INT32)ModeNumber;
1480 This->Mode->CursorColumn = 0;
1481 This->Mode->CursorRow = 0;
1488 gBS->RestoreTPL (OldTpl);
1517 if ((Attribute | 0x7F) != 0x7F) {
1518 return EFI_UNSUPPORTED;
1521 if ((INT32)Attribute == This->Mode->Attribute) {
1525 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1529 This->Mode->Attribute = (INT32)Attribute;
1533 gBS->RestoreTPL (OldTpl);
1566 if (This->Mode->Mode == -1) {
1570 return EFI_UNSUPPORTED;
1573 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1575 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
1576 GraphicsOutput = Private->GraphicsOutput;
1577 UgaDraw = Private->UgaDraw;
1578 ModeData = &(Private->ModeData[This->Mode->Mode]);
1581 if (GraphicsOutput !=
NULL) {
1582 Status = GraphicsOutput->Blt (
1591 ModeData->GopHeight,
1595 Status = UgaDraw->Blt (
1604 ModeData->GopHeight,
1608 Status = EFI_UNSUPPORTED;
1611 This->Mode->CursorColumn = 0;
1612 This->Mode->CursorRow = 0;
1616 gBS->RestoreTPL (OldTpl);
1653 if (This->Mode->Mode == -1) {
1657 return EFI_UNSUPPORTED;
1662 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1664 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
1665 ModeData = &(Private->ModeData[This->Mode->Mode]);
1667 if ((Column >= ModeData->Columns) || (Row >= ModeData->Rows)) {
1668 Status = EFI_UNSUPPORTED;
1672 if ((This->Mode->CursorColumn == (INT32)Column) && (This->Mode->CursorRow == (INT32)Row)) {
1679 This->Mode->CursorColumn = (INT32)Column;
1680 This->Mode->CursorRow = (INT32)Row;
1685 gBS->RestoreTPL (OldTpl);
1713 if (This->Mode->Mode == -1) {
1717 return EFI_UNSUPPORTED;
1720 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1724 This->Mode->CursorVisible = Visible;
1728 gBS->RestoreTPL (OldTpl);
1751 Attribute = This->Mode->Attribute & 0x7F;
1753 *Foreground = mGraphicsEfiColors[Attribute & 0x0f];
1754 *Background = mGraphicsEfiColors[Attribute >> 4];
1775 IN CHAR16 *UnicodeWeight,
1786 UINTN RowInfoArraySize;
1788 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
1791 return EFI_OUT_OF_RESOURCES;
1794 Blt->Width = (UINT16)(Private->ModeData[This->Mode->Mode].GopWidth);
1795 Blt->Height = (UINT16)(Private->ModeData[This->Mode->Mode].GopHeight);
1798 if (String ==
NULL) {
1800 return EFI_OUT_OF_RESOURCES;
1806 *(String + Count) = L
'\0';
1809 if (FontInfo ==
NULL) {
1812 return EFI_OUT_OF_RESOURCES;
1818 GetTextColors (This, &FontInfo->ForegroundColor, &FontInfo->BackgroundColor);
1820 if (Private->GraphicsOutput !=
NULL) {
1824 Blt->Image.Screen = Private->GraphicsOutput;
1826 Status = mHiiFont->StringToImage (
1828 EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_DIRECT_TO_SCREEN | EFI_HII_IGNORE_LINE_BREAK,
1832 This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
1833 This->Mode->CursorRow * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
1843 ASSERT (Private->UgaDraw !=
NULL);
1845 UgaDraw = Private->UgaDraw;
1848 if (Blt->Image.Bitmap ==
NULL) {
1851 return EFI_OUT_OF_RESOURCES;
1854 RowInfoArray =
NULL;
1859 Status = mHiiFont->StringToImage (
1861 EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_IGNORE_LINE_BREAK,
1865 This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
1866 This->Mode->CursorRow * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
1872 if (!EFI_ERROR (Status)) {
1877 ASSERT (RowInfoArraySize <= 1);
1879 Status = UgaDraw->Blt (
1883 This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
1884 (This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
1885 This->Mode->CursorColumn * EFI_GLYPH_WIDTH + Private->ModeData[This->Mode->Mode].DeltaX,
1886 (This->Mode->CursorRow) * EFI_GLYPH_HEIGHT + Private->ModeData[This->Mode->Mode].DeltaY,
1896 Status = EFI_UNSUPPORTED;
1903 if (String !=
NULL) {
1907 if (FontInfo !=
NULL) {
1944 CurrentMode = This->
Mode;
1950 Private = GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS (This);
1951 GraphicsOutput = Private->GraphicsOutput;
1952 UgaDraw = Private->UgaDraw;
1960 GlyphX = (CurrentMode->
CursorColumn * EFI_GLYPH_WIDTH) + Private->ModeData[CurrentMode->
Mode].DeltaX;
1961 GlyphY = (CurrentMode->
CursorRow * EFI_GLYPH_HEIGHT) + Private->ModeData[CurrentMode->
Mode].DeltaY;
1962 if (GraphicsOutput !=
NULL) {
1963 GraphicsOutput->Blt (
1995 for (PosY = 0; PosY < EFI_GLYPH_HEIGHT; PosY++) {
1996 for (PosX = 0; PosX < EFI_GLYPH_WIDTH; PosX++) {
1997 if ((mCursorGlyph.
GlyphCol1[PosY] & (BIT0 << PosX)) != 0) {
1998 BltChar[PosY][EFI_GLYPH_WIDTH - PosX - 1].Raw ^= Foreground.Raw;
2003 if (GraphicsOutput !=
NULL) {
2004 GraphicsOutput->Blt (
2051 UINT32 PackageLength;
2059 Status =
gBS->LocateProtocol (
2060 &gEfiHiiDatabaseProtocolGuid,
2062 (VOID **)&HiiDatabase
2064 if (EFI_ERROR (Status)) {
2087 ASSERT (Package !=
NULL);
2091 SimplifiedFont->Header.Length = (UINT32)(PackageLength - 4);
2092 SimplifiedFont->Header.Type = EFI_HII_PACKAGE_SIMPLE_FONTS;
2093 SimplifiedFont->NumberOfNarrowGlyphs = (UINT16)(mNarrowFontSize /
sizeof (
EFI_NARROW_GLYPH));
2095 Location = (UINT8 *)(&SimplifiedFont->NumberOfWideGlyphs + 1);
2096 CopyMem (Location, gUsStdNarrowGlyphData, mNarrowFontSize);
2102 &mFontPackageListGuid,
2107 ASSERT (mHiiHandle !=
NULL);
2134 &gEfiHiiDatabaseProtocolGuid,
2147 &gGraphicsConsoleDriverBinding,
2149 &gGraphicsConsoleComponentName,
2150 &gGraphicsConsoleComponentName2
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS EFIAPI GraphicsConsoleConOutQueryMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows)
EFI_STATUS EFIAPI GraphicsConsoleConOutSetAttribute(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Attribute)
EFI_STATUS DrawUnicodeWeightAtCursorN(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *UnicodeWeight, IN UINTN Count)
EFI_STATUS EFIAPI InitializeGraphicsConsole(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI GraphicsConsoleConOutClearScreen(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This)
EFI_STATUS InitializeGraphicsConsoleTextMode(IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, IN UINT32 GopModeNumber, OUT UINTN *TextModeCount, OUT GRAPHICS_CONSOLE_MODE_DATA **TextModeData)
EFI_STATUS EFIAPI GraphicsConsoleConOutSetMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber)
EFI_STATUS EFIAPI GraphicsConsoleConOutEnableCursor(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN Visible)
EFI_STATUS EFIAPI GraphicsConsoleControllerDriverStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
VOID EFIAPI RegisterFontPackage(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI GraphicsConsoleConOutTestString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
EFI_STATUS EfiLocateHiiProtocol(VOID)
EFI_STATUS EFIAPI GraphicsConsoleControllerDriverStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI GraphicsConsoleConOutReset(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI GraphicsConsoleConOutSetCursorPosition(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Column, IN UINTN Row)
EFI_STATUS EFIAPI GraphicsConsoleControllerDriverSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI GraphicsConsoleConOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
EFI_STATUS CheckModeSupported(EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, OUT UINT32 *CurrentModeNumber)
EFI_STATUS GetTextColors(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background)
EFI_STATUS FlushCursor(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG_CODE_BEGIN()
#define DEBUG(Expression)
#define PcdGet32(TokenName)
#define FeaturePcdGet(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_EVENT EFIAPI EfiCreateProtocolNotifyEvent(IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext OPTIONAL, OUT VOID **Registration)
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE * Mode
UINTN LineHeight
The height of the line, in pixels.
UINTN LineWidth
The width of the text on the line, in pixels.
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode
UINT32 VerticalResolution
UINT32 HorizontalResolution
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION * Info
UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]