Removed IntelframeworkPkg contamination from MdeModulePkg modules.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3019 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -11,23 +11,6 @@
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiPei.h>
|
||||
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Ppi/ReadOnlyVariable.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeimEntryPoint.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
||||
#include <Variable.h>
|
||||
|
||||
|
@@ -18,38 +18,20 @@ Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiPei.h>
|
||||
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Ppi/ReadOnlyVariable.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeimEntryPoint.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
||||
|
||||
#include <Variable.h>
|
||||
#include "Variable.h"
|
||||
|
||||
//
|
||||
// Module globals
|
||||
//
|
||||
static EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = {
|
||||
static EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = {
|
||||
PeiGetVariable,
|
||||
PeiGetNextVariableName
|
||||
};
|
||||
|
||||
static EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = {
|
||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
&gEfiPeiReadOnlyVariablePpiGuid,
|
||||
&gEfiPeiReadOnlyVariable2PpiGuid,
|
||||
&mVariablePpi
|
||||
};
|
||||
|
||||
@@ -187,10 +169,10 @@ Returns:
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CompareWithValidVariable (
|
||||
IN VARIABLE_HEADER *Variable,
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID *VendorGuid,
|
||||
OUT VARIABLE_POINTER_TRACK *PtrTrack
|
||||
IN VARIABLE_HEADER *Variable,
|
||||
IN CONST CHAR16 *VariableName,
|
||||
IN CONST EFI_GUID *VendorGuid,
|
||||
OUT VARIABLE_POINTER_TRACK *PtrTrack
|
||||
)
|
||||
/*++
|
||||
|
||||
@@ -242,8 +224,8 @@ EFI_STATUS
|
||||
EFIAPI
|
||||
FindVariable (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID *VendorGuid,
|
||||
IN CONST CHAR16 *VariableName,
|
||||
IN CONST EFI_GUID *VendorGuid,
|
||||
OUT VARIABLE_POINTER_TRACK *PtrTrack
|
||||
)
|
||||
/*++
|
||||
@@ -380,12 +362,12 @@ Returns:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PeiGetVariable (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID * VendorGuid,
|
||||
OUT UINT32 *Attributes OPTIONAL,
|
||||
IN OUT UINTN *DataSize,
|
||||
OUT VOID *Data
|
||||
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
|
||||
IN CONST CHAR16 *VariableName,
|
||||
IN CONST EFI_GUID *VariableGuid,
|
||||
OUT UINT32 *Attributes,
|
||||
IN OUT UINTN *DataSize,
|
||||
OUT VOID *Data
|
||||
)
|
||||
/*++
|
||||
|
||||
@@ -420,15 +402,16 @@ Returns:
|
||||
VARIABLE_POINTER_TRACK Variable;
|
||||
UINTN VarDataSize;
|
||||
EFI_STATUS Status;
|
||||
EFI_PEI_SERVICES **PeiServices;
|
||||
|
||||
if (VariableName == NULL || VendorGuid == NULL) {
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
if (VariableName == NULL || VariableGuid == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
//
|
||||
// Find existing variable
|
||||
//
|
||||
Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable);
|
||||
|
||||
Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);
|
||||
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
|
||||
return Status;
|
||||
}
|
||||
@@ -454,10 +437,10 @@ Returns:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PeiGetNextVariableName (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN OUT UINTN *VariableNameSize,
|
||||
IN OUT CHAR16 *VariableName,
|
||||
IN OUT EFI_GUID *VendorGuid
|
||||
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
|
||||
IN OUT UINTN *VariableNameSize,
|
||||
IN OUT CHAR16 *VariableName,
|
||||
IN OUT EFI_GUID *VariableGuid
|
||||
)
|
||||
/*++
|
||||
|
||||
@@ -470,7 +453,7 @@ Arguments:
|
||||
PeiServices - General purpose services available to every PEIM.
|
||||
VariabvleNameSize - The variable name's size.
|
||||
VariableName - A pointer to the variable's name.
|
||||
VendorGuid - A pointer to the EFI_GUID structure.
|
||||
VariableGuid - A pointer to the EFI_GUID structure.
|
||||
|
||||
VariableNameSize - Size of the variable name
|
||||
|
||||
@@ -489,13 +472,14 @@ Returns:
|
||||
VARIABLE_POINTER_TRACK Variable;
|
||||
UINTN VarNameSize;
|
||||
EFI_STATUS Status;
|
||||
EFI_PEI_SERVICES **PeiServices;
|
||||
|
||||
PeiServices = GetPeiServicesTablePointer ();
|
||||
if (VariableName == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable);
|
||||
|
||||
Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);
|
||||
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
|
||||
return Status;
|
||||
}
|
||||
@@ -514,7 +498,7 @@ Returns:
|
||||
if (VarNameSize <= *VariableNameSize) {
|
||||
(*PeiServices)->CopyMem (VariableName, GET_VARIABLE_NAME_PTR (Variable.CurrPtr), VarNameSize);
|
||||
|
||||
(*PeiServices)->CopyMem (VendorGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));
|
||||
(*PeiServices)->CopyMem (VariableGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
|
@@ -22,6 +22,16 @@ Abstract:
|
||||
#ifndef _PEI_VARIABLE_H
|
||||
#define _PEI_VARIABLE_H
|
||||
|
||||
#include <PiPei.h>
|
||||
#include <Ppi/ReadOnlyVariable2.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeimEntryPoint.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/PeiServicesTablePointerLib.h>
|
||||
|
||||
|
||||
//
|
||||
// BugBug: We need relcate the head file.
|
||||
//
|
||||
@@ -91,12 +101,12 @@ Returns:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PeiGetVariable (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID * VendorGuid,
|
||||
OUT UINT32 *Attributes OPTIONAL,
|
||||
IN OUT UINTN *DataSize,
|
||||
OUT VOID *Data
|
||||
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
|
||||
IN CONST CHAR16 *VariableName,
|
||||
IN CONST EFI_GUID *VariableGuid,
|
||||
OUT UINT32 *Attributes,
|
||||
IN OUT UINTN *DataSize,
|
||||
OUT VOID *Data
|
||||
)
|
||||
/*++
|
||||
|
||||
@@ -123,10 +133,10 @@ Returns:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PeiGetNextVariableName (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN OUT UINTN *VariableNameSize,
|
||||
IN OUT CHAR16 *VariableName,
|
||||
IN OUT EFI_GUID *VendorGuid
|
||||
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
|
||||
IN OUT UINTN *VariableNameSize,
|
||||
IN OUT CHAR16 *VariableName,
|
||||
IN OUT EFI_GUID *VariableGuid
|
||||
)
|
||||
/*++
|
||||
|
||||
|
@@ -14,11 +14,6 @@
|
||||
#
|
||||
#**/
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Defines Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = PeiVariable
|
||||
@@ -36,12 +31,6 @@
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
Variable.c
|
||||
Variable.h
|
||||
@@ -58,26 +47,9 @@
|
||||
[Sources.EBC]
|
||||
VariableWorker.c
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# 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
|
||||
@@ -85,34 +57,13 @@
|
||||
HobLib
|
||||
PeimEntryPoint
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# PPI C Name Section - list of PPI and PPI Notify C Names that this module
|
||||
# uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
PeiServiceTablePointerLib
|
||||
|
||||
[Ppis]
|
||||
gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_CONSUMED
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Pcd DYNAMIC - list of PCDs that this module is coded for.
|
||||
#
|
||||
################################################################################
|
||||
gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED
|
||||
|
||||
[PcdsDynamic.common]
|
||||
PcdFlashNvStorageVariableBase|gEfiGenericPlatformTokenSpaceGuid
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Dependency Expression Section - list of Dependency expressions that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
@@ -18,24 +18,6 @@ Abstract:
|
||||
Framework PEIM to provide the Variable functionality
|
||||
|
||||
--*/
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiPei.h>
|
||||
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Ppi/ReadOnlyVariable.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeimEntryPoint.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
||||
|
||||
#include <Variable.h>
|
||||
|
||||
|
Reference in New Issue
Block a user