summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r--MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c25
-rw-r--r--MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c13
-rw-r--r--MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h30
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c65
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c20
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c25
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h16
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c28
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c25
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c32
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h82
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c494
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c249
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/ansi.c29
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c33
15 files changed, 540 insertions, 626 deletions
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c
index 075b695682..8dfd8d8ac7 100644
--- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ComponentName.c
@@ -1,21 +1,16 @@
-/*++
+/** @file
+ UEFI Component Name(2) protocol implementation for ConPlatform driver.
-Copyright (c) 2006, 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.
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php
-Module Name:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- ComponentName.c
-
-Abstract:
-
---*/
+**/
//
// Include common header file for this module.
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
index d5120eb5b2..af2d2221fe 100644
--- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
+++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
@@ -1,6 +1,7 @@
-/*++
+/** @file
+ Console Platfrom DXE Driver, install Console protocols.
-Copyright (c) 2006 - 2007, Intel Corporation
+Copyright (c) 2006 - 2007, 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
@@ -9,13 +10,7 @@ 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.
-Module Name:
-
- ConPlatform.c
-
-Abstract:
-
---*/
+**/
#include <ConPlatform.h>
diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
index 231a20c776..c24d80e0b1 100644
--- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
+++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
@@ -1,21 +1,16 @@
-/*++
+/** @file
+ Header file for Console Platfrom DXE Driver.
-Copyright (c) 2006, 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.
+Copyright (c) 2006 - 2007, 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
+http://opensource.org/licenses/bsd-license.php
-Module Name:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- ConPlatform.h
-
-Abstract:
-
---*/
+**/
#ifndef CON_MANAGE_H_
#define CON_MANAGE_H_
@@ -24,11 +19,12 @@ Abstract:
#include <Protocol/SimpleTextOut.h>
#include <Guid/GlobalVariable.h>
#include <Guid/ConsoleInDevice.h>
+#include <Guid/StandardErrorDevice.h>
+#include <Guid/ConsoleOutDevice.h>
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleTextIn.h>
#include <Guid/HotPlugDevice.h>
-#include <Guid/StandardErrorDevice.h>
-#include <Guid/ConsoleOutDevice.h>
+
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h>
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
index 45b7cf745b..927f7a5a68 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
@@ -1,21 +1,16 @@
-/*++
-
-Copyright (c) 2006, 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.
-
-Module Name:
+/** @file
+ UEFI Component Name(2) protocol implementation for ConSplitter driver.
- ComponentName.c
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php
-Abstract:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
---*/
+**/
#include "ConSplitter.h"
@@ -510,40 +505,40 @@ ConSplitterAbsolutePointerComponentNameGetControllerName (
Arguments:
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
- ControllerHandle - The handle of a controller that the driver specified by
- This is managing. This handle specifies the controller
+ ControllerHandle - The handle of a controller that the driver specified by
+ This is managing. This handle specifies the controller
whose name is to be returned.
- ChildHandle - The handle of the child controller to retrieve the name
- of. This is an optional parameter that may be NULL. It
- will be NULL for device drivers. It will also be NULL
- for a bus drivers that wish to retrieve the name of the
- bus controller. It will not be NULL for a bus driver
+ ChildHandle - The handle of the child controller to retrieve the name
+ of. This is an optional parameter that may be NULL. It
+ will be NULL for device drivers. It will also be NULL
+ for a bus drivers that wish to retrieve the name of the
+ bus controller. It will not be NULL for a bus driver
that wishes to retrieve the name of a child controller.
- Language - A pointer to RFC3066 language identifier.
- This is the language of the controller name
+ Language - A pointer to RFC3066 language identifier.
+ This is the language of the controller name
that that the caller is requesting, and it must match one
- of the languages specified in SupportedLanguages. The
- number of languages supported by a driver is up to the
+ of the languages specified in SupportedLanguages. The
+ number of languages supported by a driver is up to the
driver writer.
ControllerName - A pointer to the Unicode string to return. This Unicode
- string is the name of the controller specified by
- ControllerHandle and ChildHandle in the language
- specified by Language from the point of view of the
- driver specified by This.
+ string is the name of the controller specified by
+ ControllerHandle and ChildHandle in the language
+ specified by Language from the point of view of the
+ driver specified by This.
Returns:
EFI_SUCCESS - The Unicode string for the user readable name in the
- language specified by Language for the driver
+ language specified by Language for the driver
specified by This was returned in DriverName.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
- EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
+ EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
EFI_HANDLE.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ControllerName is NULL.
- EFI_UNSUPPORTED - The driver specified by This is not currently
- managing the controller specified by
+ EFI_UNSUPPORTED - The driver specified by This is not currently
+ managing the controller specified by
ControllerHandle and ChildHandle.
- EFI_UNSUPPORTED - The driver specified by This does not support the
+ EFI_UNSUPPORTED - The driver specified by This does not support the
language specified by Language.
--*/
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
index 20f27a20fb..28de49c773 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
@@ -1,6 +1,10 @@
-/*++
+/** @file
+ Support for ConsoleControl protocol. Support for Graphics output spliter.
+ Support for DevNull Console Out. This console uses memory buffers
+ to represnt the console. It allows a console to start very early and
+ when a new console is added it is synced up with the current console.
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006 - 2008, 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
@@ -9,18 +13,8 @@ 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.
-Module Name:
-
- ConSplitterGraphics.c
-
-Abstract:
+**/
- Support for ConsoleControl protocol. Support for Graphics output spliter.
- Support for DevNull Console Out. This console uses memory buffers
- to represnt the console. It allows a console to start very early and
- when a new console is added it is synced up with the current console
-
---*/
#include "ConSplitter.h"
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c
index 5b4dd01b63..98bbfc2c66 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c
@@ -1,21 +1,16 @@
-/*++
+/** @file
+ UEFI Component Name(2) protocol implementation for GraphicsConsole driver.
-Copyright (c) 2006, 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.
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php
-Module Name:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- ComponentName.c
-
-Abstract:
-
---*/
+**/
#include "GraphicsConsole.h"
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
index 5bdbf7f4cd..7d300a7660 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
@@ -1,6 +1,7 @@
-/*++
+/** @file
+ Header file for GraphicsConsole driver.
-Copyright (c) 2006 - 2008, Intel Corporation
+Copyright (c) 2006, 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
@@ -9,16 +10,7 @@ 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.
-Module Name:
-
- GraphicsConsole.h
-
-Abstract:
-
-
-Revision History
-
---*/
+**/
#ifndef _GRAPHICS_CONSOLE_H
#define _GRAPHICS_CONSOLE_H
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c
index ac8dd16833..76c8fca64f 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c
@@ -1,24 +1,16 @@
-/*++
+/** @file
+ Narrow font Data definition for GraphicsConsole driver.
-Copyright (c) 2006, 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.
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php
-Module Name:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- LaffStd.c
-
-Abstract:
-
-
-Revision History
-
---*/
+**/
#include "GraphicsConsole.h"
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c b/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c
index 11ee906c25..f12b6241b4 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c
@@ -1,21 +1,16 @@
-/*++
+/** @file
+ UEFI Component Name(2) protocol implementation for Terminal driver.
-Copyright (c) 2006, 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.
+Copyright (c) 2006 - 2008, 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
+http://opensource.org/licenses/bsd-license.php
-Module Name:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- ComponentName.c
-
-Abstract:
-
---*/
+**/
#include "Terminal.h"
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
index 06c4f66e08..76b603c3a3 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
@@ -1,6 +1,8 @@
-/*++
+/** @file
+ Produces Simple Text Input Protocl, Simple Text Input Extended Protocol and
+ Simple Text Output Protocol upon Serial IO Protocol.
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2008, 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
@@ -9,15 +11,7 @@ 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.
-Module Name:
-
- Terminal.c
-
-Abstract:
-
-Revision History:
-
---*/
+**/
#include "Terminal.h"
@@ -26,7 +20,7 @@ STATIC
EFI_STATUS
TerminalFreeNotifyList (
IN OUT LIST_ENTRY *ListHead
- );
+ );
//
// Globals
@@ -97,7 +91,7 @@ TERMINAL_DEV gTerminalDevTemplate = {
{ {0} }
},
NULL, // ControllerNameTable
- NULL,
+ NULL,
INPUT_STATE_DEFAULT,
RESET_STATE_DEFAULT,
FALSE,
@@ -960,15 +954,15 @@ Returns:
}
while (!IsListEmpty (ListHead)) {
NotifyNode = CR (
- ListHead->ForwardLink,
- TERMINAL_CONSOLE_IN_EX_NOTIFY,
- NotifyEntry,
+ ListHead->ForwardLink,
+ TERMINAL_CONSOLE_IN_EX_NOTIFY,
+ NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
RemoveEntryList (ListHead->ForwardLink);
gBS->FreePool (NotifyNode);
}
-
+
return EFI_SUCCESS;
}
@@ -1344,9 +1338,9 @@ InitializeEfiKeyFiFo (
/**
The user Entry Point for module Terminal. The user code starts with this function.
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
-
+
@retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point.
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
index ba573a6efe..86808bbc56 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
@@ -1,24 +1,16 @@
-/*++
-
-Copyright (c) 2006, 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.
-
-Module Name:
-
- terminal.h
+/** @file
+ Header file for Terminal driver.
-Abstract:
+Copyright (c) 2006 - 2008, 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
+http://opensource.org/licenses/bsd-license.php
-
-Revision History
+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 _TERMINAL_H
#define _TERMINAL_H
@@ -212,15 +204,15 @@ Routine Description:
Arguments:
- RegsiteredData - A pointer to a buffer that is filled in with the keystroke
+ RegsiteredData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was registered.
- InputData - A pointer to a buffer that is filled in with the keystroke
+ InputData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
-
+ FLASE - Match failed.
+
--*/
;
@@ -230,7 +222,7 @@ TerminalConInWaitForKeyEx (
IN EFI_EVENT Event,
IN VOID *Context
)
-;
+;
//
// Simple Text Input Ex protocol prototypes
//
@@ -252,7 +244,7 @@ TerminalConInResetEx (
Returns:
EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
+ EFI_DEVICE_ERROR - The device is not functioning properly and could
not be reset.
--*/
@@ -267,20 +259,20 @@ TerminalConInReadKeyStrokeEx (
/*++
Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
+ Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
+ KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ EFI_INVALID_PARAMETER - KeyData is NULL.
--*/
;
@@ -298,17 +290,17 @@ TerminalConInSetState (
Arguments:
This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
state for the input device.
-
- Returns:
+
+ Returns:
EFI_SUCCESS - The device state was set successfully.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ EFI_DEVICE_ERROR - The device is not functioning correctly and could
not have the setting adjusted.
EFI_UNSUPPORTED - The device does not have the ability to set its state.
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+ EFI_INVALID_PARAMETER - KeyToggleState is NULL.
---*/
+--*/
;
EFI_STATUS
@@ -326,18 +318,18 @@ TerminalConInRegisterKeyNotify (
Arguments:
This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
+ KeyData - A pointer to a buffer that is filled in with the keystroke
information data for the key that was pressed.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
+ KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ NotifyHandle - Points to the unique handle assigned to the registered notification.
Returns:
EFI_SUCCESS - The notification function was registered successfully.
EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
-
---*/
+ EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+--*/
;
EFI_STATUS
@@ -352,15 +344,15 @@ TerminalConInUnregisterKeyNotify (
Remove a registered notification function from a particular keystroke.
Arguments:
- This - Protocol instance pointer.
+ This - Protocol instance pointer.
NotificationHandle - The handle of the notification function being unregistered.
Returns:
EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
+ EFI_NOT_FOUND - Can not find the matching entry in database.
+
+--*/
;
VOID
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
index a4ad034989..404e46e0e7 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
@@ -1,14 +1,14 @@
/**@file
Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.
-
-Copyright (c) 2006 - 2007 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
-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.
+
+Copyright (c) 2006 - 2007, 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
+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.
**/
@@ -24,20 +24,20 @@ ReadKeyStrokeWorker (
/*++
Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
+ Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
TerminalDevice - Terminal driver private structure
- KeyData - A pointer to a buffer that is filled in with the keystroke
+ KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ EFI_INVALID_PARAMETER - KeyData is NULL.
--*/
{
@@ -47,7 +47,7 @@ ReadKeyStrokeWorker (
if (KeyData == NULL) {
return EFI_INVALID_PARAMETER;
- }
+ }
//
// Initialize *Key to nonsense value.
@@ -72,12 +72,12 @@ ReadKeyStrokeWorker (
//
for (Link = TerminalDevice->NotifyList.ForwardLink; Link != &TerminalDevice->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
- Link,
- TERMINAL_CONSOLE_IN_EX_NOTIFY,
- NotifyEntry,
+ Link,
+ TERMINAL_CONSOLE_IN_EX_NOTIFY,
+ NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
- if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
+ if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
CurrentNotify->KeyNotificationFn (KeyData);
}
}
@@ -95,25 +95,25 @@ TerminalConInReset (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset().
- This driver only perform dependent serial device reset regardless of
+ This driver only perform dependent serial device reset regardless of
the value of ExtendeVerification
-
+
Arguments:
-
+
This - Indicates the calling context.
-
+
ExtendedVerification - Skip by this driver.
-
+
Returns:
-
+
EFI_SUCCESS
- The reset operation succeeds.
-
+ The reset operation succeeds.
+
EFI_DEVICE_ERROR
The dependent serial port reset fails.
-
+
--*/
{
EFI_STATUS Status;
@@ -158,27 +158,27 @@ TerminalConInReadKeyStroke (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke().
-
+
Arguments:
-
+
This - Indicates the calling context.
-
+
Key - A pointer to a buffer that is filled in with the keystroke
- information for the key that was sent from terminal.
-
+ information for the key that was sent from terminal.
+
Returns:
-
+
EFI_SUCCESS
The keystroke information is returned successfully.
-
+
EFI_NOT_READY
There is no keystroke data available.
-
+
EFI_DEVICE_ERROR
The dependent serial device encounters error.
-
+
--*/
{
TERMINAL_DEV *TerminalDevice;
@@ -213,24 +213,24 @@ Routine Description:
Arguments:
- RegsiteredData - A pointer to a buffer that is filled in with the keystroke
+ RegsiteredData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was registered.
- InputData - A pointer to a buffer that is filled in with the keystroke
+ InputData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
-
+ FLASE - Match failed.
+
--*/
{
ASSERT (RegsiteredData != NULL && InputData != NULL);
-
+
if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) ||
(RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) {
- return FALSE;
- }
-
+ return FALSE;
+ }
+
return TRUE;
}
@@ -243,24 +243,24 @@ TerminalConInWaitForKeyEx (
)
/*++
Routine Description:
-
+
Event notification function for EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
- Signal the event if there is key available
-
+ Signal the event if there is key available
+
Arguments:
-
+
Event - Indicates the event that invoke this function.
-
+
Context - Indicates the calling context.
-
+
Returns:
-
+
N/A
-
+
--*/
{
TERMINAL_DEV *TerminalDevice;
-
+
TerminalDevice = TERMINAL_CON_IN_EX_DEV_FROM_THIS (Context);
TerminalConInWaitForKey (Event, &TerminalDevice->SimpleInput);
@@ -288,7 +288,7 @@ TerminalConInResetEx (
Returns:
EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
+ EFI_DEVICE_ERROR - The device is not functioning properly and could
not be reset.
--*/
@@ -304,7 +304,7 @@ TerminalConInResetEx (
}
return EFI_SUCCESS;
-
+
}
EFI_STATUS
@@ -316,20 +316,20 @@ TerminalConInReadKeyStrokeEx (
/*++
Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
+ Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
Arguments:
This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
+ KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
Returns:
EFI_SUCCESS - The keystroke information was returned.
EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ EFI_INVALID_PARAMETER - KeyData is NULL.
--*/
{
@@ -337,7 +337,7 @@ TerminalConInReadKeyStrokeEx (
if (KeyData == NULL) {
return EFI_INVALID_PARAMETER;
- }
+ }
TerminalDevice = TERMINAL_CON_IN_EX_DEV_FROM_THIS (This);
@@ -358,17 +358,17 @@ TerminalConInSetState (
Arguments:
This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
state for the input device.
-
- Returns:
+
+ Returns:
EFI_SUCCESS - The device state was set successfully.
- EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ EFI_DEVICE_ERROR - The device is not functioning correctly and could
not have the setting adjusted.
EFI_UNSUPPORTED - The device does not have the ability to set its state.
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+ EFI_INVALID_PARAMETER - KeyToggleState is NULL.
---*/
+--*/
{
if (KeyToggleState == NULL) {
return EFI_INVALID_PARAMETER;
@@ -392,24 +392,24 @@ TerminalConInRegisterKeyNotify (
Arguments:
This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
+ KeyData - A pointer to a buffer that is filled in with the keystroke
information data for the key that was pressed.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
+ KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ NotifyHandle - Points to the unique handle assigned to the registered notification.
Returns:
EFI_SUCCESS - The notification function was registered successfully.
EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
-
---*/
+ EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+--*/
{
EFI_STATUS Status;
TERMINAL_DEV *TerminalDevice;
TERMINAL_CONSOLE_IN_EX_NOTIFY *NewNotify;
LIST_ENTRY *Link;
- TERMINAL_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
+ TERMINAL_CONSOLE_IN_EX_NOTIFY *CurrentNotify;
if (KeyData == NULL || NotifyHandle == NULL || KeyNotificationFunction == NULL) {
return EFI_INVALID_PARAMETER;
@@ -422,14 +422,14 @@ TerminalConInRegisterKeyNotify (
//
for (Link = TerminalDevice->NotifyList.ForwardLink; Link != &TerminalDevice->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
- Link,
- TERMINAL_CONSOLE_IN_EX_NOTIFY,
- NotifyEntry,
+ Link,
+ TERMINAL_CONSOLE_IN_EX_NOTIFY,
+ NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
- if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
+ if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
- *NotifyHandle = CurrentNotify->NotifyHandle;
+ *NotifyHandle = CurrentNotify->NotifyHandle;
return EFI_SUCCESS;
}
}
@@ -437,19 +437,19 @@ TerminalConInRegisterKeyNotify (
//
// Allocate resource to save the notification function
- //
+ //
NewNotify = (TERMINAL_CONSOLE_IN_EX_NOTIFY *) AllocateZeroPool (sizeof (TERMINAL_CONSOLE_IN_EX_NOTIFY));
if (NewNotify == NULL) {
return EFI_OUT_OF_RESOURCES;
- }
+ }
- NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
+ NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
//
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
- //
+ //
Status = gBS->InstallMultipleProtocolInterfaces (
&NewNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid,
@@ -457,7 +457,7 @@ TerminalConInRegisterKeyNotify (
NULL
);
ASSERT_EFI_ERROR (Status);
- *NotifyHandle = NewNotify->NotifyHandle;
+ *NotifyHandle = NewNotify->NotifyHandle;
return EFI_SUCCESS;
}
@@ -474,15 +474,15 @@ TerminalConInUnregisterKeyNotify (
Remove a registered notification function from a particular keystroke.
Arguments:
- This - Protocol instance pointer.
+ This - Protocol instance pointer.
NotificationHandle - The handle of the notification function being unregistered.
Returns:
EFI_SUCCESS - The notification function was unregistered successfully.
EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
+ EFI_NOT_FOUND - Can not find the matching entry in database.
+
+--*/
{
EFI_STATUS Status;
TERMINAL_DEV *TerminalDevice;
@@ -491,8 +491,8 @@ TerminalConInUnregisterKeyNotify (
if (NotificationHandle == NULL) {
return EFI_INVALID_PARAMETER;
- }
-
+ }
+
Status = gBS->OpenProtocol (
NotificationHandle,
&gSimpleTextInExNotifyGuid,
@@ -509,16 +509,16 @@ TerminalConInUnregisterKeyNotify (
for (Link = TerminalDevice->NotifyList.ForwardLink; Link != &TerminalDevice->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
- Link,
- TERMINAL_CONSOLE_IN_EX_NOTIFY,
- NotifyEntry,
+ Link,
+ TERMINAL_CONSOLE_IN_EX_NOTIFY,
+ NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//
- RemoveEntryList (&CurrentNotify->NotifyEntry);
+ RemoveEntryList (&CurrentNotify->NotifyEntry);
Status = gBS->UninstallMultipleProtocolInterfaces (
CurrentNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid,
@@ -526,12 +526,12 @@ TerminalConInUnregisterKeyNotify (
NULL
);
ASSERT_EFI_ERROR (Status);
- gBS->FreePool (CurrentNotify);
+ gBS->FreePool (CurrentNotify);
return EFI_SUCCESS;
}
}
-
- return EFI_NOT_FOUND;
+
+ return EFI_NOT_FOUND;
}
@@ -541,7 +541,7 @@ TranslateRawDataToEfiKey (
)
/*++
Step1: Turn raw data into Unicode (according to different encode).
- Step2: Translate Unicode into key information.
+ Step2: Translate Unicode into key information.
(according to different terminal standard).
--*/
{
@@ -579,20 +579,20 @@ TerminalConInWaitForKey (
)
/*++
Routine Description:
-
+
Event notification function for EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey event
- Signal the event if there is key available
-
+ Signal the event if there is key available
+
Arguments:
-
+
Event - Indicates the event that invoke this function.
-
+
Context - Indicates the calling context.
-
+
Returns:
-
+
N/A
-
+
--*/
{
//
@@ -613,23 +613,23 @@ TerminalConInCheckForKey (
)
/*++
Routine Description:
-
+
Check for a pending key in the Efi Key FIFO or Serial device buffer.
-
+
Arguments:
-
+
This - Indicates the calling context.
-
+
Returns:
-
+
EFI_SUCCESS
- There is key pending.
-
+ There is key pending.
+
EFI_NOT_READY
There is no key pending.
-
+
EFI_DEVICE_ERROR
-
+
--*/
{
EFI_STATUS Status;
@@ -741,7 +741,7 @@ GetOneKeyFromSerial (
Get one key out of serial buffer.
If serial buffer is empty, return EFI_NOT_READY;
if reading serial buffer encounter error, returns EFI_DEVICE_ERROR;
- if reading serial buffer successfully, put the fetched key to
+ if reading serial buffer successfully, put the fetched key to
the parameter "Input", and return EFI_SUCCESS.
--*/
{
@@ -1130,33 +1130,33 @@ UnicodeToEfiKey (
)
/*++
Routine Description:
-
+
Converts a stream of Unicode characters from a terminal input device into EFI Keys that
can be read through the Simple Input Protocol. The table below shows the keyboard
- input mappings that this function supports. If the ESC sequence listed in one of the
+ input mappings that this function supports. If the ESC sequence listed in one of the
columns is presented, then it is translated into the coorespoding EFI Scan Code. If a
matching sequence is not found, then the raw key strokes are converted into EFI Keys.
-
- 2 seconds are allowed for an ESC sequence to be completed. If the ESC sequence is not
- completed in 2 seconds, then the raw key strokes of the partial ESC sequence are
+
+ 2 seconds are allowed for an ESC sequence to be completed. If the ESC sequence is not
+ completed in 2 seconds, then the raw key strokes of the partial ESC sequence are
converted into EFI Keys.
-
- There is one special input sequence that will force the system to reset.
+
+ There is one special input sequence that will force the system to reset.
This is ESC R ESC r ESC R.
-
+
Arguments:
TerminaDevice : The terminal device to use to translate raw input into EFI Keys
-
+
Returns:
None
Symbols used in table below
===========================
- ESC = 0x1B
- CSI = 0x9B
- DEL = 0x7f
+ ESC = 0x1B
+ CSI = 0x9B
+ DEL = 0x7f
^ = CTRL
+=========+======+===========+==========+==========+
@@ -1167,7 +1167,7 @@ Symbols used in table below
| NULL | 0x00 | | | |
| UP | 0x01 | ESC [ A | ESC [ A | ESC [ A |
| DOWN | 0x02 | ESC [ B | ESC [ B | ESC [ B |
-| RIGHT | 0x03 | ESC [ C | ESC [ C | ESC [ C |
+| RIGHT | 0x03 | ESC [ C | ESC [ C | ESC [ C |
| LEFT | 0x04 | ESC [ D | ESC [ D | ESC [ D |
| HOME | 0x05 | ESC [ H | ESC h | ESC [ H |
| END | 0x06 | ESC [ F | ESC k | ESC [ K |
@@ -1204,7 +1204,7 @@ ESC R ESC r ESC R = Reset System
UINT16 UnicodeChar;
EFI_INPUT_KEY Key;
BOOLEAN SetDefaultResetState;
-
+
TimerStatus = gBS->CheckEvent (TerminalDevice->TwoSecondTimeOut);
if (!EFI_ERROR (TimerStatus)) {
@@ -1213,7 +1213,7 @@ ESC R ESC r ESC R = Reset System
}
while (!IsUnicodeFiFoEmpty(TerminalDevice)) {
-
+
if (TerminalDevice->InputState != INPUT_STATE_DEFAULT) {
//
// Check to see if the 2 second timer has expired
@@ -1252,71 +1252,71 @@ ESC R ESC r ESC R = Reset System
}
Key.ScanCode = SCAN_NULL;
-
- if (TerminalDevice->TerminalType == VT100PlusType ||
+
+ if (TerminalDevice->TerminalType == VT100PlusType ||
TerminalDevice->TerminalType == VTUTF8Type) {
switch (UnicodeChar) {
- case '1':
- Key.ScanCode = SCAN_F1;
+ case '1':
+ Key.ScanCode = SCAN_F1;
break;
- case '2':
- Key.ScanCode = SCAN_F2;
+ case '2':
+ Key.ScanCode = SCAN_F2;
break;
- case '3':
- Key.ScanCode = SCAN_F3;
+ case '3':
+ Key.ScanCode = SCAN_F3;
break;
- case '4':
- Key.ScanCode = SCAN_F4;
+ case '4':
+ Key.ScanCode = SCAN_F4;
break;
- case '5':
- Key.ScanCode = SCAN_F5;
+ case '5':
+ Key.ScanCode = SCAN_F5;
break;
- case '6':
- Key.ScanCode = SCAN_F6;
+ case '6':
+ Key.ScanCode = SCAN_F6;
break;
- case '7':
- Key.ScanCode = SCAN_F7;
+ case '7':
+ Key.ScanCode = SCAN_F7;
break;
- case '8':
- Key.ScanCode = SCAN_F8;
+ case '8':
+ Key.ScanCode = SCAN_F8;
break;
- case '9':
- Key.ScanCode = SCAN_F9;
+ case '9':
+ Key.ScanCode = SCAN_F9;
break;
- case '0':
- Key.ScanCode = SCAN_F10;
+ case '0':
+ Key.ScanCode = SCAN_F10;
break;
case '!':
Key.ScanCode = SCAN_F11;
break;
case '@':
Key.ScanCode = SCAN_F12;
- break;
- case 'h':
- Key.ScanCode = SCAN_HOME;
break;
- case 'k':
- Key.ScanCode = SCAN_END;
+ case 'h':
+ Key.ScanCode = SCAN_HOME;
break;
- case '+':
- Key.ScanCode = SCAN_INSERT;
+ case 'k':
+ Key.ScanCode = SCAN_END;
break;
- case '-':
- Key.ScanCode = SCAN_DELETE;
+ case '+':
+ Key.ScanCode = SCAN_INSERT;
break;
- case '/':
- Key.ScanCode = SCAN_PAGE_DOWN;
+ case '-':
+ Key.ScanCode = SCAN_DELETE;
break;
- case '?':
- Key.ScanCode = SCAN_PAGE_UP;
- break;
- default :
+ case '/':
+ Key.ScanCode = SCAN_PAGE_DOWN;
+ break;
+ case '?':
+ Key.ScanCode = SCAN_PAGE_UP;
+ break;
+ default :
break;
}
}
-
+
switch (UnicodeChar) {
- case 'R':
+ case 'R':
if (TerminalDevice->ResetState == RESET_STATE_DEFAULT) {
TerminalDevice->ResetState = RESET_STATE_ESC_R;
SetDefaultResetState = FALSE;
@@ -1325,14 +1325,14 @@ ESC R ESC r ESC R = Reset System
}
Key.ScanCode = SCAN_NULL;
break;
- case 'r':
+ case 'r':
if (TerminalDevice->ResetState == RESET_STATE_ESC_R) {
TerminalDevice->ResetState = RESET_STATE_ESC_R_ESC_r;
SetDefaultResetState = FALSE;
}
Key.ScanCode = SCAN_NULL;
break;
- default :
+ default :
break;
}
@@ -1357,40 +1357,40 @@ ESC R ESC r ESC R = Reset System
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
Key.ScanCode = SCAN_NULL;
-
+
if (TerminalDevice->TerminalType == VT100Type) {
switch (UnicodeChar) {
- case 'P':
- Key.ScanCode = SCAN_F1;
+ case 'P':
+ Key.ScanCode = SCAN_F1;
break;
- case 'Q':
- Key.ScanCode = SCAN_F2;
+ case 'Q':
+ Key.ScanCode = SCAN_F2;
break;
- case 'w':
- Key.ScanCode = SCAN_F3;
+ case 'w':
+ Key.ScanCode = SCAN_F3;
break;
- case 'x':
- Key.ScanCode = SCAN_F4;
+ case 'x':
+ Key.ScanCode = SCAN_F4;
break;
- case 't':
- Key.ScanCode = SCAN_F5;
+ case 't':
+ Key.ScanCode = SCAN_F5;
break;
- case 'u':
- Key.ScanCode = SCAN_F6;
+ case 'u':
+ Key.ScanCode = SCAN_F6;
break;
- case 'q':
- Key.ScanCode = SCAN_F7;
+ case 'q':
+ Key.ScanCode = SCAN_F7;
break;
- case 'r':
- Key.ScanCode = SCAN_F8;
+ case 'r':
+ Key.ScanCode = SCAN_F8;
break;
- case 'p':
- Key.ScanCode = SCAN_F9;
+ case 'p':
+ Key.ScanCode = SCAN_F9;
break;
- case 'M':
- Key.ScanCode = SCAN_F10;
+ case 'M':
+ Key.ScanCode = SCAN_F10;
break;
- default :
+ default :
break;
}
}
@@ -1408,127 +1408,127 @@ ESC R ESC r ESC R = Reset System
break;
case INPUT_STATE_ESC | INPUT_STATE_LEFTOPENBRACKET:
-
+
TerminalDevice->ResetState = RESET_STATE_DEFAULT;
-
+
Key.ScanCode = SCAN_NULL;
-
+
if (TerminalDevice->TerminalType == PcAnsiType ||
TerminalDevice->TerminalType == VT100Type ||
- TerminalDevice->TerminalType == VT100PlusType ||
+ TerminalDevice->TerminalType == VT100PlusType ||
TerminalDevice->TerminalType == VTUTF8Type) {
switch (UnicodeChar) {
- case 'A':
- Key.ScanCode = SCAN_UP;
+ case 'A':
+ Key.ScanCode = SCAN_UP;
break;
- case 'B':
- Key.ScanCode = SCAN_DOWN;
+ case 'B':
+ Key.ScanCode = SCAN_DOWN;
break;
- case 'C':
- Key.ScanCode = SCAN_RIGHT;
+ case 'C':
+ Key.ScanCode = SCAN_RIGHT;
break;
- case 'D':
- Key.ScanCode = SCAN_LEFT;
+ case 'D':
+ Key.ScanCode = SCAN_LEFT;
break;
- case 'H':
+ case 'H':
if (TerminalDevice->TerminalType == PcAnsiType ||
TerminalDevice->TerminalType == VT100Type) {
- Key.ScanCode = SCAN_HOME;
+ Key.ScanCode = SCAN_HOME;
}
break;
- case 'F':
+ case 'F':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_END;
}
break;
- case 'K':
+ case 'K':
if (TerminalDevice->TerminalType == VT100Type) {
- Key.ScanCode = SCAN_END;
+ Key.ScanCode = SCAN_END;
}
break;
- case 'L':
- case '@':
+ case 'L':
+ case '@':
if (TerminalDevice->TerminalType == PcAnsiType ||
TerminalDevice->TerminalType == VT100Type) {
- Key.ScanCode = SCAN_INSERT;
+ Key.ScanCode = SCAN_INSERT;
}
break;
- case 'X':
+ case 'X':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_DELETE;
}
break;
- case 'P':
+ case 'P':
if (TerminalDevice->TerminalType == VT100Type) {
- Key.ScanCode = SCAN_DELETE;
+ Key.ScanCode = SCAN_DELETE;
} else if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F4;
}
break;
- case 'I':
+ case 'I':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_PAGE_UP;
}
- break;
- case 'V':
+ break;
+ case 'V':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F10;
- }
- case '?':
+ }
+ case '?':
if (TerminalDevice->TerminalType == VT100Type) {
- Key.ScanCode = SCAN_PAGE_UP;
+ Key.ScanCode = SCAN_PAGE_UP;
}
break;
- case 'G':
+ case 'G':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_PAGE_DOWN;
}
- break;
- case 'U':
+ break;
+ case 'U':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F9;
}
- case '/':
+ case '/':
if (TerminalDevice->TerminalType == VT100Type) {
- Key.ScanCode = SCAN_PAGE_DOWN;
+ Key.ScanCode = SCAN_PAGE_DOWN;
}
break;
- case 'M':
+ case 'M':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F1;
}
- break;
- case 'N':
+ break;
+ case 'N':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F2;
}
- break;
- case 'O':
+ break;
+ case 'O':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F3;
}
- break;
- case 'Q':
+ break;
+ case 'Q':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F5;
}
- break;
- case 'R':
+ break;
+ case 'R':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F6;
}
- break;
- case 'S':
+ break;
+ case 'S':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F7;
}
- break;
- case 'T':
+ break;
+ case 'T':
if (TerminalDevice->TerminalType == PcAnsiType) {
Key.ScanCode = SCAN_F8;
}
- break;
- default :
+ break;
+ default :
break;
}
}
@@ -1545,7 +1545,7 @@ ESC R ESC r ESC R = Reset System
break;
-
+
default:
//
// Invalid state. This should never happen.
@@ -1564,7 +1564,7 @@ ESC R ESC r ESC R = Reset System
if (UnicodeChar == CSI) {
TerminalDevice->InputState = INPUT_STATE_CSI;
}
-
+
if (TerminalDevice->InputState != INPUT_STATE_DEFAULT) {
Status = gBS->SetTimer(
TerminalDevice->TwoSecondTimeOut,
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
index 2be62ffa95..65fbfc1ef4 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
@@ -1,23 +1,16 @@
-/*++
-
-Copyright (c) 2006, 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.
+/** @file
+ Implementation for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL protocol.
-Module Name:
+Copyright (c) 2006 - 2008, 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
+http://opensource.org/licenses/bsd-license.php
- TerminalConOut.c
-
-Abstract:
-
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Revision History
---*/
+**/
#include "Terminal.h"
@@ -28,7 +21,7 @@ Revision History
//
//
STATIC UNICODE_TO_CHAR UnicodeToPcAnsiOrAscii[] = {
- { BOXDRAW_HORIZONTAL, 0xc4, L'-' },
+ { BOXDRAW_HORIZONTAL, 0xc4, L'-' },
{ BOXDRAW_VERTICAL, 0xb3, L'|' },
{ BOXDRAW_DOWN_RIGHT, 0xda, L'/' },
{ BOXDRAW_DOWN_LEFT, 0xbf, L'\\' },
@@ -101,27 +94,27 @@ TerminalConOutReset (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.Reset().
If ExtendeVerification is TRUE, then perform dependent serial device reset,
and set display mode to mode 0.
If ExtendedVerification is FALSE, only set display mode to mode 0.
-
+
Arguments:
-
+
This - Indicates the calling context.
-
+
ExtendedVerification - Indicates that the driver may perform a more exhaustive
verification operation of the device during reset.
-
+
Returns:
-
+
EFI_SUCCESS
- The reset operation succeeds.
-
+ The reset operation succeeds.
+
EFI_DEVICE_ERROR
The terminal is not functioning correctly or the serial port reset fails.
-
+
--*/
{
EFI_STATUS Status;
@@ -172,33 +165,33 @@ TerminalConOutOutputString (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString().
The Unicode string will be converted to terminal expressible data stream
and send to terminal via serial port.
-
-
+
+
Arguments:
-
+
This - Indicates the calling context.
-
- WString - The Null-terminated Unicode string to be displayed on
+
+ WString - The Null-terminated Unicode string to be displayed on
the terminal screen.
-
+
Returns:
-
+
EFI_SUCCESS
- The string is output successfully.
-
+ The string is output successfully.
+
EFI_DEVICE_ERROR
The serial port fails to send the string out.
-
+
EFI_WARN_UNKNOWN_GLYPH
- Indicates that some of the characters in the Unicode string could not
- be rendered and are skipped.
-
+ Indicates that some of the characters in the Unicode string could not
+ be rendered and are skipped.
+
EFI_UNSUPPORTED
-
+
--*/
{
TERMINAL_DEV *TerminalDevice;
@@ -229,7 +222,7 @@ TerminalConOutOutputString (
// Get current display mode
//
Mode = This->Mode;
-
+
if (Mode->Mode > 2) {
return EFI_UNSUPPORTED;
}
@@ -368,28 +361,28 @@ TerminalConOutTestString (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.TestString().
If one of the characters in the *Wstring is
neither valid Unicode drawing characters,
not ASCII code, then this function will return
EFI_UNSUPPORTED.
-
-
+
+
Arguments:
-
+
This - Indicates the calling context.
-
+
WString - The Null-terminated Unicode string to be tested.
-
+
Returns:
-
+
EFI_SUCCESS
- The terminal is capable of rendering the output string.
-
+ The terminal is capable of rendering the output string.
+
EFI_UNSUPPORTED
- Some of the characters in the Unicode string cannot be rendered.
-
+ Some of the characters in the Unicode string cannot be rendered.
+
--*/
{
TERMINAL_DEV *TerminalDevice;
@@ -430,38 +423,38 @@ TerminalConOutQueryMode (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_OUT_PROTOCOL.QueryMode().
It returns information for an available text mode
that the terminal supports.
In this driver, we support text mode 80x25 (mode 0),
80x50 (mode 1), 100x31 (mode 2).
-
-
+
+
Arguments:
-
+
*This
Indicates the calling context.
-
+
ModeNumber
The mode number to return information on.
-
+
Columns
The returned columns of the requested mode.
-
+
Rows
- The returned rows of the requested mode.
-
+ The returned rows of the requested mode.
+
Returns:
-
+
EFI_SUCCESS
- The requested mode information is returned.
-
+ The requested mode information is returned.
+
EFI_UNSUPPORTED
- The mode number is not valid.
-
+ The mode number is not valid.
+
EFI_DEVICE_ERROR
-
+
--*/
{
if (This->Mode->MaxMode > 3) {
@@ -472,7 +465,7 @@ TerminalConOutQueryMode (
*Columns = MODE0_COLUMN_COUNT;
*Rows = MODE0_ROW_COUNT;
return EFI_SUCCESS;
- } else if (ModeNumber == 1) {
+ } else if (ModeNumber == 1) {
*Columns = MODE1_COLUMN_COUNT;
*Rows = MODE1_ROW_COUNT;
return EFI_SUCCESS;
@@ -493,30 +486,30 @@ TerminalConOutSetMode (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_OUT.SetMode().
Set the terminal to a specified display mode.
- In this driver, we only support mode 0.
-
+ In this driver, we only support mode 0.
+
Arguments:
-
+
This
Indicates the calling context.
-
+
ModeNumber
The text mode to set.
-
+
Returns:
-
+
EFI_SUCCESS
The requested text mode is set.
-
+
EFI_DEVICE_ERROR
The requested text mode cannot be set because of serial device error.
-
+
EFI_UNSUPPORTED
- The text mode number is not valid.
-
+ The text mode number is not valid.
+
--*/
{
EFI_STATUS Status;
@@ -530,7 +523,7 @@ TerminalConOutSetMode (
if (ModeNumber > 2) {
return EFI_UNSUPPORTED;
}
-
+
//
// Set the current mode
//
@@ -565,29 +558,29 @@ TerminalConOutSetAttribute (
)
/*++
Routine Description:
-
- Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute().
-
+
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute().
+
Arguments:
-
+
This
Indicates the calling context.
-
+
Attribute
The attribute to set. Only bit0..6 are valid, all other bits
are undefined and must be zero.
-
+
Returns:
-
+
EFI_SUCCESS
- The requested attribute is set.
-
+ The requested attribute is set.
+
EFI_DEVICE_ERROR
The requested attribute cannot be set due to serial port error.
-
+
EFI_UNSUPPORTED
- The attribute requested is not defined by EFI spec.
-
+ The attribute requested is not defined by EFI spec.
+
--*/
{
UINT8 ForegroundControl;
@@ -741,28 +734,28 @@ TerminalConOutClearScreen (
)
/*++
Routine Description:
-
+
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen().
- It clears the ANSI terminal's display to the
+ It clears the ANSI terminal's display to the
currently selected background color.
-
-
+
+
Arguments:
-
+
This
Indicates the calling context.
Returns:
-
+
EFI_SUCCESS
The operation completed successfully.
-
+
EFI_DEVICE_ERROR
- The terminal screen cannot be cleared due to serial port error.
-
+ The terminal screen cannot be cleared due to serial port error.
+
EFI_UNSUPPORTED
- The terminal is not in a valid display mode.
-
+ The terminal is not in a valid display mode.
+
--*/
{
EFI_STATUS Status;
@@ -795,32 +788,32 @@ TerminalConOutSetCursorPosition (
)
/*++
Routine Description:
-
- Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition().
-
+
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition().
+
Arguments:
-
+
This
Indicates the calling context.
-
+
Column
The row to set cursor to.
-
+
Row
- The column to set cursor to.
+ The column to set cursor to.
Returns:
-
+
EFI_SUCCESS
The operation completed successfully.
-
+
EFI_DEVICE_ERROR
- The request fails due to serial port error.
-
+ The request fails due to serial port error.
+
EFI_UNSUPPORTED
The terminal is not in a valid text mode, or the cursor position
- is invalid for current mode.
-
+ is invalid for current mode.
+
--*/
{
EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
@@ -885,27 +878,27 @@ TerminalConOutEnableCursor (
)
/*++
Routine Description:
-
+
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
- In this driver, the cursor cannot be hidden.
-
+ In this driver, the cursor cannot be hidden.
+
Arguments:
-
+
This
Indicates the calling context.
-
+
Visible
If TRUE, the cursor is set to be visible,
- If FALSE, the cursor is set to be invisible.
+ If FALSE, the cursor is set to be invisible.
Returns:
-
+
EFI_SUCCESS
The request is valid.
-
+
EFI_UNSUPPORTED
- The terminal does not support cursor hidden.
-
+ The terminal does not support cursor hidden.
+
--*/
{
if (!Visible) {
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c b/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c
index babc4bbedc..813779e0d1 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c
@@ -1,23 +1,16 @@
-/*++
+/** @file
+ Provides misc functions upon ansi.
-Copyright (c) 2006, 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.
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php
-Module Name:
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- ansi.c
-
-Abstract:
-
-
-Revision History
---*/
+**/
#include "Terminal.h"
@@ -56,7 +49,7 @@ AnsiTestString (
//
for (; *WString != CHAR_NULL; WString++) {
- if ( !(TerminalIsValidAscii (*WString) ||
+ if ( !(TerminalIsValidAscii (*WString) ||
TerminalIsValidEfiCntlChar (*WString) ||
TerminalIsValidTextGraphics (*WString, &GraphicChar, NULL) )) {
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c b/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c
index 648344a279..286c937d42 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c
@@ -1,23 +1,16 @@
-/*++
-
-Copyright (c) 2006, 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.
-
-Module Name:
-
- vtutf8.c
-
-Abstract:
-
-
-Revision History
---*/
+/**@file
+ Implementation translation among different code tyies.
+
+Copyright (c) 2006, 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
+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.
+
+**/
#include "Terminal.h"