From 97a079edfb4b6454b31ccd4db3302655d835d98f Mon Sep 17 00:00:00 2001 From: AJFISH Date: Mon, 9 Jul 2007 23:39:54 +0000 Subject: 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 --- .../Console/GraphicsConsoleDxe/CommonHeader.h | 47 ------------------ .../Console/GraphicsConsoleDxe/ComponentName.c | 5 -- .../Console/GraphicsConsoleDxe/ComponentName.h | 25 +--------- .../Console/GraphicsConsoleDxe/EntryPoint.c | 56 ---------------------- .../Console/GraphicsConsoleDxe/GraphicsConsole.c | 43 +++++++++++++++-- .../Console/GraphicsConsoleDxe/GraphicsConsole.h | 36 ++++++++++++-- .../Console/GraphicsConsoleDxe/GraphicsConsole.inf | 51 +------------------- .../Universal/Console/GraphicsConsoleDxe/LaffStd.c | 5 -- 8 files changed, 74 insertions(+), 194 deletions(-) delete mode 100644 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/CommonHeader.h delete mode 100644 MdeModulePkg/Universal/Console/GraphicsConsoleDxe/EntryPoint.c (limited to 'MdeModulePkg/Universal/Console/GraphicsConsoleDxe') 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 -// -// The protocols, PPI and GUID defintions for this module -// -#include -#include -#include -#include -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -// -// 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +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[] = { -- cgit v1.2.3