13BOOLEAN mModeInitialized =
FALSE;
18UINT32 mBootHorizontalResolution = 0;
19UINT32 mBootVerticalResolution = 0;
20UINT32 mBootTextModeColumn = 0;
21UINT32 mBootTextModeRow = 0;
25UINT32 mSetupTextModeColumn = 0;
26UINT32 mSetupTextModeRow = 0;
27UINT32 mSetupHorizontalResolution = 0;
28UINT32 mSetupVerticalResolution = 0;
50 CHAR16 *TurncateString;
63 if ((Column > (ScreenWidth - 1)) || (Row > (ScreenRows - 1))) {
67 if ((
StrLen (String) + Column) > (ScreenWidth - 1)) {
74 ShowingLength = ScreenWidth - Column - 1;
75 TurncateString =
AllocatePool ((ShowingLength + 1) *
sizeof (CHAR16));
77 if (TurncateString ==
NULL) {
81 Status =
StrnCpyS (TurncateString, ShowingLength + 1, String, ShowingLength - 3);
83 if (EFI_ERROR (Status)) {
88 *(TurncateString + ShowingLength - 3) = L
'.';
89 *(TurncateString + ShowingLength - 2) = L
'.';
90 *(TurncateString + ShowingLength - 1) = L
'.';
91 *(TurncateString + ShowingLength) = L
'\0';
92 ShowingLength =
Print (L
"%s", TurncateString);
96 return Print (L
"%s", String);
130 if ((Column > (ScreenWidth - 1)) || (Row > (ScreenRows - 1))) {
134 return Print (L
"%c", Character);
148 IN EFI_STRING_ID StringId
152 UINTN IncrementValue;
159 if (String !=
NULL) {
168 (String[Index] != NARROW_CHAR) && (String[Index] != WIDE_CHAR) && (String[Index] != 0);
169 Index++, LineWidth = LineWidth + IncrementValue
177 if (String[Index] == 0) {
185 if (String[Index] == NARROW_CHAR) {
198 }
while (String[Index] != 0);
226 UINTN UnSelectableItmes;
228 if (BootMenuData ==
NULL) {
229 return EFI_INVALID_PARAMETER;
236 for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++) {
237 StrWidth =
GetLineWidth (BootMenuData->TitleToken[Index]);
238 MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth;
241 for (Index = 0; Index < BootMenuData->ItemCount; Index++) {
242 StrWidth =
GetLineWidth (BootMenuData->PtrTokens[Index]);
243 MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth;
246 for (Index = 0; Index < HELP_TOKEN_COUNT; Index++) {
247 StrWidth =
GetLineWidth (BootMenuData->HelpToken[Index]);
248 MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth;
261 MaxPrintRows = Row - 6;
262 UnSelectableItmes = TITLE_TOKEN_COUNT + 2 + HELP_TOKEN_COUNT + 2;
263 if (MaxStrWidth + 8 > Column) {
264 BootMenuData->MenuScreen.Width = Column;
266 BootMenuData->MenuScreen.Width = MaxStrWidth + 8;
269 if (BootMenuData->ItemCount + UnSelectableItmes > MaxPrintRows) {
270 BootMenuData->MenuScreen.Height = MaxPrintRows;
271 BootMenuData->ScrollBarControl.HasScrollBar =
TRUE;
272 BootMenuData->ScrollBarControl.ItemCountPerScreen = MaxPrintRows - UnSelectableItmes;
273 BootMenuData->ScrollBarControl.FirstItem = 0;
274 BootMenuData->ScrollBarControl.LastItem = MaxPrintRows - UnSelectableItmes - 1;
276 BootMenuData->MenuScreen.Height = BootMenuData->ItemCount + UnSelectableItmes;
277 BootMenuData->ScrollBarControl.HasScrollBar =
FALSE;
278 BootMenuData->ScrollBarControl.ItemCountPerScreen = BootMenuData->ItemCount;
279 BootMenuData->ScrollBarControl.FirstItem = 0;
280 BootMenuData->ScrollBarControl.LastItem = BootMenuData->ItemCount - 1;
283 BootMenuData->MenuScreen.StartCol = (Column - BootMenuData->MenuScreen.Width) / 2;
284 BootMenuData->MenuScreen.StartRow = (Row - BootMenuData->MenuScreen.Height) / 2;
307 if (!EFI_ERROR (Status)) {
311 return (BOOLEAN)(!EFI_ERROR (Status) && (BootOption->OptionNumber == BootManagerMenu.OptionNumber));
333 Status =
gBS->HandleProtocol (
gImageHandle, &gEfiLoadedImageDevicePathProtocolGuid, (VOID **)&ImageDevicePath);
349 if (((BootOption->Attributes & LOAD_OPTION_HIDDEN) != 0) || ((BootOption->Attributes & LOAD_OPTION_ACTIVE) == 0)) {
377 if ((BootOption ==
NULL) || (BootMenuData ==
NULL)) {
378 return EFI_INVALID_PARAMETER;
381 BootMenuData->TitleToken[0] =
STRING_TOKEN (STR_BOOT_POPUP_MENU_TITLE_STRING);
382 BootMenuData->PtrTokens =
AllocateZeroPool (BootOptionCount *
sizeof (EFI_STRING_ID));
383 ASSERT (BootMenuData->PtrTokens !=
NULL);
388 for (StrIndex = 0, Index = 0; Index < BootOptionCount; Index++) {
393 ASSERT (BootOption[Index].Description !=
NULL);
397 BootOption[Index].Description,
402 BootMenuData->ItemCount = StrIndex;
403 BootMenuData->HelpToken[0] =
STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP1_STRING);
404 BootMenuData->HelpToken[1] =
STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP2_STRING);
405 BootMenuData->HelpToken[2] =
STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP3_STRING);
407 BootMenuData->SelectItem = 0;
428 INT32 SavedAttribute;
438 UINTN ItemCountPerScreen;
440 BOOLEAN RePaintItems;
442 if ((BootMenuData ==
NULL) || (WantSelectItem >= BootMenuData->ItemCount)) {
443 return EFI_INVALID_PARAMETER;
446 ASSERT (BootMenuData->ItemCount != 0);
448 RePaintItems =
FALSE;
449 StartCol = BootMenuData->MenuScreen.StartCol;
450 StartRow = BootMenuData->MenuScreen.StartRow;
454 if (BootMenuData->ScrollBarControl.HasScrollBar &&
455 ((WantSelectItem < BootMenuData->ScrollBarControl.FirstItem) ||
456 (WantSelectItem > BootMenuData->ScrollBarControl.LastItem) ||
457 (WantSelectItem == BootMenuData->SelectItem)))
459 ItemCountPerScreen = BootMenuData->ScrollBarControl.ItemCountPerScreen;
463 if (WantSelectItem < BootMenuData->ScrollBarControl.FirstItem) {
464 BootMenuData->ScrollBarControl.FirstItem = WantSelectItem;
465 BootMenuData->ScrollBarControl.LastItem = WantSelectItem + ItemCountPerScreen - 1;
466 }
else if (WantSelectItem > BootMenuData->ScrollBarControl.LastItem) {
467 BootMenuData->ScrollBarControl.FirstItem = WantSelectItem - ItemCountPerScreen + 1;
468 BootMenuData->ScrollBarControl.LastItem = WantSelectItem;
472 FirstItem = BootMenuData->ScrollBarControl.FirstItem;
473 LastItem = BootMenuData->ScrollBarControl.LastItem;
475 if (FirstItem != 0) {
476 TopShadeNum = (FirstItem * ItemCountPerScreen) / BootMenuData->ItemCount;
477 if ((FirstItem * ItemCountPerScreen) % BootMenuData->ItemCount != 0) {
481 PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2;
482 PrintRow = StartRow + TITLE_TOKEN_COUNT + 2;
483 for (Index = 0; Index < TopShadeNum; Index++, PrintRow++) {
484 PrintCharAt (PrintCol, PrintRow, BLOCKELEMENT_LIGHT_SHADE);
489 if (LastItem != BootMenuData->ItemCount - 1) {
490 LowShadeNum = ((BootMenuData->ItemCount - 1 - LastItem) * ItemCountPerScreen) / BootMenuData->ItemCount;
491 if (((BootMenuData->ItemCount - 1 - LastItem) * ItemCountPerScreen) % BootMenuData->ItemCount != 0) {
495 PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2;
496 PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + ItemCountPerScreen - LowShadeNum;
497 for (Index = 0; Index < LowShadeNum; Index++, PrintRow++) {
498 PrintCharAt (PrintCol, PrintRow, BLOCKELEMENT_LIGHT_SHADE);
502 PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2;
503 PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + TopShadeNum;
504 for (Index = TopShadeNum; Index < ItemCountPerScreen - LowShadeNum; Index++, PrintRow++) {
505 PrintCharAt (PrintCol, PrintRow, BLOCKELEMENT_FULL_BLOCK);
511 PrintCol = StartCol + 1;
512 PrintRow = StartRow + TITLE_TOKEN_COUNT + 2;
513 String =
AllocateZeroPool ((BootMenuData->MenuScreen.Width - 2) * sizeof (CHAR16));
514 ASSERT (String !=
NULL);
515 for (Index = 0; Index < BootMenuData->MenuScreen.Width - 3; Index++) {
516 String[Index] = 0x20;
519 for (Index = 0; Index < ItemCountPerScreen; Index++) {
527 for (Index = 0; Index < ItemCountPerScreen; Index++, PrintRow++) {
528 String =
HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[Index + FirstItem],
NULL);
540 FirstItem = BootMenuData->ScrollBarControl.FirstItem;
541 if ((WantSelectItem != BootMenuData->SelectItem) && !RePaintItems) {
543 String =
HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[BootMenuData->SelectItem],
NULL);
544 PrintCol = StartCol + 1;
545 PrintRow = StartRow + 3 + BootMenuData->SelectItem - FirstItem;
554 String =
HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem],
NULL);
555 PrintCol = StartCol + 1;
556 PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem;
561 BootMenuData->SelectItem = WantSelectItem;
586 INT32 SavedAttribute;
587 UINTN ItemCountPerScreen;
593 Width = BootMenuData->MenuScreen.Width;
594 StartCol = BootMenuData->MenuScreen.StartCol;
595 StartRow = BootMenuData->MenuScreen.StartRow;
596 ItemCountPerScreen = BootMenuData->ScrollBarControl.ItemCountPerScreen;
603 PrintCharAt (StartCol, PrintRow, BOXDRAW_DOWN_RIGHT);
604 for (Index = 1; Index < Width - 1; Index++) {
605 PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL);
608 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_DOWN_LEFT);
614 ASSERT (String !=
NULL);
615 for (Index = 0; Index < Width - 2; Index++) {
616 String[Index] = 0x20;
619 for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++) {
621 PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL);
623 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL);
627 PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL_RIGHT);
628 for (Index = 1; Index < Width - 1; Index++) {
629 PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL);
632 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL_LEFT);
637 for (Index = 0; Index < ItemCountPerScreen; Index++) {
639 PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL);
641 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL);
645 PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL_RIGHT);
646 for (Index = 1; Index < Width - 1; Index++) {
647 PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL);
650 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL_LEFT);
655 for (Index = 0; Index < HELP_TOKEN_COUNT; Index++) {
657 PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL);
659 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL);
665 PrintCharAt (StartCol, PrintRow, BOXDRAW_UP_RIGHT);
666 for (Index = 1; Index < Width - 1; Index++) {
667 PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL);
670 PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_UP_LEFT);
675 PrintRow = StartRow + 1;
676 for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++, PrintRow++) {
677 String =
HiiGetString (gStringPackHandle, BootMenuData->TitleToken[Index],
NULL);
678 LineWidth =
GetLineWidth (BootMenuData->TitleToken[Index]);
679 PrintCol = StartCol + (Width - LineWidth) / 2;
687 PrintCol = StartCol + 1;
688 PrintRow = StartRow + TITLE_TOKEN_COUNT + 2;
689 for (Index = 0; Index < ItemCountPerScreen; Index++, PrintRow++) {
690 String =
HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[Index],
NULL);
699 for (Index = 0; Index < HELP_TOKEN_COUNT; Index++, PrintRow++) {
700 String =
HiiGetString (gStringPackHandle, BootMenuData->HelpToken[Index],
NULL);
701 LineWidth =
GetLineWidth (BootMenuData->HelpToken[Index]);
702 PrintCol = StartCol + (Width - LineWidth) / 2;
710 if (BootMenuData->ScrollBarControl.HasScrollBar) {
711 PrintCol = StartCol + Width - 2;
712 PrintRow = StartRow + 2;
713 PrintCharAt (PrintCol, PrintRow, GEOMETRICSHAPE_UP_TRIANGLE);
714 PrintCharAt (PrintCol + 1, PrintRow, BOXDRAW_VERTICAL);
715 PrintRow += (ItemCountPerScreen + 1);
716 PrintCharAt (PrintCol, PrintRow, GEOMETRICSHAPE_DOWN_TRIANGLE);
717 PrintCharAt (PrintCol + 1, PrintRow, BOXDRAW_VERTICAL);
745 ASSERT (BootOptions !=
NULL);
747 for (ItemNum = 0, Index = 0; Index < BootOptionCount; Index++) {
752 if (ItemNum++ == SelectItem) {
782 UINT32 NewHorizontalResolution;
783 UINT32 NewVerticalResolution;
799 Status =
gBS->HandleProtocol (
801 &gEfiGraphicsOutputProtocolGuid,
802 (VOID **)&GraphicsOutput
804 if (EFI_ERROR (Status)) {
805 GraphicsOutput =
NULL;
808 Status =
gBS->HandleProtocol (
810 &gEfiSimpleTextOutProtocolGuid,
811 (VOID **)&SimpleTextOut
813 if (EFI_ERROR (Status)) {
814 SimpleTextOut =
NULL;
817 if ((GraphicsOutput ==
NULL) || (SimpleTextOut ==
NULL)) {
818 return EFI_UNSUPPORTED;
825 NewHorizontalResolution = mSetupHorizontalResolution;
826 NewVerticalResolution = mSetupVerticalResolution;
827 NewColumns = mSetupTextModeColumn;
828 NewRows = mSetupTextModeRow;
833 NewHorizontalResolution = mBootHorizontalResolution;
834 NewVerticalResolution = mBootVerticalResolution;
835 NewColumns = mBootTextModeColumn;
836 NewRows = mBootTextModeRow;
839 if (GraphicsOutput !=
NULL) {
843 if (SimpleTextOut !=
NULL) {
854 for (ModeNumber = 0; ModeNumber < MaxGopMode; ModeNumber++) {
855 Status = GraphicsOutput->QueryMode (
861 if (!EFI_ERROR (Status)) {
871 Status = SimpleTextOut->QueryMode (SimpleTextOut, SimpleTextOut->
Mode->
Mode, &CurrentColumn, &CurrentRow);
873 if ((CurrentColumn == NewColumns) && (CurrentRow == NewRows)) {
883 for (Index = 0; Index < MaxTextMode; Index++) {
884 Status = SimpleTextOut->QueryMode (SimpleTextOut, Index, &CurrentColumn, &CurrentRow);
885 if (!EFI_ERROR (Status)) {
886 if ((CurrentColumn == NewColumns) && (CurrentRow == NewRows)) {
890 Status = SimpleTextOut->SetMode (SimpleTextOut, Index);
895 Status =
PcdSet32S (PcdConOutColumn, mSetupTextModeColumn);
897 Status =
PcdSet32S (PcdConOutRow, mSetupTextModeRow);
905 if (Index == MaxTextMode) {
910 return EFI_UNSUPPORTED;
918 Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
919 if (!EFI_ERROR (Status)) {
930 if (ModeNumber == MaxGopMode) {
934 return EFI_UNSUPPORTED;
941 Status =
PcdSet32S (PcdVideoHorizontalResolution, NewHorizontalResolution);
943 Status =
PcdSet32S (PcdVideoVerticalResolution, NewVerticalResolution);
945 Status =
PcdSet32S (PcdConOutColumn, NewColumns);
947 Status =
PcdSet32S (PcdConOutRow, NewRows);
955 Status =
gBS->LocateHandleBuffer (
957 &gEfiSimpleTextOutProtocolGuid,
962 if (!EFI_ERROR (Status)) {
963 for (Index = 0; Index < HandleCount; Index++) {
964 gBS->DisconnectController (HandleBuffer[Index],
NULL,
NULL);
967 for (Index = 0; Index < HandleCount; Index++) {
971 if (HandleBuffer !=
NULL) {
997 UINTN BootOptionCount;
1002 BOOLEAN ExitApplication;
1007 UINTN BootTextColumn;
1014 Status =
gBS->LocateProtocol (&gEfiBootLogoProtocolGuid,
NULL, (VOID **)&BootLogo);
1015 if (!EFI_ERROR (Status) && (BootLogo !=
NULL)) {
1016 Status = BootLogo->SetBootLogo (BootLogo,
NULL, 0, 0, 0, 0);
1020 gBS->SetWatchdogTimer (0x0000, 0x0000, 0x0000,
NULL);
1025 BootManagerMenuAppStrings,
1028 ASSERT (gStringPackHandle !=
NULL);
1038 if (!mModeInitialized) {
1043 Status =
gBS->HandleProtocol (
1045 &gEfiGraphicsOutputProtocolGuid,
1046 (VOID **)&GraphicsOutput
1048 if (EFI_ERROR (Status)) {
1049 GraphicsOutput =
NULL;
1052 Status =
gBS->HandleProtocol (
1054 &gEfiSimpleTextOutProtocolGuid,
1055 (VOID **)&SimpleTextOut
1057 if (EFI_ERROR (Status)) {
1058 SimpleTextOut =
NULL;
1061 if (GraphicsOutput !=
NULL) {
1065 mBootHorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;
1066 mBootVerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;
1069 if (SimpleTextOut !=
NULL) {
1070 Status = SimpleTextOut->QueryMode (
1072 SimpleTextOut->Mode->Mode,
1076 mBootTextModeColumn = (UINT32)BootTextColumn;
1077 mBootTextModeRow = (UINT32)BootTextRow;
1083 mSetupHorizontalResolution =
PcdGet32 (PcdSetupVideoHorizontalResolution);
1084 mSetupVerticalResolution =
PcdGet32 (PcdSetupVideoVerticalResolution);
1085 mSetupTextModeColumn =
PcdGet32 (PcdSetupConOutColumn);
1086 mSetupTextModeRow =
PcdGet32 (PcdSetupConOutRow);
1087 mModeInitialized =
TRUE;
1107 ExitApplication =
FALSE;
1108 while (!ExitApplication) {
1111 if (!EFI_ERROR (Status)) {
1112 switch (Key.UnicodeChar) {
1114 switch (Key.ScanCode) {
1116 SelectItem = BootMenuData.SelectItem == 0 ? BootMenuData.ItemCount - 1 : BootMenuData.SelectItem - 1;
1121 SelectItem = BootMenuData.SelectItem == BootMenuData.ItemCount - 1 ? 0 : BootMenuData.SelectItem + 1;
1127 ExitApplication =
TRUE;
1140 case CHAR_CARRIAGE_RETURN:
RETURN_STATUS EFIAPI StrnCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source, IN UINTN Length)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
UINTN EFIAPI GetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
#define ASSERT_EFI_ERROR(StatusParameter)
#define PcdGet32(TokenName)
#define PcdSet32S(TokenName, Value)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID EFIAPI EfiBootManagerBoot(IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
EFI_STATUS EFIAPI EfiBootManagerFreeLoadOption(IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
EFI_BOOT_MANAGER_LOAD_OPTION *EFIAPI EfiBootManagerGetLoadOptions(OUT UINTN *LoadOptionCount, IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE LoadOptionType)
VOID EFIAPI EfiBootManagerRefreshAllBootOption(VOID)
EFI_STATUS EFIAPI EfiBootManagerFreeLoadOptions(IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOptions, IN UINTN LoadOptionCount)
VOID EFIAPI EfiBootManagerConnectAll(VOID)
EFI_STATUS EFIAPI EfiBootManagerGetBootManagerMenu(EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE * Mode
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode
UINT32 VerticalResolution
UINT32 HorizontalResolution
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION * Info
EFI_HANDLE ConsoleOutHandle
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * ConIn
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut