22 #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
23 { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
50 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextProt;
51 UINTN TestMode, Columns, Rows;
54 Status = gBS->LocateProtocol(&gEfiSimpleTextOutProtocolGuid, NULL, (VOID **) &SimpleTextProt);
55 if (EFI_ERROR(Status))
57 LogFullAscii(
"PickBestTextMode: error unable to locate SimpleTextProtocol\r\n");
74 Status = SimpleTextProt->QueryMode(SimpleTextProt, TestMode, &Columns, &Rows);
76 LogFullAscii(
"ScreenEnableGraphicsMode: Mode=%d Columns=%d Rows=%d\r\n",
81 }
while (Status == EFI_SUCCESS);
97 if (gConsoleControlProt != NULL)
100 gConsoleControlProt->
GetMode(gConsoleControlProt, &CurrentMode, NULL, NULL);
102 if (CurrentMode != NewMode)
103 gConsoleControlProt->
SetMode(gConsoleControlProt, NewMode);
117 UINT32 UGAWidth, UGAHeight, UGADepth, UGARefreshRate;
122 if (gGraphicsOutputProt != NULL)
131 if (gUgaDrawProt != NULL)
133 Status = gUgaDrawProt->
GetMode(gUgaDrawProt,
139 if (EFI_ERROR(Status))
141 LogFullAscii(
"ScreenGetResolution: calling gUgaDrawProt->GetMode failed!\r\n");
154 return EFI_NOT_FOUND;
172 gConsoleControlProt = NULL;
174 gGraphicsOutputProt = NULL;
179 (VOID**)&gConsoleControlProt);
181 if (EFI_ERROR(Status))
182 LogFullAscii(
"ScreenInit: error unable to locate gConsoleControlProtocol\r\n");
186 (VOID**)&gUgaDrawProt);
188 if (EFI_ERROR(Status))
189 LogFullAscii(
"ScreenInit: error unable to locate gUgaDrawProtocol\r\n");
193 (VOID**)&gGraphicsOutputProt);
195 if (EFI_ERROR(Status))
196 LogFullAscii(
"ScreenInit: error unable to locate gGraphicsOutputProtocol");
211 return EFI_NOT_FOUND;
213 if (gGraphicsOutputProt != NULL)
215 gGraphicsOutputProt->
Blt(gGraphicsOutputProt,
225 if (gUgaDrawProt != NULL)
227 gUgaDrawProt->
Blt(gUgaDrawProt,
237 return EFI_NOT_FOUND;
251 return EFI_NOT_FOUND;
254 if (gGraphicsOutputProt != NULL)
257 gGraphicsOutputProt->
Blt(gGraphicsOutputProt,
270 if (gUgaDrawProt != NULL)
272 gUgaDrawProt->
Blt( gUgaDrawProt,
283 return EFI_NOT_FOUND;
303 if (EFI_ERROR(Status))
305 LogFullAscii(
"ScreenShowSplashLogo: unable to initialize screen!\r\n");
306 return EFI_NOT_FOUND;
314 LogFullAscii(
"ScreenShowSplashLogo: unable to load splash image!\r\n");
315 return EFI_NOT_FOUND;