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 --- MdeModulePkg/Universal/PCD/Pei/CommonHeader.h | 22 +-------- MdeModulePkg/Universal/PCD/Pei/Pcd.c | 5 -- MdeModulePkg/Universal/PCD/Pei/Pcd.inf | 66 +-------------------------- MdeModulePkg/Universal/PCD/Pei/Service.c | 18 +++----- MdeModulePkg/Universal/PCD/Pei/Service.h | 16 +++++-- 5 files changed, 21 insertions(+), 106 deletions(-) (limited to 'MdeModulePkg/Universal/PCD') diff --git a/MdeModulePkg/Universal/PCD/Pei/CommonHeader.h b/MdeModulePkg/Universal/PCD/Pei/CommonHeader.h index c488c38e9e..967f160688 100644 --- a/MdeModulePkg/Universal/PCD/Pei/CommonHeader.h +++ b/MdeModulePkg/Universal/PCD/Pei/CommonHeader.h @@ -15,26 +15,6 @@ #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 -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -#include +#error #endif diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c index b018e5a95d..daaba4b539 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c @@ -14,11 +14,6 @@ Module Name: Pcd.c **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" - #include "Service.h" diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf index 64c01458b5..450aa857f0 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf @@ -14,11 +14,6 @@ # #**/ -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ [Defines] INF_VERSION = 0x00010005 BASE_NAME = PcdPeim @@ -37,38 +32,15 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - [Sources.common] Service.c Service.h Pcd.c CommonHeader.h - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ - [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ [LibraryClasses] BaseMemoryLib @@ -80,36 +52,15 @@ PeimEntryPoint DebugLib - -################################################################################ -# -# Guid C Name Section - list of Guids that this module uses or produces. -# -################################################################################ - [Guids] gPcdPeiCallbackFnTableHobGuid # ALWAYS_PRODUCED Hob: GUID_EXTENSION gPcdDataBaseHobGuid # ALWAYS_PRODUCED Hob: GUID_EXTENSION -################################################################################ -# -# PPI C Name Section - list of PPI and PPI Notify C Names that this module -# uses or produces. -# -################################################################################ - [Ppis] - gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_CONSUMED + gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED gPcdPpiGuid # PPI ALWAYS_PRODUCED - -################################################################################ -# -# Pcd FEATURE_FLAG - list of PCDs that this module is coded for. -# -################################################################################ - [PcdsFeatureFlag.common] PcdPeiPcdDatabaseSetEnabled|gEfiMdeModulePkgTokenSpaceGuid PcdPeiPcdDatabaseGetSizeEnabled|gEfiMdeModulePkgTokenSpaceGuid @@ -117,25 +68,10 @@ PcdPeiPcdDatabaseCallbackOnSetEnabled|gEfiMdeModulePkgTokenSpaceGuid PcdPeiPcdDatabaseTraverseEnabled|gEfiMdeModulePkgTokenSpaceGuid - -################################################################################ -# -# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for. -# -################################################################################ - [PcdsFixedAtBuild.common] PcdVpdBaseAddress|gEfiMdeModulePkgTokenSpaceGuid PcdMaxPeiPcdCallBackNumberPerPcdEntry|gEfiMdeModulePkgTokenSpaceGuid - -################################################################################ -# -# Dependency Expression Section - list of Dependency expressions that are required for -# this module. -# -################################################################################ - [Depex] TRUE diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index cb980daa39..16a5cc8489 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -14,10 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: Service.c **/ -// -// Include common header file for this module. -// -#include "CommonHeader.h" #include "Service.h" @@ -171,28 +167,28 @@ GetHiiVariable ( UINTN Size; EFI_STATUS Status; VOID *Buffer; - EFI_PEI_READ_ONLY_VARIABLE_PPI *VariablePpi; + EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariablePpi; - Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariablePpiGuid, 0, NULL, (VOID **) &VariablePpi); + Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariablePpi); ASSERT_EFI_ERROR (Status); Size = 0; - Status = VariablePpi->PeiGetVariable ( - GetPeiServicesTablePointer (), + Status = VariablePpi->GetVariable ( + VariablePpi, VariableName, (EFI_GUID *) VariableGuid, NULL, &Size, NULL - ); + ); if (Status == EFI_BUFFER_TOO_SMALL) { Status = PeiServicesAllocatePool (Size, &Buffer); ASSERT_EFI_ERROR (Status); - Status = VariablePpi->PeiGetVariable ( - GetPeiServicesTablePointer (), + Status = VariablePpi->GetVariable ( + VariablePpi, (UINT16 *) VariableName, (EFI_GUID *) VariableGuid, NULL, diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.h b/MdeModulePkg/Universal/PCD/Pei/Service.h index 334c399436..fcfdda30e3 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.h +++ b/MdeModulePkg/Universal/PCD/Pei/Service.h @@ -18,10 +18,18 @@ Module Name: Service.h #ifndef _SERVICE_H #define _SERVICE_H -// -// Include common header file for this module. -// -#include "CommonHeader.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + // // Please make sure the PCD Serivce PEIM Version is consistent with -- cgit v1.2.3