/** @file\r
BDS Lib functions which contain all the code to connect console device\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
IN CHAR16 *Password\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;\r
-\r
- Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);\r
- if (EFI_ERROR (Status)) {\r
return EFI_UNSUPPORTED;\r
- }\r
-\r
- Status = ConsoleControl->LockStdIn (ConsoleControl, Password);\r
- return Status;\r
}\r
\r
\r
)\r
{\r
EFI_STATUS Status;\r
- EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;\r
EFI_OEM_BADGING_PROTOCOL *Badging;\r
UINT32 SizeOfX;\r
UINT32 SizeOfY;\r
UINT32 RefreshRate;\r
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
\r
- Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);\r
- if (EFI_ERROR (Status)) {\r
- return EFI_UNSUPPORTED;\r
- }\r
-\r
UgaDraw = NULL;\r
//\r
// Try to open GOP first\r
return EFI_UNSUPPORTED;\r
}\r
\r
- Badging = NULL;\r
- Status = gBS->LocateProtocol (&gEfiOEMBadgingProtocolGuid, NULL, (VOID **) &Badging);\r
-\r
//\r
- // Set console control to graphics mode.\r
+ // Erase Cursor from screen\r
//\r
- Status = ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenGraphics);\r
- if (EFI_ERROR (Status)) {\r
- return EFI_UNSUPPORTED;\r
- }\r
+ gST->ConOut->EnableCursor (gST->ConOut, FALSE);\r
+\r
+ Badging = NULL;\r
+ Status = gBS->LocateProtocol (&gEfiOEMBadgingProtocolGuid, NULL, (VOID **) &Badging);\r
\r
if (GraphicsOutput != NULL) {\r
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;\r
VOID\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;\r
-\r
- Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);\r
- if (EFI_ERROR (Status)) {\r
- return EFI_UNSUPPORTED;\r
- }\r
\r
//\r
- // Set console control to text mode.\r
+ // Enable Cursor on Screen\r
//\r
- return ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenText);\r
+ gST->ConOut->EnableCursor (gST->ConOut, TRUE);\r
+ return EFI_SUCCESS;\r
}\r
\r
# 2) BDS boot device connect interface;\r
# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.\r
# \r
-# Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
+# Copyright (c) 2007 - 2009, Intel Corporation. <BR>\r
# All rights reserved. This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
gEfiAcpiS3SaveProtocolGuid # PROTOCOL CONSUMES\r
gEfiGraphicsOutputProtocolGuid # PROTOCOL SOMETIMES_CONSUMES\r
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport # PROTOCOL SOMETIMES_CONSUMES\r
- gEfiConsoleControlProtocolGuid # PROTOCOL CONSUMES\r
gEfiOEMBadgingProtocolGuid # PROTOCOL CONSUMES\r
gEfiHiiFontProtocolGuid # PROTOCOL CONSUMES\r
gEfiSecurityArchProtocolGuid\r
/** @file\r
BDS library definition, include the file and data structure\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Protocol/PciIo.h>\r
#include <Protocol/AcpiS3Save.h>\r
#include <Protocol/OEMBadging.h>\r
-#include <Protocol/ConsoleControl.h>\r
#include <Protocol/GraphicsOutput.h>\r
#include <Protocol/UgaDraw.h>\r
#include <Protocol/HiiFont.h>\r
#include <Protocol/BlockIo.h>\r
#include <Guid/GlobalVariable.h>\r
#include <Guid/CapsuleVendor.h>\r
-#include <Protocol/ConsoleControl.h>\r
#include <Protocol/GenericMemoryTest.h>\r
#include <Protocol/FormBrowser2.h>\r
#include <Protocol/HiiConfigAccess.h>\r
gEfiDataHubProtocolGuid # PROTOCOL ALWAYS_CONSUMES\r
gEfiGenericMemTestProtocolGuid # PROTOCOL ALWAYS_CONSUMES\r
gEfiLegacyBiosProtocolGuid # PROTOCOL ALWAYS_CONSUMES\r
- gEfiConsoleControlProtocolGuid # PROTOCOL ALWAYS_CONSUMES\r
gEfiHiiDatabaseProtocolGuid # PROTOCOL ALWAYS_CONSUMES\r
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport # PROTOCOL SOMETIMES_CONSUMES\r
gEfiBlockIoProtocolGuid # PROTOCOL ALWAYS_CONSUMES\r
/** @file\r
FrontPage routines to handle the callbacks and browser calls\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
)\r
{\r
EFI_STATUS Status;\r
- EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;\r
\r
PERF_START (0, "BdsTimeOut", "BDS", 0);\r
//\r
// takes affect\r
//\r
PERF_END (0, "BdsTimeOut", "BDS", 0);\r
- Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);\r
- if (Status == EFI_SUCCESS) {\r
- ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenText);\r
- }\r
}\r
/** @file\r
Perform the platform memory test\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
BOOLEAN ErrorOut;\r
BOOLEAN TestAbort;\r
EFI_INPUT_KEY Key;\r
- CHAR16 StrPercent[16];\r
+ CHAR16 StrPercent[80];\r
CHAR16 *StrTotalMemory;\r
CHAR16 *Pos;\r
CHAR16 *TmpStr;\r
\r
RequireSoftECCInit = FALSE;\r
\r
- gST->ConOut->ClearScreen (gST->ConOut);\r
- gST->ConOut->SetAttribute (gST->ConOut, EFI_YELLOW | EFI_BRIGHT);\r
- gST->ConOut->EnableCursor (gST->ConOut, FALSE);\r
-\r
Status = gBS->LocateProtocol (\r
&gEfiGenericMemTestProtocolGuid,\r
NULL,\r
return EFI_SUCCESS;\r
}\r
\r
- gST->ConOut->SetCursorPosition (gST->ConOut, 0, 2);\r
TmpStr = GetStringById (STRING_TOKEN (STR_ESC_TO_SKIP_MEM_TEST));\r
\r
if (TmpStr != NULL) {\r
- gST->ConOut->OutputString (gST->ConOut, TmpStr);\r
+ PrintXY (10, 10, NULL, NULL, TmpStr);\r
FreePool (TmpStr);\r
}\r
\r
TmpStr = GetStringById (STRING_TOKEN (STR_SYSTEM_MEM_ERROR));\r
if (TmpStr != NULL) {\r
PrintXY (10, 10, NULL, NULL, TmpStr);\r
- gST->ConOut->SetCursorPosition (gST->ConOut, 0, 4);\r
- gST->ConOut->OutputString (gST->ConOut, TmpStr);\r
FreePool (TmpStr);\r
}\r
\r
);\r
if (TestPercent != PreviousValue) {\r
UnicodeValueToString (StrPercent, 0, TestPercent, 0);\r
- gST->ConOut->SetCursorPosition (gST->ConOut, 0, 0);\r
TmpStr = GetStringById (STRING_TOKEN (STR_MEMORY_TEST_PERCENT));\r
if (TmpStr != NULL) {\r
- BdsLibOutputStrings (gST->ConOut, StrPercent, TmpStr, NULL);\r
+ //\r
+ // TmpStr size is 64, StrPercent is reserved to 16.\r
+ //\r
+ StrCat (StrPercent, TmpStr);\r
+ PrintXY (10, 10, NULL, NULL, StrPercent);\r
FreePool (TmpStr);\r
}\r
\r
FreePool (TmpStr);\r
}\r
\r
- gST->ConOut->SetCursorPosition (gST->ConOut, 0, 0);\r
- gST->ConOut->OutputString (gST->ConOut, L"100");\r
+ PrintXY (10, 10, NULL, NULL, L"100");\r
Status = GenMemoryTest->Finished (GenMemoryTest);\r
goto Done;\r
}\r
FreePool (TmpStr);\r
}\r
\r
- gST->ConOut->ClearScreen (gST->ConOut);\r
- gST->ConOut->SetAttribute (gST->ConOut, EFI_YELLOW | EFI_BRIGHT);\r
- gST->ConOut->EnableCursor (gST->ConOut, FALSE);\r
- gST->ConOut->OutputString (gST->ConOut, StrTotalMemory);\r
+ PrintXY (10, 10, NULL, NULL, StrTotalMemory);\r
PlatformBdsShowProgress (\r
Foreground,\r
Background,\r