diff options
author | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-09 23:39:54 +0000 |
---|---|---|
committer | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-09 23:39:54 +0000 |
commit | 97a079edfb4b6454b31ccd4db3302655d835d98f (patch) | |
tree | 20ddb81e7647ab58f296b3ef92ff87b6363e2da3 /MdeModulePkg/Universal/Console | |
parent | b51e4ee4331e463d7549ef0ac356c5fac174e5de (diff) | |
download | edk2-platforms-97a079edfb4b6454b31ccd4db3302655d835d98f.tar.xz |
Updated modules to not depend on the IntelFrameworkPkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3162 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console')
24 files changed, 184 insertions, 529 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/CommonHeader.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/CommonHeader.h deleted file mode 100644 index 7feaec4161..0000000000 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/CommonHeader.h +++ /dev/null @@ -1,61 +0,0 @@ -/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2006 - 2007, 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 __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Guid/PrimaryStandardErrorDevice.h>
-#include <Guid/PrimaryConsoleOutDevice.h>
-#include <Protocol/GraphicsOutput.h>
-#include <Guid/PrimaryConsoleInDevice.h>
-#include <Protocol/SimplePointer.h>
-#include <Protocol/SimpleTextOut.h>
-#include <Guid/ConsoleInDevice.h>
-#include <Protocol/SimpleTextIn.h>
-#include <Protocol/ConsoleControl.h>
-#include <Guid/StandardErrorDevice.h>
-#include <Guid/ConsoleOutDevice.h>
-#include <Protocol/UgaDraw.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-//
-// Driver Binding Externs
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
-extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
-extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
-extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
-
-
-#endif
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c index 6d1bf15a21..a6f94a1bdd 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c @@ -17,11 +17,6 @@ Abstract: --*/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "ConSplitter.h"
//
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index ead6d654d8..1c32a0c6ef 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -27,11 +27,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "ConSplitter.h"
//
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index ac5e337689..119cf32fa6 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -15,10 +15,44 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _CON_SPLITTER_H_
#define _CON_SPLITTER_H_
+#include <PiDxe.h>
+#include <Guid/PrimaryStandardErrorDevice.h>
+#include <Guid/PrimaryConsoleOutDevice.h>
+#include <Protocol/GraphicsOutput.h>
+#include <Guid/PrimaryConsoleInDevice.h>
+#include <Protocol/SimplePointer.h>
+#include <Protocol/SimpleTextOut.h>
+#include <Guid/ConsoleInDevice.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Protocol/ConsoleControl.h>
+#include <Guid/StandardErrorDevice.h>
+#include <Guid/ConsoleOutDevice.h>
+#include <Protocol/UgaDraw.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiLib.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
//
-// Include common header file for this module.
+// Driver Binding Externs
//
-#include "CommonHeader.h"
+extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
+extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
+extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
+extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
+
+// These definitions were in the old Hii protocol, but are not in the new UEFI
+// version. So they are defined locally.
+#define UNICODE_NARROW_CHAR 0xFFF0
+#define UNICODE_WIDE_CHAR 0xFFF1
+
//
// Private Data Structures
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.inf index a5f95e4bc1..4942360d6a 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.inf +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.inf @@ -45,38 +45,14 @@ # COMPONENT_NAME = gConSplitterStdErrComponentName
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
-
[Sources.common]
ConSplitterGraphics.c
ComponentName.c
ConSplitter.h
ConSplitter.c
- CommonHeader.h
-
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
[LibraryClasses]
UefiBootServicesTableLib
@@ -87,13 +63,6 @@ UefiDriverEntryPoint
DebugLib
-
-################################################################################
-#
-# Guid C Name Section - list of Guids that this module uses or produces.
-#
-################################################################################
-
[Guids]
gEfiConsoleInDeviceGuid # ALWAYS_CONSUMED
gEfiStandardErrorDeviceGuid # ALWAYS_CONSUMED
@@ -102,14 +71,6 @@ gEfiPrimaryConsoleInDeviceGuid # ALWAYS_PRODUCED
gEfiPrimaryStandardErrorDeviceGuid # ALWAYS_PRODUCED
-
-################################################################################
-#
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names
-# that this module uses or produces.
-#
-################################################################################
-
[Protocols]
gEfiConsoleControlProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiSimplePointerProtocolGuid # PROTOCOL ALWAYS_PRODUCED
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c index 0387324fcf..c3e15d4ac9 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c @@ -22,15 +22,8 @@ Abstract: --*/
-
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "ConSplitter.h"
-#include <Protocol/FrameworkHii.h>
static CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
@@ -839,8 +832,8 @@ DevNullTextOutOutputString ( break;
}
- if (*WString == WIDE_CHAR || *WString == NARROW_CHAR) {
- CurrentWidth = (*WString == WIDE_CHAR) ? 2 : 1;
+ if (*WString == UNICODE_WIDE_CHAR || *WString == UNICODE_NARROW_CHAR) {
+ CurrentWidth = (*WString == UNICODE_WIDE_CHAR) ? 2 : 1;
WString++;
continue;
}
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/CommonHeader.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/CommonHeader.h deleted file mode 100644 index ad94d88d86..0000000000 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/CommonHeader.h +++ /dev/null @@ -1,47 +0,0 @@ -/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2006 - 2007, 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 __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/FrameworkHii.h>
-#include <Protocol/SimpleTextOut.h>
-#include <Protocol/GraphicsOutput.h>
-#include <Protocol/UgaDraw.h>
-#include <Protocol/DevicePath.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/HiiLibFramework.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-//
-// Driver Binding Externs
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
-
-#endif
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c index b739e13564..5c615ba1c8 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.c @@ -17,11 +17,6 @@ Abstract: --*/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "GraphicsConsole.h"
//
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.h index 1067b96677..b00a6af9fe 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.h +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/ComponentName.h @@ -28,29 +28,6 @@ Revision History //
#include "CommonHeader.h"
-extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
-
-//
-// EFI Component Name Functions
-//
-EFI_STATUS
-EFIAPI
-GraphicsConsoleComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- )
-;
-
-EFI_STATUS
-EFIAPI
-GraphicsConsoleComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- )
-;
+#error
#endif
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/EntryPoint.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/EntryPoint.c deleted file mode 100644 index 627ad4109d..0000000000 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/EntryPoint.c +++ /dev/null @@ -1,56 +0,0 @@ -/**@file
- Entry Point Source file.
-
- This file contains the user entry point
-
- Copyright (c) 2006 - 2007, 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.
-**/
-
-
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
-/**
- The user Entry Point for module GraphicsConsole. The user code starts with this function.
-
- @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.
-
-**/
-EFI_STATUS
-EFIAPI
-InitializeGraphicsConsole(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
-
- //
- // Install driver model protocol(s).
- //
- Status = EfiLibInstallAllDriverProtocols (
- ImageHandle,
- SystemTable,
- &gGraphicsConsoleDriverBinding,
- ImageHandle,
- &gGraphicsConsoleComponentName,
- NULL,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
-
- return Status;
-}
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index aecbb206a9..13c5d69991 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -17,11 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "GraphicsConsole.h"
STATIC
@@ -1824,3 +1819,41 @@ EraseCursor ( return EFI_SUCCESS;
}
+
+/**
+ The user Entry Point for module GraphicsConsole. The user code starts with this function.
+
+ @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.
+
+**/
+EFI_STATUS
+EFIAPI
+InitializeGraphicsConsole (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ //
+ // Install driver model protocol(s).
+ //
+ Status = EfiLibInstallAllDriverProtocols (
+ ImageHandle,
+ SystemTable,
+ &gGraphicsConsoleDriverBinding,
+ ImageHandle,
+ &gGraphicsConsoleComponentName,
+ NULL,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+
+ return Status;
+}
+
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h index 73daaa3b43..cc25e1f35c 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h @@ -23,13 +23,43 @@ Revision History #ifndef _GRAPHICS_CONSOLE_H
#define _GRAPHICS_CONSOLE_H
+#include <PiDxe.h>
+#include <Protocol/FrameworkHii.h>
+#include <Protocol/SimpleTextOut.h>
+#include <Protocol/GraphicsOutput.h>
+#include <Protocol/UgaDraw.h>
+#include <Protocol/DevicePath.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiLib.h>
+#include <Library/HiiLibFramework.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+
+
+extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
//
-// Include common header file for this module.
+// EFI Component Name Functions
//
-#include "CommonHeader.h"
+EFI_STATUS
+EFIAPI
+GraphicsConsoleComponentNameGetDriverName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
+ );
-#include "ComponentName.h"
+EFI_STATUS
+EFIAPI
+GraphicsConsoleComponentNameGetControllerName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
+ );
//
// Glyph database
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.inf b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.inf index 229f916db8..24d4016687 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.inf +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.inf @@ -14,11 +14,6 @@ #
#**/
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = GraphicsConsole
@@ -39,40 +34,16 @@ # COMPONENT_NAME = gGraphicsConsoleComponentName
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
-
[Sources.common]
ComponentName.c
- ComponentName.h
LaffStd.c
GraphicsConsole.c
GraphicsConsole.h
- CommonHeader.h
- EntryPoint.c
-
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
+ # currently use Hii for glyph lookup, need to change to UEFI scheme
+ IntelFrameworkPkg/IntelFrameworkPkg.dec
[LibraryClasses]
UefiBootServicesTableLib
@@ -83,24 +54,6 @@ DebugLib
HiiLib
-
-################################################################################
-#
-# Guid C Name Section - list of Guids that this module uses or produces.
-#
-################################################################################
-
-[Guids]
-
-
-
-################################################################################
-#
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names
-# that this module uses or produces.
-#
-################################################################################
-
[Protocols]
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiSimpleTextOutProtocolGuid # PROTOCOL BY_START
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c index d91f91fd89..ac8dd16833 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c @@ -20,11 +20,6 @@ Revision History --*/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "GraphicsConsole.h"
EFI_NARROW_GLYPH UsStdNarrowGlyphData[] = {
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/CommonHeader.h b/MdeModulePkg/Universal/Console/TerminalDxe/CommonHeader.h deleted file mode 100644 index 7aca138d4e..0000000000 --- a/MdeModulePkg/Universal/Console/TerminalDxe/CommonHeader.h +++ /dev/null @@ -1,51 +0,0 @@ -/**@file
- Common header file shared by all source files.
-
- This file includes package header files, library classes and protocol, PPI & GUID definitions.
-
- Copyright (c) 2006 - 2007, 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 __COMMON_HEADER_H_
-#define __COMMON_HEADER_H_
-
-
-//
-// The package level header files this module uses
-//
-#include <PiDxe.h>
-//
-// The protocols, PPI and GUID defintions for this module
-//
-#include <Protocol/SimpleTextOut.h>
-#include <Protocol/SerialIo.h>
-#include <Guid/GlobalVariable.h>
-#include <Protocol/DevicePath.h>
-#include <Protocol/SimpleTextIn.h>
-#include <Guid/HotPlugDevice.h>
-#include <Guid/PcAnsi.h>
-//
-// The Library classes this module consumes
-//
-#include <Library/DebugLib.h>
-#include <Library/UefiDriverEntryPoint.h>
-#include <Library/UefiLib.h>
-#include <Library/ReportStatusCodeLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/DevicePathLib.h>
-//
-// Driver Binding Externs
-//
-extern EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName;
-
-#endif
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c b/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c index 9048326f5a..5db13dc4fa 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/ComponentName.c @@ -17,12 +17,6 @@ Abstract: --*/
-
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "Terminal.h"
//
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/EntryPoint.c b/MdeModulePkg/Universal/Console/TerminalDxe/EntryPoint.c deleted file mode 100644 index a8feebb1d1..0000000000 --- a/MdeModulePkg/Universal/Console/TerminalDxe/EntryPoint.c +++ /dev/null @@ -1,56 +0,0 @@ -/**@file
- Entry Point Source file.
-
- This file contains the user entry point
-
- Copyright (c) 2006 - 2007, 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.
-**/
-
-
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
-/**
- 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] 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.
-
-**/
-EFI_STATUS
-EFIAPI
-InitializeTerminal(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
-
- //
- // Install driver model protocol(s).
- //
- Status = EfiLibInstallAllDriverProtocols (
- ImageHandle,
- SystemTable,
- &gTerminalDriverBinding,
- ImageHandle,
- &gTerminalComponentName,
- NULL,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
-
- return Status;
-}
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c index 01ab587bd6..4860a4b210 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c @@ -20,15 +20,9 @@ Revision History: --*/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
#include "Terminal.h"
-#include "FrameworkDxe.h"
-
//
// Globals
//
@@ -195,15 +189,6 @@ TerminalDriverBindingStart ( if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
return Status;
}
- //
- // Report that the remote terminal is being enabled
- //
- DevicePath = ParentDevicePath;
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_ENABLE,
- DevicePath
- );
//
// Open the Serial I/O Protocol BY_DRIVER. It might already be started.
@@ -584,7 +569,7 @@ ReportError: //
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_CONTROLLER_ERROR,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleError),
DevicePath
);
@@ -672,14 +657,6 @@ TerminalDriverBindingStop ( if (EFI_ERROR (Status)) {
return Status;
}
- //
- // Report that the remote terminal is being disabled
- //
- REPORT_STATUS_CODE_WITH_DEVICE_PATH (
- EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_DISABLE,
- DevicePath
- );
//
// Complete all outstanding transactions to Controller.
@@ -1192,3 +1169,41 @@ InitializeEfiKeyFiFo ( //
TerminalDevice->EfiKeyFiFo.Head = TerminalDevice->EfiKeyFiFo.Tail;
}
+
+
+/**
+ 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] 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.
+
+**/
+EFI_STATUS
+EFIAPI
+InitializeTerminal(
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_STATUS Status;
+
+ //
+ // Install driver model protocol(s).
+ //
+ Status = EfiLibInstallAllDriverProtocols (
+ ImageHandle,
+ SystemTable,
+ &gTerminalDriverBinding,
+ ImageHandle,
+ &gTerminalComponentName,
+ NULL,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+
+ return Status;
+}
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h index 7ec24b3091..5a7dc0e3e7 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h @@ -23,10 +23,27 @@ Revision History #ifndef _TERMINAL_H
#define _TERMINAL_H
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
+
+#include <PiDxe.h>
+#include <Protocol/SimpleTextOut.h>
+#include <Protocol/SerialIo.h>
+#include <Guid/GlobalVariable.h>
+#include <Protocol/DevicePath.h>
+#include <Protocol/SimpleTextIn.h>
+#include <Guid/HotPlugDevice.h>
+#include <Guid/PcAnsi.h>
+#include <Library/DebugLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/UefiLib.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Library/DevicePathLib.h>
+#include <Library/PcdLib.h>
+
+
#define RAW_FIFO_MAX_NUMBER 256
#define FIFO_MAX_NUMBER 128
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.inf b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.inf index 358db95606..a3add0c7e4 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.inf +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.inf @@ -14,11 +14,6 @@ #
#**/
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = Terminal
@@ -39,12 +34,6 @@ # COMPONENT_NAME = gTerminalComponentName
#
-################################################################################
-#
-# Sources Section - list of files that are required for the build to succeed.
-#
-################################################################################
-
[Sources.common]
ComponentName.c
vtutf8.c
@@ -53,27 +42,9 @@ TerminalConIn.c
Terminal.c
Terminal.h
- CommonHeader.h
- EntryPoint.c
-
-
-################################################################################
-#
-# Package Dependency Section - list of Package files that are required for
-# this module.
-#
-################################################################################
[Packages]
MdePkg/MdePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-################################################################################
-#
-# Library Class Section - list of Library Classes that are required for
-# this module.
-#
-################################################################################
[LibraryClasses]
DevicePathLib
@@ -85,13 +56,7 @@ UefiLib
UefiDriverEntryPoint
DebugLib
-
-
-################################################################################
-#
-# Guid C Name Section - list of Guids that this module uses or produces.
-#
-################################################################################
+ PcdLib
[Guids]
gEfiGlobalVariableGuid # SOMETIMES_CONSUMED L"ErrOutDev"
@@ -101,13 +66,6 @@ gEfiPcAnsiGuid # SOMETIMES_CONSUMED
-################################################################################
-#
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names
-# that this module uses or produces.
-#
-################################################################################
-
[Protocols]
gEfiHotPlugDeviceGuid # PROTOCOL SOMETIMES_CONSUMED
gEfiSerialIoProtocolGuid # PROTOCOL TO_START
@@ -115,3 +73,8 @@ gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
gEfiSimpleTextOutProtocolGuid # PROTOCOL BY_START
+[PcdsFixedAtBuild]
+ PcdStatusCodeValueRemoteConsoleError|gEfiMdePkgTokenSpaceGuid
+ PcdStatusCodeValueRemoteConsoleReset|gEfiMdePkgTokenSpaceGuid
+ PcdStatusCodeValueRemoteConsoleInputError|gEfiMdePkgTokenSpaceGuid
+ PcdStatusCodeValueRemoteConsoleOutputError|gEfiMdePkgTokenSpaceGuid
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 952024b712..2d76e38c33 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -12,14 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "Terminal.h"
-#include "FrameworkDxe.h"
EFI_STATUS
EFIAPI
@@ -60,7 +54,7 @@ TerminalConInReset ( //
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_RESET,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleReset),
TerminalDevice->DevicePath
);
@@ -76,7 +70,7 @@ TerminalConInReset ( if (EFI_ERROR (Status)) {
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_CONTROLLER_ERROR,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleError),
TerminalDevice->DevicePath
);
}
@@ -313,7 +307,7 @@ TerminalConInCheckForKey ( if (Status == EFI_DEVICE_ERROR) {
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_INPUT_ERROR,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleInputError),
TerminalDevice->DevicePath
);
}
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c index b5a9f33e14..1931c22886 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c @@ -19,15 +19,8 @@ Abstract: Revision History
--*/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "Terminal.h"
-#include "FrameworkDxe.h"
-
//
// This list is used to define the valid extend chars.
// It also provides a mapping from Unicode to PCANSI or
@@ -145,7 +138,7 @@ TerminalConOutReset ( //
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_PROGRESS_CODE,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_PC_RESET,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleReset),
TerminalDevice->DevicePath
);
@@ -156,7 +149,7 @@ TerminalConOutReset ( //
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_CONTROLLER_ERROR,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleError),
TerminalDevice->DevicePath
);
@@ -360,7 +353,7 @@ TerminalConOutOutputString ( OutputError:
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
- EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_OUTPUT_ERROR,
+ PcdGet32 (PcdStatusCodeValueRemoteConsoleOutputError),
TerminalDevice->DevicePath
);
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c b/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c index c3ebe245bf..babc4bbedc 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/ansi.c @@ -20,11 +20,6 @@ Revision History --*/
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "Terminal.h"
VOID
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c b/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c index 72e0920c8a..648344a279 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/vtutf8.c @@ -19,12 +19,6 @@ Abstract: Revision History
--*/
-
-//
-// Include common header file for this module.
-//
-#include "CommonHeader.h"
-
#include "Terminal.h"
VOID
|