mirror of https://github.com/acidanthera/audk.git
1. retired console control protocol.
2. removed NULL console device from consplitter module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7995 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c44fb9d331
commit
9937b36506
|
@ -1,101 +0,0 @@
|
|||
/** @file
|
||||
|
||||
This protocol provides the interfaces to Get/Set the current video mode for GOP/UGA screen
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __CONSOLE_CONTROL_H__
|
||||
#define __CONSOLE_CONTROL_H__
|
||||
|
||||
#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
|
||||
{ 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } }
|
||||
|
||||
typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
|
||||
|
||||
|
||||
typedef enum {
|
||||
EfiConsoleControlScreenText, ///> Text Mode
|
||||
EfiConsoleControlScreenGraphics, ///> Graphics Mode
|
||||
EfiConsoleControlScreenMaxValue
|
||||
} EFI_CONSOLE_CONTROL_SCREEN_MODE;
|
||||
|
||||
/**
|
||||
Return the current video mode information. Also returns info about existence
|
||||
of Graphics Output devices or UGA Draw devices in system, and whether the Std
|
||||
In device is locked. GopUgaExists and StdInLocked parameters are optional, and
|
||||
only returned if a non NULL pointer is passed in.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Mode Current video mode.
|
||||
@param GopUgaExists TRUE if GOP Spliter has found a GOP/UGA device
|
||||
@param StdInLocked TRUE if StdIn device is keyboard locked
|
||||
|
||||
@retval EFI_SUCCESS Video mode information is returned.
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameters if Mode == NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE)(
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
||||
OUT BOOLEAN *GopUgaExists, OPTIONAL
|
||||
OUT BOOLEAN *StdInLocked OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Set the current video mode to either text or graphics. Graphics is
|
||||
for Quiet Boot.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Mode Video mode is to be set.
|
||||
|
||||
@retval EFI_SUCCESS Mode is set successfully.
|
||||
@retval EFI_INVALID_PARAMETER Mode is not the valid mode value.
|
||||
@retval EFI_UNSUPPORTED Mode is unsupported by console device.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE)(
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
||||
);
|
||||
|
||||
/**
|
||||
If Password is NULL or the Password is too big, then return an error. If the
|
||||
Password is valid, then store the password, lock StdIn and arm the periodic timer.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Password The password input.
|
||||
|
||||
@retval EFI_SUCCESS Lock the StdIn device.
|
||||
@retval EFI_INVALID_PARAMETER Password is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN)(
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN CHAR16 *Password
|
||||
);
|
||||
|
||||
struct _EFI_CONSOLE_CONTROL_PROTOCOL {
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiConsoleControlProtocolGuid;
|
||||
|
||||
#endif
|
|
@ -150,10 +150,6 @@
|
|||
## Include/Protocol/GenericMemoryTest.h
|
||||
gEfiGenericMemTestProtocolGuid = { 0x309DE7F1, 0x7F5E, 0x4ACE, { 0xB4, 0x9C, 0x53, 0x1B, 0xE5, 0xAA, 0x95, 0xEF }}
|
||||
|
||||
## This protocol provides the interfaces to Get/Set the current video mode for GOP/UGA screen
|
||||
## Include/Protocol/ConsoleControl.h
|
||||
gEfiConsoleControlProtocolGuid = { 0xF42F7782, 0x012E, 0x4C12, { 0x99, 0x56, 0x49, 0xF9, 0x43, 0x04, 0xF7, 0x21 }}
|
||||
|
||||
## Include/Protocol/NicIp4Config.h
|
||||
gEfiNicIp4ConfigProtocolGuid = {0xdca3d4d, 0x12da, 0x4728, { 0xbf, 0x7e, 0x86, 0xce, 0xb9, 0x28, 0xd0, 0x67 }}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
never removed. Such design ensures sytem function well during none console
|
||||
device situation.
|
||||
|
||||
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
|
||||
Copyright (c) 2006 - 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
|
||||
|
@ -35,6 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
|
||||
TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE,
|
||||
(EFI_HANDLE) NULL,
|
||||
|
||||
{
|
||||
ConSplitterTextInReset,
|
||||
ConSplitterTextInReadKeyStroke,
|
||||
|
@ -43,6 +44,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
|
|||
0,
|
||||
(EFI_SIMPLE_TEXT_INPUT_PROTOCOL **) NULL,
|
||||
0,
|
||||
|
||||
{
|
||||
ConSplitterTextInResetEx,
|
||||
ConSplitterTextInReadKeyStrokeEx,
|
||||
|
@ -82,7 +84,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
|
|||
(EFI_EVENT) NULL,
|
||||
(EFI_ABSOLUTE_POINTER_MODE *) NULL
|
||||
},
|
||||
|
||||
{
|
||||
0, // AbsoluteMinX
|
||||
0, // AbsoluteMinY
|
||||
|
@ -97,22 +98,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_IN_SPLITTER_PRIVATE_DATA mConIn = {
|
|||
0,
|
||||
FALSE,
|
||||
|
||||
FALSE,
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
0,
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
(EFI_EVENT) NULL,
|
||||
|
||||
FALSE,
|
||||
FALSE
|
||||
};
|
||||
|
@ -164,6 +149,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
|
|||
0,
|
||||
FALSE,
|
||||
},
|
||||
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -173,35 +159,23 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
(EFI_UGA_PIXEL *) NULL,
|
||||
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
|
||||
(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
|
||||
0,
|
||||
0,
|
||||
TRUE,
|
||||
{
|
||||
ConSpliterConsoleControlGetMode,
|
||||
ConSpliterConsoleControlSetMode,
|
||||
ConSpliterConsoleControlLockStdIn
|
||||
},
|
||||
|
||||
0,
|
||||
(TEXT_OUT_AND_GOP_DATA *) NULL,
|
||||
0,
|
||||
(TEXT_OUT_SPLITTER_QUERY_DATA *) NULL,
|
||||
0,
|
||||
(INT32 *) NULL,
|
||||
|
||||
EfiConsoleControlScreenText,
|
||||
0,
|
||||
0,
|
||||
(CHAR16 *) NULL,
|
||||
(INT32 *) NULL
|
||||
};
|
||||
|
||||
|
@ -231,6 +205,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
|
|||
0,
|
||||
FALSE,
|
||||
},
|
||||
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -240,35 +215,23 @@ GLOBAL_REMOVE_IF_UNREFERENCED TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
(EFI_UGA_PIXEL *) NULL,
|
||||
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,
|
||||
(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,
|
||||
0,
|
||||
0,
|
||||
TRUE,
|
||||
{
|
||||
ConSpliterConsoleControlGetMode,
|
||||
ConSpliterConsoleControlSetMode,
|
||||
ConSpliterConsoleControlLockStdIn
|
||||
},
|
||||
|
||||
0,
|
||||
(TEXT_OUT_AND_GOP_DATA *) NULL,
|
||||
0,
|
||||
(TEXT_OUT_SPLITTER_QUERY_DATA *) NULL,
|
||||
0,
|
||||
(INT32 *) NULL,
|
||||
|
||||
EfiConsoleControlScreenText,
|
||||
0,
|
||||
0,
|
||||
(CHAR16 *) NULL,
|
||||
(INT32 *) NULL
|
||||
};
|
||||
|
||||
|
@ -474,8 +437,6 @@ ConSplitterDriverEntry(
|
|||
&mConOut.TextOut,
|
||||
&gEfiUgaDrawProtocolGuid,
|
||||
&mConOut.UgaDraw,
|
||||
&gEfiConsoleControlProtocolGuid,
|
||||
&mConOut.ConsoleControl,
|
||||
NULL
|
||||
);
|
||||
} else if (!FeaturePcdGet (PcdConOutUgaSupport)) {
|
||||
|
@ -489,8 +450,6 @@ ConSplitterDriverEntry(
|
|||
&mConOut.TextOut,
|
||||
&gEfiGraphicsOutputProtocolGuid,
|
||||
&mConOut.GraphicsOutput,
|
||||
&gEfiConsoleControlProtocolGuid,
|
||||
&mConOut.ConsoleControl,
|
||||
NULL
|
||||
);
|
||||
} else {
|
||||
|
@ -506,8 +465,6 @@ ConSplitterDriverEntry(
|
|||
&mConOut.GraphicsOutput,
|
||||
&gEfiUgaDrawProtocolGuid,
|
||||
&mConOut.UgaDraw,
|
||||
&gEfiConsoleControlProtocolGuid,
|
||||
&mConOut.ConsoleControl,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
@ -565,17 +522,7 @@ ConSplitterTextInConstructor (
|
|||
if (EFI_ERROR (Status)) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
//
|
||||
// Create Event to support locking StdIn Device
|
||||
//
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_TIMER | EVT_NOTIFY_SIGNAL,
|
||||
TPL_CALLBACK,
|
||||
ConSpliterConsoleControlLockStdInEvent,
|
||||
NULL,
|
||||
&ConInPrivate->LockEvent
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Create Event to wait for a key
|
||||
//
|
||||
|
@ -725,15 +672,16 @@ ConSplitterTextOutConstructor (
|
|||
}
|
||||
|
||||
//
|
||||
// Setup the DevNullTextOut console to 80 x 25
|
||||
// Setup the default console to 80 x 25 and mode to 0
|
||||
//
|
||||
ConOutPrivate->TextOutQueryData[0].Columns = 80;
|
||||
ConOutPrivate->TextOutQueryData[0].Rows = 25;
|
||||
DevNullTextOutSetMode (ConOutPrivate, 0);
|
||||
TextOutSetMode (ConOutPrivate, 0);
|
||||
|
||||
|
||||
if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
||||
//
|
||||
// Setup the DevNullUgaDraw to 800 x 600 x 32 bits per pixel, 60Hz.
|
||||
// Setup the UgaDraw to 800 x 600 x 32 bits per pixel, 60Hz.
|
||||
//
|
||||
ConSpliterUgaDrawSetMode (&ConOutPrivate->UgaDraw, 800, 600, 32, 60);
|
||||
}
|
||||
|
@ -2974,7 +2922,6 @@ ConSplitterTextOutAddDevice (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN CurrentNumOfConsoles;
|
||||
INT32 CurrentMode;
|
||||
INT32 MaxMode;
|
||||
UINT32 UgaHorizontalResolution;
|
||||
UINT32 UgaVerticalResolution;
|
||||
|
@ -3014,18 +2961,6 @@ ConSplitterTextOutAddDevice (
|
|||
TextAndGop->GraphicsOutput = GraphicsOutput;
|
||||
TextAndGop->UgaDraw = UgaDraw;
|
||||
|
||||
if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {
|
||||
//
|
||||
// If No GOP/UGA device then use the ConOut device
|
||||
//
|
||||
TextAndGop->TextOutEnabled = TRUE;
|
||||
} else {
|
||||
//
|
||||
// If GOP/UGA device use ConOut device only used if screen is in Text mode
|
||||
//
|
||||
TextAndGop->TextOutEnabled = (BOOLEAN) (Private->ConsoleOutputMode == EfiConsoleControlScreenText);
|
||||
}
|
||||
|
||||
if (CurrentNumOfConsoles == 0) {
|
||||
//
|
||||
// Add the first device's output mode to console splitter's mode list
|
||||
|
@ -3044,7 +2979,6 @@ ConSplitterTextOutAddDevice (
|
|||
//
|
||||
ConSplitterGetIntersectionBetweenConOutAndStrErr ();
|
||||
|
||||
CurrentMode = Private->TextOutMode.Mode;
|
||||
MaxMode = Private->TextOutMode.MaxMode;
|
||||
ASSERT (MaxMode >= 1);
|
||||
|
||||
|
@ -3102,32 +3036,10 @@ ConSplitterTextOutAddDevice (
|
|||
);
|
||||
}
|
||||
|
||||
if (Private->ConsoleOutputMode == EfiConsoleControlScreenGraphics && GraphicsOutput != NULL) {
|
||||
//
|
||||
// We just added a new GOP or UGA device in graphics mode
|
||||
//
|
||||
if (FeaturePcdGet (PcdConOutGopSupport)) {
|
||||
//
|
||||
// Sync display output on new device based on GOP settings.
|
||||
//
|
||||
DevNullGopSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);
|
||||
} else if (FeaturePcdGet (PcdConOutUgaSupport)) {
|
||||
//
|
||||
// Sync display output on new device based on UGA settings.
|
||||
//
|
||||
DevNullUgaSync (Private, TextAndGop->GraphicsOutput, TextAndGop->UgaDraw);
|
||||
}
|
||||
} else if ((CurrentMode >= 0) && ((GraphicsOutput != NULL) || (UgaDraw != NULL)) && (CurrentMode < Private->TextOutMode.MaxMode)) {
|
||||
//
|
||||
// The new console supports the same mode of the current console so sync up
|
||||
//
|
||||
DevNullSyncStdOut (Private);
|
||||
} else {
|
||||
//
|
||||
// If ConOut, then set the mode to Mode #0 which us 80 x 25
|
||||
//
|
||||
Private->TextOut.SetMode (&Private->TextOut, 0);
|
||||
}
|
||||
|
||||
//
|
||||
// After adding new console device, all existing console devices should be
|
||||
|
@ -3192,13 +3104,13 @@ ConSplitterTextOutDeleteDevice (
|
|||
|
||||
if (CurrentNumOfConsoles == 0) {
|
||||
//
|
||||
// If the number of consoles is zero clear the Dev NULL device
|
||||
// If the number of consoles is zero, reset all parameters
|
||||
//
|
||||
Private->CurrentNumberOfConsoles = 0;
|
||||
Private->TextOutMode.MaxMode = 1;
|
||||
Private->TextOutQueryData[0].Columns = 80;
|
||||
Private->TextOutQueryData[0].Rows = 25;
|
||||
DevNullTextOutSetMode (Private, 0);
|
||||
TextOutSetMode (Private, 0);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -3330,157 +3242,10 @@ ConSplitterTextInPrivateReadKeyStroke (
|
|||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
/**
|
||||
Return TRUE if StdIn is locked. The ConIn device on the virtual handle is
|
||||
the only device locked.
|
||||
|
||||
@retval TRUE StdIn locked
|
||||
@retval FALSE StdIn working normally
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
ConSpliterConssoleControlStdInLocked (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return mConIn.PasswordEnabled;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Record and check key sequence on StdIn.
|
||||
|
||||
This timer event will fire when StdIn is locked. It will record the key sequence
|
||||
on StdIn and also check to see if it matches the password. Any error in the
|
||||
password will cause the check to reset. As long as a mConIn.PasswordEnabled is
|
||||
TRUE, the StdIn splitter will not report any input.
|
||||
|
||||
@param Event The Event this notify function registered to.
|
||||
@param Context Pointer to the context data registerd to the
|
||||
Event.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlLockStdInEvent (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_INPUT_KEY Key;
|
||||
CHAR16 BackSpaceString[2];
|
||||
CHAR16 SpaceString[2];
|
||||
|
||||
do {
|
||||
Status = ConSplitterTextInPrivateReadKeyStroke (&mConIn, &Key);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
//
|
||||
// If key read successfully
|
||||
//
|
||||
if ((Key.UnicodeChar == CHAR_CARRIAGE_RETURN) && (Key.ScanCode == SCAN_NULL)) {
|
||||
//
|
||||
// If it's an ENTER, match password
|
||||
//
|
||||
mConIn.PwdAttempt[mConIn.PwdIndex] = CHAR_NULL;
|
||||
if (StrCmp (mConIn.Password, mConIn.PwdAttempt) != 0) {
|
||||
//
|
||||
// Password not match
|
||||
//
|
||||
ConSplitterTextOutOutputString (&mConOut.TextOut, (CHAR16 *) L"\n\rPassword not correct\n\r");
|
||||
mConIn.PwdIndex = 0;
|
||||
} else {
|
||||
//
|
||||
// Key matches password sequence
|
||||
//
|
||||
gBS->SetTimer (mConIn.LockEvent, TimerPeriodic, 0);
|
||||
mConIn.PasswordEnabled = FALSE;
|
||||
Status = EFI_NOT_READY;
|
||||
}
|
||||
} else if ((Key.UnicodeChar == CHAR_BACKSPACE) && (Key.ScanCode == SCAN_NULL)) {
|
||||
//
|
||||
// BackSpace met
|
||||
//
|
||||
if (mConIn.PwdIndex > 0) {
|
||||
BackSpaceString[0] = CHAR_BACKSPACE;
|
||||
BackSpaceString[1] = 0;
|
||||
|
||||
SpaceString[0] = L' ';
|
||||
SpaceString[1] = 0;
|
||||
|
||||
ConSplitterTextOutOutputString (&mConOut.TextOut, BackSpaceString);
|
||||
ConSplitterTextOutOutputString (&mConOut.TextOut, SpaceString);
|
||||
ConSplitterTextOutOutputString (&mConOut.TextOut, BackSpaceString);
|
||||
|
||||
mConIn.PwdIndex--;
|
||||
}
|
||||
} else if ((Key.ScanCode == SCAN_NULL) && (Key.UnicodeChar >= 32)) {
|
||||
//
|
||||
// If it's not an ENTER, neigher a function key, nor a CTRL-X or ALT-X, record the input,
|
||||
// value 32 stands for a Blank Space key.
|
||||
//
|
||||
if (mConIn.PwdIndex < (MAX_STD_IN_PASSWORD - 1)) {
|
||||
if (mConIn.PwdIndex == 0) {
|
||||
ConSplitterTextOutOutputString (&mConOut.TextOut, (CHAR16 *) L"\n\r");
|
||||
}
|
||||
|
||||
ConSplitterTextOutOutputString (&mConOut.TextOut, (CHAR16 *) L"*");
|
||||
mConIn.PwdAttempt[mConIn.PwdIndex] = Key.UnicodeChar;
|
||||
mConIn.PwdIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (!EFI_ERROR (Status));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
If Password is NULL or the Password is too big, then return an error. If the
|
||||
Password is valid, then store the password, lock StdIn and arm the periodic timer.
|
||||
|
||||
@param This Console Control protocol pointer.
|
||||
@param Password The password input.
|
||||
|
||||
@retval EFI_SUCCESS Lock the StdIn device.
|
||||
@retval EFI_INVALID_PARAMETER Password is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlLockStdIn (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN CHAR16 *Password
|
||||
)
|
||||
{
|
||||
if (Password == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (StrLen (Password) >= MAX_STD_IN_PASSWORD) {
|
||||
//
|
||||
// Currently have a max password size
|
||||
//
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
//
|
||||
// Save the password, initialize state variables and arm event timer
|
||||
//
|
||||
StrCpy (mConIn.Password, Password);
|
||||
mConIn.PasswordEnabled = TRUE;
|
||||
mConIn.PwdIndex = 0;
|
||||
//
|
||||
// Lock Timer Periodic is 25ms.
|
||||
//
|
||||
gBS->SetTimer (mConIn.LockEvent, TimerPeriodic, 10000 * 25);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||
If the ConIn is password locked make it look like no keystroke is availible
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Key Driver may perform diagnostics on reset.
|
||||
|
@ -3501,12 +3266,6 @@ ConSplitterTextInReadKeyStroke (
|
|||
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
|
||||
|
||||
Private = TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
Private->KeyEventSignalState = FALSE;
|
||||
|
||||
|
@ -3517,7 +3276,6 @@ ConSplitterTextInReadKeyStroke (
|
|||
/**
|
||||
This event aggregates all the events of the ConIn devices in the spliter.
|
||||
|
||||
If the ConIn is password locked then return.
|
||||
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||
spliter event. This will cause the calling code to call
|
||||
ConSplitterTextInReadKeyStroke ().
|
||||
|
@ -3539,13 +3297,6 @@ ConSplitterTextInWaitForKey (
|
|||
|
||||
Private = (TEXT_IN_SPLITTER_PRIVATE_DATA *) Context;
|
||||
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return ;
|
||||
}
|
||||
|
||||
if (Private->KeyEventSignalState) {
|
||||
//
|
||||
// If KeyEventSignalState is flagged before, and not cleared by Reset() or ReadKeyStroke()
|
||||
|
@ -3691,12 +3442,6 @@ ConSplitterTextInReadKeyStrokeEx (
|
|||
}
|
||||
|
||||
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
Private->KeyEventSignalState = FALSE;
|
||||
|
||||
|
@ -4076,7 +3821,6 @@ ConSplitterSimplePointerPrivateGetState (
|
|||
/**
|
||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||
If the ConIn is password locked make it look like no keystroke is availible
|
||||
|
||||
@param This A pointer to protocol instance.
|
||||
@param State A pointer to state information on the pointer device
|
||||
|
@ -4097,12 +3841,6 @@ ConSplitterSimplePointerGetState (
|
|||
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
|
||||
|
||||
Private = TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS (This);
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
Private->InputEventSignalState = FALSE;
|
||||
|
||||
|
@ -4112,7 +3850,6 @@ ConSplitterSimplePointerGetState (
|
|||
|
||||
/**
|
||||
This event agregates all the events of the ConIn devices in the spliter.
|
||||
If the ConIn is password locked then return.
|
||||
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||
spliter event. This will cause the calling code to call
|
||||
ConSplitterTextInReadKeyStroke ().
|
||||
|
@ -4133,12 +3870,6 @@ ConSplitterSimplePointerWaitForInput (
|
|||
UINTN Index;
|
||||
|
||||
Private = (TEXT_IN_SPLITTER_PRIVATE_DATA *) Context;
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return ;
|
||||
}
|
||||
|
||||
//
|
||||
// if InputEventSignalState is flagged before, and not cleared by Reset() or ReadKeyStroke()
|
||||
|
@ -4236,12 +3967,6 @@ ConSplitterAbsolutePointerGetState (
|
|||
|
||||
|
||||
Private = TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS (This);
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return EFI_NOT_READY;
|
||||
}
|
||||
|
||||
Private->AbsoluteInputEventSignalState = FALSE;
|
||||
|
||||
|
@ -4290,7 +4015,6 @@ ConSplitterAbsolutePointerGetState (
|
|||
|
||||
/**
|
||||
This event agregates all the events of the pointer devices in the splitter.
|
||||
If the ConIn is password locked then return.
|
||||
If any events of physical pointer devices are signaled, signal the pointer
|
||||
splitter event. This will cause the calling code to call
|
||||
ConSplitterAbsolutePointerGetState ().
|
||||
|
@ -4311,12 +4035,6 @@ ConSplitterAbsolutePointerWaitForInput (
|
|||
UINTN Index;
|
||||
|
||||
Private = (TEXT_IN_SPLITTER_PRIVATE_DATA *) Context;
|
||||
if (Private->PasswordEnabled) {
|
||||
//
|
||||
// If StdIn Locked return not ready
|
||||
//
|
||||
return ;
|
||||
}
|
||||
|
||||
//
|
||||
// if AbsoluteInputEventSignalState is flagged before,
|
||||
|
@ -4369,9 +4087,6 @@ ConSplitterTextOutReset (
|
|||
// return the worst status met
|
||||
//
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
|
||||
Status = Private->TextOutList[Index].TextOut->Reset (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
ExtendedVerification
|
||||
|
@ -4380,14 +4095,13 @@ ConSplitterTextOutReset (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
This->SetAttribute (This, EFI_TEXT_ATTR (This->Mode->Attribute & 0x0F, EFI_BLACK));
|
||||
|
||||
Status = DevNullTextOutSetMode (Private, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ReturnStatus = Status;
|
||||
}
|
||||
//
|
||||
// reset all mode parameters
|
||||
//
|
||||
TextOutSetMode (Private, 0);
|
||||
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
@ -4449,14 +4163,7 @@ ConSplitterTextOutOutputString (
|
|||
//
|
||||
// return the worst status met
|
||||
//
|
||||
Status = DevNullTextOutOutputString (Private, TargetString);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ReturnStatus = Status;
|
||||
}
|
||||
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->OutputString (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
TargetString
|
||||
|
@ -4465,7 +4172,9 @@ ConSplitterTextOutOutputString (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Private->TextOutMode.CursorColumn = Private->TextOutList[0].TextOut->Mode->CursorColumn;
|
||||
Private->TextOutMode.CursorRow = Private->TextOutList[0].TextOut->Mode->CursorRow;
|
||||
|
||||
if (BackSpaceCount > 0) {
|
||||
FreePool (TargetString);
|
||||
|
@ -4508,7 +4217,6 @@ ConSplitterTextOutTestString (
|
|||
// return the worst status met
|
||||
//
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->TestString (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
WString
|
||||
|
@ -4517,7 +4225,6 @@ ConSplitterTextOutTestString (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// There is no DevNullTextOutTestString () since a Unicode buffer would
|
||||
// always return EFI_SUCCESS.
|
||||
|
@ -4642,8 +4349,6 @@ ConSplitterTextOutSetMode (
|
|||
//
|
||||
TextOutModeMap = Private->TextOutModeMap + Private->TextOutListCount * ModeNumber;
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->SetMode (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
TextOutModeMap[Index]
|
||||
|
@ -4660,14 +4365,11 @@ ConSplitterTextOutSetMode (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// The DevNull Console will support any possible mode as it allocates memory
|
||||
// Set mode parameter to specified mode number
|
||||
//
|
||||
Status = DevNullTextOutSetMode (Private, ModeNumber);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ReturnStatus = Status;
|
||||
}
|
||||
TextOutSetMode (Private, ModeNumber);
|
||||
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
@ -4715,8 +4417,6 @@ ConSplitterTextOutSetAttribute (
|
|||
// return the worst status met
|
||||
//
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->SetAttribute (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
Attribute
|
||||
|
@ -4725,7 +4425,6 @@ ConSplitterTextOutSetAttribute (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Private->TextOutMode.Attribute = (INT32) Attribute;
|
||||
|
||||
|
@ -4762,19 +4461,20 @@ ConSplitterTextOutClearScreen (
|
|||
// return the worst status met
|
||||
//
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->ClearScreen (Private->TextOutList[Index].TextOut);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Status = DevNullTextOutClearScreen (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ReturnStatus = Status;
|
||||
}
|
||||
//
|
||||
// No need to do extra check here as whether (Column, Row) is valid has
|
||||
// been checked in ConSplitterTextOutSetCursorPosition. And (0, 0) should
|
||||
// always be supported.
|
||||
//
|
||||
Private->TextOutMode.CursorColumn = 0;
|
||||
Private->TextOutMode.CursorRow = 0;
|
||||
Private->TextOutMode.CursorVisible = TRUE;
|
||||
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
@ -4841,8 +4541,6 @@ ConSplitterTextOutSetCursorPosition (
|
|||
// return the worst status met
|
||||
//
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->SetCursorPosition (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
Column,
|
||||
|
@ -4852,9 +4550,14 @@ ConSplitterTextOutSetCursorPosition (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DevNullTextOutSetCursorPosition (Private, Column, Row);
|
||||
//
|
||||
// No need to do extra check here as whether (Column, Row) is valid has
|
||||
// been checked in ConSplitterTextOutSetCursorPosition. And (0, 0) should
|
||||
// always be supported.
|
||||
//
|
||||
Private->TextOutMode.CursorColumn = (INT32) Column;
|
||||
Private->TextOutMode.CursorRow = (INT32) Row;
|
||||
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
@ -4892,8 +4595,6 @@ ConSplitterTextOutEnableCursor (
|
|||
// return the worst status met
|
||||
//
|
||||
for (Index = 0, ReturnStatus = EFI_SUCCESS; Index < Private->CurrentNumberOfConsoles; Index++) {
|
||||
|
||||
if (Private->TextOutList[Index].TextOutEnabled) {
|
||||
Status = Private->TextOutList[Index].TextOut->EnableCursor (
|
||||
Private->TextOutList[Index].TextOut,
|
||||
Visible
|
||||
|
@ -4902,9 +4603,8 @@ ConSplitterTextOutEnableCursor (
|
|||
ReturnStatus = Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DevNullTextOutEnableCursor (Private, Visible);
|
||||
Private->TextOutMode.CursorVisible = Visible;
|
||||
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Private data structures for the Console Splitter driver
|
||||
|
||||
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
|
||||
Copyright (c) 2006 - 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
|
||||
|
@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/ComponentName.h>
|
||||
#include <Protocol/DriverBinding.h>
|
||||
#include <Protocol/ConsoleControl.h>
|
||||
#include <Protocol/SimplePointer.h>
|
||||
#include <Protocol/AbsolutePointer.h>
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
|
@ -77,7 +76,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;
|
|||
//
|
||||
#define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT 32
|
||||
#define CONSOLE_SPLITTER_MODES_ALLOC_UNIT 32
|
||||
#define MAX_STD_IN_PASSWORD 80
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
@ -146,12 +144,6 @@ typedef struct {
|
|||
UINTN AbsolutePointerListCount;
|
||||
BOOLEAN AbsoluteInputEventSignalState;
|
||||
|
||||
BOOLEAN PasswordEnabled;
|
||||
CHAR16 Password[MAX_STD_IN_PASSWORD];
|
||||
UINTN PwdIndex;
|
||||
CHAR16 PwdAttempt[MAX_STD_IN_PASSWORD];
|
||||
EFI_EVENT LockEvent;
|
||||
|
||||
BOOLEAN KeyEventSignalState;
|
||||
BOOLEAN InputEventSignalState;
|
||||
} TEXT_IN_SPLITTER_PRIVATE_DATA;
|
||||
|
@ -190,7 +182,6 @@ typedef struct {
|
|||
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
|
||||
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
||||
BOOLEAN TextOutEnabled;
|
||||
} TEXT_OUT_AND_GOP_DATA;
|
||||
|
||||
//
|
||||
|
@ -207,17 +198,13 @@ typedef struct {
|
|||
UINT32 UgaVerticalResolution;
|
||||
UINT32 UgaColorDepth;
|
||||
UINT32 UgaRefreshRate;
|
||||
EFI_UGA_PIXEL *UgaBlt;
|
||||
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicsOutputBlt;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer;
|
||||
UINTN CurrentNumberOfGraphicsOutput;
|
||||
UINTN CurrentNumberOfUgaDraw;
|
||||
BOOLEAN HardwareNeedsStarting;
|
||||
|
||||
EFI_CONSOLE_CONTROL_PROTOCOL ConsoleControl;
|
||||
|
||||
UINTN CurrentNumberOfConsoles;
|
||||
TEXT_OUT_AND_GOP_DATA *TextOutList;
|
||||
UINTN TextOutListCount;
|
||||
|
@ -225,13 +212,6 @@ typedef struct {
|
|||
UINTN TextOutQueryDataCount;
|
||||
INT32 *TextOutModeMap;
|
||||
|
||||
EFI_CONSOLE_CONTROL_SCREEN_MODE ConsoleOutputMode;
|
||||
|
||||
UINTN DevNullColumns;
|
||||
UINTN DevNullRows;
|
||||
CHAR16 *DevNullScreen;
|
||||
INT32 *DevNullAttributes;
|
||||
|
||||
} TEXT_OUT_SPLITTER_PRIVATE_DATA;
|
||||
|
||||
#define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
|
||||
|
@ -713,7 +693,7 @@ ConSplitterAbsolutePointerGetState (
|
|||
|
||||
/**
|
||||
This event agregates all the events of the pointer devices in the splitter.
|
||||
If the ConIn is password locked then return.
|
||||
|
||||
If any events of physical pointer devices are signaled, signal the pointer
|
||||
splitter event. This will cause the calling code to call
|
||||
ConSplitterAbsolutePointerGetState ().
|
||||
|
@ -1283,7 +1263,6 @@ ConSplitterTextInReset (
|
|||
/**
|
||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||
If the ConIn is password locked make it look like no keystroke is availible
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Key Driver may perform diagnostics on reset.
|
||||
|
@ -1455,7 +1434,6 @@ ConSplitterTextInUnregisterKeyNotify (
|
|||
/**
|
||||
This event aggregates all the events of the ConIn devices in the spliter.
|
||||
|
||||
If the ConIn is password locked then return.
|
||||
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||
spliter event. This will cause the calling code to call
|
||||
ConSplitterTextInReadKeyStroke ().
|
||||
|
@ -1471,57 +1449,6 @@ ConSplitterTextInWaitForKey (
|
|||
IN VOID *Context
|
||||
);
|
||||
|
||||
/**
|
||||
Return TRUE if StdIn is locked. The ConIn device on the virtual handle is
|
||||
the only device locked.
|
||||
|
||||
@retval TRUE StdIn locked
|
||||
@retval FALSE StdIn working normally
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
ConSpliterConssoleControlStdInLocked (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Record and check key sequence on StdIn.
|
||||
|
||||
This timer event will fire when StdIn is locked. It will record the key sequence
|
||||
on StdIn and also check to see if it matches the password. Any error in the
|
||||
password will cause the check to reset. As long as a mConIn.PasswordEnabled is
|
||||
TRUE, the StdIn splitter will not report any input.
|
||||
|
||||
@param Event The Event this notify function registered to.
|
||||
@param Context Pointer to the context data registerd to the
|
||||
Event.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlLockStdInEvent (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
/**
|
||||
If Password is NULL unlock the password state variable and set the event
|
||||
timer. If the Password is too big return an error. If the Password is valid
|
||||
Copy the Password and enable state variable and then arm the periodic timer
|
||||
|
||||
@param This Console Control protocol pointer.
|
||||
@param Password The password input.
|
||||
|
||||
@retval EFI_SUCCESS Lock the StdIn device
|
||||
@retval EFI_INVALID_PARAMETER Password is NULL
|
||||
@retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlLockStdIn (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN CHAR16 *Password
|
||||
);
|
||||
|
||||
/**
|
||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||
|
@ -1564,7 +1491,6 @@ ConSplitterSimplePointerReset (
|
|||
/**
|
||||
Reads the next keystroke from the input device. The WaitForKey Event can
|
||||
be used to test for existance of a keystroke via WaitForEvent () call.
|
||||
If the ConIn is password locked make it look like no keystroke is availible
|
||||
|
||||
@param This A pointer to protocol instance.
|
||||
@param State A pointer to state information on the pointer device
|
||||
|
@ -1584,7 +1510,6 @@ ConSplitterSimplePointerGetState (
|
|||
|
||||
/**
|
||||
This event agregates all the events of the ConIn devices in the spliter.
|
||||
If the ConIn is password locked then return.
|
||||
If any events of physical ConIn devices are signaled, signal the ConIn
|
||||
spliter event. This will cause the calling code to call
|
||||
ConSplitterTextInReadKeyStroke ().
|
||||
|
@ -1829,48 +1754,6 @@ ConSplitterGrowBuffer (
|
|||
IN OUT VOID **Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
Return the current video mode information. Also returns info about existence
|
||||
of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the
|
||||
arguments are optional and only returned if a non NULL pointer is passed in.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Mode Are we in text of grahics mode.
|
||||
@param GopUgaExists TRUE if Console Spliter has found a GOP or UGA device
|
||||
@param StdInLocked TRUE if StdIn device is keyboard locked
|
||||
|
||||
@retval EFI_SUCCESS Mode information returned.
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameters.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlGetMode (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
||||
OUT BOOLEAN *GopUgaExists,
|
||||
OUT BOOLEAN *StdInLocked
|
||||
);
|
||||
|
||||
/**
|
||||
Set the current mode to either text or graphics. Graphics is
|
||||
for Quiet Boot.
|
||||
|
||||
@param This Console Control Protocol instance pointer.
|
||||
@param Mode Mode to set.
|
||||
|
||||
@retval EFI_SUCCESS Mode information returned.
|
||||
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||
@retval EFI_UNSUPPORTED Operation unsupported.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ConSpliterConsoleControlSetMode (
|
||||
IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
||||
IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
||||
);
|
||||
|
||||
/**
|
||||
Returns information for an available graphics mode that the graphics device
|
||||
and the set of active video output devices supports.
|
||||
|
@ -1978,26 +1861,6 @@ ConSpliterGraphicsOutputBlt (
|
|||
IN UINTN Delta OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Write data from the buffer to video display based on Graphics Output setting.
|
||||
|
||||
@param Private Consplitter Text Out pointer.
|
||||
@param GraphicsOutput Graphics Output protocol pointer.
|
||||
@param UgaDraw UGA Draw protocol pointer.
|
||||
|
||||
@retval EFI_UNSUPPORTED No graphics devcie available .
|
||||
@retval EFI_SUCCESS The Blt operation completed.
|
||||
@retval EFI_INVALID_PARAMETER BltOperation is not valid.
|
||||
@retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullGopSync (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
|
||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
||||
);
|
||||
|
||||
/**
|
||||
Return the current video mode information.
|
||||
|
@ -2111,138 +1974,18 @@ ConSpliterUgaDrawBlt (
|
|||
IN UINTN Delta OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
Write data from the buffer to video display based on UGA Draw setting.
|
||||
|
||||
@param Private Consplitter Text Out pointer.
|
||||
@param GraphicsOutput Graphics Output protocol pointer.
|
||||
@param UgaDraw UGA Draw protocol pointer.
|
||||
|
||||
@retval EFI_UNSUPPORTED No graphics devcie available .
|
||||
@retval EFI_SUCCESS The Blt operation completed.
|
||||
@retval EFI_INVALID_PARAMETER BltOperation is not valid.
|
||||
@retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullUgaSync (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
|
||||
IN EFI_UGA_DRAW_PROTOCOL *UgaDraw
|
||||
);
|
||||
|
||||
/**
|
||||
Write a Unicode string to the output device.
|
||||
|
||||
@param Private Pointer to the console output splitter's private
|
||||
data. It indicates the calling context.
|
||||
@param WString The NULL-terminated Unicode string to be
|
||||
displayed on the output device(s). All output
|
||||
devices must also support the Unicode drawing
|
||||
defined in this file.
|
||||
|
||||
@retval EFI_SUCCESS The string was output to the device.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error while attempting to
|
||||
output the text.
|
||||
@retval EFI_UNSUPPORTED The output device's mode is not currently in a
|
||||
defined text mode.
|
||||
@retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the
|
||||
characters in the Unicode string could not be
|
||||
rendered and were skipped.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullTextOutOutputString (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN CHAR16 *WString
|
||||
);
|
||||
|
||||
/**
|
||||
Sets the output device(s) to a specified mode.
|
||||
|
||||
@param Private Text Out Splitter pointer.
|
||||
@param ModeNumber The mode number to set.
|
||||
|
||||
@retval EFI_SUCCESS The requested text mode was set.
|
||||
@retval EFI_DEVICE_ERROR The device had an error and could not complete
|
||||
the request.
|
||||
@retval EFI_UNSUPPORTED The mode number was not valid.
|
||||
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullTextOutSetMode (
|
||||
VOID
|
||||
TextOutSetMode (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN UINTN ModeNumber
|
||||
);
|
||||
|
||||
/**
|
||||
Clears the output device(s) display to the currently selected background
|
||||
color.
|
||||
|
||||
@param Private Text Out Splitter pointer.
|
||||
|
||||
@retval EFI_SUCCESS The operation completed successfully.
|
||||
@retval EFI_DEVICE_ERROR The device had an error and could not complete
|
||||
the request.
|
||||
@retval EFI_UNSUPPORTED The output device is not in a valid text mode.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullTextOutClearScreen (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
/**
|
||||
Sets the current coordinates of the cursor position on NULL device.
|
||||
|
||||
@param Private Text Out Splitter pointer.
|
||||
@param Column The column position to set the cursor to. Must be
|
||||
greater than or equal to zero and less than the
|
||||
number of columns by QueryMode ().
|
||||
@param Row The row position to set the cursor to. Must be
|
||||
greater than or equal to zero and less than the
|
||||
number of rows by QueryMode ().
|
||||
|
||||
@retval EFI_SUCCESS Always returned.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullTextOutSetCursorPosition (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN UINTN Column,
|
||||
IN UINTN Row
|
||||
);
|
||||
|
||||
/**
|
||||
Set cursor visibility property on NULL device.
|
||||
|
||||
@param Private Text Out Splitter pointer.
|
||||
@param Visible If TRUE, the cursor is set to be visible, If
|
||||
FALSE, the cursor is set to be invisible.
|
||||
|
||||
@retval EFI_SUCCESS Always returned.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullTextOutEnableCursor (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
|
||||
IN BOOLEAN Visible
|
||||
);
|
||||
|
||||
/**
|
||||
Take the DevNull TextOut device and update the Simple Text Out on every
|
||||
UGA device.
|
||||
|
||||
@param Private Text Out Splitter pointer.
|
||||
|
||||
@retval EFI_SUCCESS The request is valid.
|
||||
@retval other Return status of TextOut->OutputString ()
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
DevNullSyncStdOut (
|
||||
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# Note: If only UGA Draw protocol is installed in system table, PcdUgaConsumeSupport
|
||||
# should be set to TRUE.
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@ -76,7 +76,6 @@
|
|||
|
||||
|
||||
[Protocols]
|
||||
gEfiConsoleControlProtocolGuid ## PRODUCES
|
||||
gEfiSimplePointerProtocolGuid ## BY_START
|
||||
gEfiAbsolutePointerProtocolGuid ## BY_START
|
||||
gEfiSimpleTextInProtocolGuid ## BY_START
|
||||
|
@ -95,10 +94,3 @@
|
|||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
|
||||
|
||||
# [Event]
|
||||
# ##
|
||||
# # mConIn.LockEvent, used to record and check key sequence on StdIn. Periodic is 25ms.
|
||||
# #
|
||||
# EVENT_TYPE_PREIODIC_TIMER ## PRODUCES
|
||||
#
|
||||
#
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Private structures definitions in HiiDatabase.
|
||||
|
||||
Copyright (c) 2007 - 2008, Intel Corporation
|
||||
Copyright (c) 2007 - 2009, Intel Corporation
|
||||
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
|
||||
|
@ -17,7 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
|
||||
#include <Uefi.h>
|
||||
|
||||
#include <Protocol/ConsoleControl.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/HiiFont.h>
|
||||
#include <Protocol/HiiImage.h>
|
||||
|
|
|
@ -28,7 +28,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#include <Protocol/HiiConfigRouting.h>
|
||||
#include <Protocol/HiiDatabase.h>
|
||||
#include <Protocol/HiiString.h>
|
||||
#include <Protocol/ConsoleControl.h>
|
||||
|
||||
#include <Guid/MdeModuleHii.h>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#/** @file
|
||||
# The DXE driver produces FORM BROWSER protocols defined in UEFI HII 2.1 specificatin.
|
||||
#
|
||||
# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
|
||||
# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@ -74,7 +74,6 @@
|
|||
gEfiHiiConfigRoutingProtocolGuid ## CONSUMES
|
||||
gEfiHiiDatabaseProtocolGuid ## CONSUMES
|
||||
gEfiUnicodeCollation2ProtocolGuid ## CONSUMES
|
||||
gEfiConsoleControlProtocolGuid ## CONSUMES
|
||||
|
||||
[FeaturePcd.common]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
|
||||
|
|
Loading…
Reference in New Issue