From 641b4a46284c0a3c2392b2cebea375da7542265f Mon Sep 17 00:00:00 2001 From: li-elvin Date: Tue, 4 Sep 2012 09:43:22 +0000 Subject: Set mode 0 (80x25) when Consplitter does not exist. Signed-off-by: Li Elvin Reviewed-by: Ni Ruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13698 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c index 782c4a5ce1..fe6d436a56 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c @@ -88,6 +88,7 @@ UpdateSystemTableConsole ( EFI_DEVICE_PATH_PROTOCOL *Instance; VOID *Interface; EFI_HANDLE NewHandle; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut; ASSERT (VarName != NULL); ASSERT (ConsoleHandle != NULL); @@ -159,6 +160,15 @@ UpdateSystemTableConsole ( // *ConsoleHandle = NewHandle; *ProtocolInterface = Interface; + if (CompareGuid (ConsoleGuid, &gEfiSimpleTextOutProtocolGuid)) { + // + // If it is console out device, set console mode 80x25 if current mode is invalid. + // + TextOut = (EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *) Interface; + if (TextOut->Mode->Mode == -1) { + TextOut->SetMode (TextOut, 0); + } + } return TRUE; } } -- cgit v1.2.3