clean console control protocol in bds module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7915 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
BDS Lib functions which contain all the code to connect console device
|
||||
|
||||
Copyright (c) 2004 - 2008, Intel Corporation. <BR>
|
||||
Copyright (c) 2004 - 2009, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -728,16 +728,7 @@ LockKeyboards (
|
||||
IN CHAR16 *Password
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = ConsoleControl->LockStdIn (ConsoleControl, Password);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
@@ -758,7 +749,6 @@ EnableQuietBoot (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
||||
EFI_OEM_BADGING_PROTOCOL *Badging;
|
||||
UINT32 SizeOfX;
|
||||
UINT32 SizeOfY;
|
||||
@@ -780,11 +770,6 @@ EnableQuietBoot (
|
||||
UINT32 RefreshRate;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
UgaDraw = NULL;
|
||||
//
|
||||
// Try to open GOP first
|
||||
@@ -801,17 +786,14 @@ EnableQuietBoot (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Erase Cursor from screen
|
||||
//
|
||||
gST->ConOut->EnableCursor (gST->ConOut, FALSE);
|
||||
|
||||
Badging = NULL;
|
||||
Status = gBS->LocateProtocol (&gEfiOEMBadgingProtocolGuid, NULL, (VOID **) &Badging);
|
||||
|
||||
//
|
||||
// Set console control to graphics mode.
|
||||
//
|
||||
Status = ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenGraphics);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (GraphicsOutput != NULL) {
|
||||
SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;
|
||||
SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;
|
||||
@@ -1004,17 +986,11 @@ DisableQuietBoot (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl;
|
||||
|
||||
Status = gBS->LocateProtocol (&gEfiConsoleControlProtocolGuid, NULL, (VOID **) &ConsoleControl);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Set console control to text mode.
|
||||
// Enable Cursor on Screen
|
||||
//
|
||||
return ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenText);
|
||||
gST->ConOut->EnableCursor (gST->ConOut, TRUE);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# 2) BDS boot device connect interface;
|
||||
# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
|
||||
#
|
||||
# Copyright (c) 2007 - 2008, Intel Corporation. <BR>
|
||||
# Copyright (c) 2007 - 2009, Intel Corporation. <BR>
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -105,7 +105,6 @@
|
||||
gEfiAcpiS3SaveProtocolGuid # PROTOCOL CONSUMES
|
||||
gEfiGraphicsOutputProtocolGuid # PROTOCOL SOMETIMES_CONSUMES
|
||||
gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport # PROTOCOL SOMETIMES_CONSUMES
|
||||
gEfiConsoleControlProtocolGuid # PROTOCOL CONSUMES
|
||||
gEfiOEMBadgingProtocolGuid # PROTOCOL CONSUMES
|
||||
gEfiHiiFontProtocolGuid # PROTOCOL CONSUMES
|
||||
gEfiSecurityArchProtocolGuid
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
BDS library definition, include the file and data structure
|
||||
|
||||
Copyright (c) 2004 - 2008, Intel Corporation. <BR>
|
||||
Copyright (c) 2004 - 2009, Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,7 +34,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Protocol/PciIo.h>
|
||||
#include <Protocol/AcpiS3Save.h>
|
||||
#include <Protocol/OEMBadging.h>
|
||||
#include <Protocol/ConsoleControl.h>
|
||||
#include <Protocol/GraphicsOutput.h>
|
||||
#include <Protocol/UgaDraw.h>
|
||||
#include <Protocol/HiiFont.h>
|
||||
|
Reference in New Issue
Block a user