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
This commit is contained in:
AJFISH
2007-07-09 23:39:54 +00:00
parent b51e4ee433
commit 97a079edfb
33 changed files with 222 additions and 641 deletions

View File

@@ -15,26 +15,6 @@
#ifndef __COMMON_HEADER_H_
#define __COMMON_HEADER_H_
//
// The package level header files this module uses
//
#include <PiPei.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Ppi/ReadOnlyVariable.h>
#include <Ppi/Pcd.h>
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/BaseLib.h>
#include <Library/HobLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/PcdLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/BaseMemoryLib.h>
#error
#endif

View File

@@ -14,11 +14,6 @@ Module Name: Pcd.c
**/
//
// Include common header file for this module.
//
#include "CommonHeader.h"
#include "Service.h"

View File

@@ -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

View File

@@ -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,

View File

@@ -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 <PiPei.h>
#include <Ppi/ReadOnlyVariable2.h>
#include <Ppi/Pcd.h>
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/BaseLib.h>
#include <Library/HobLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/PcdLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Library/BaseMemoryLib.h>
//
// Please make sure the PCD Serivce PEIM Version is consistent with