1) Update the file headers

2) Make sure ReadOnlyVariableToReadOnlyVariable2Thunk and ReadOnlyVariable2ToReadOnlyVariableThunk are not included in the platform at the same time.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5219 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-05-19 02:40:45 +00:00
parent ec3d17dcef
commit c8eb679ca9
2 changed files with 20 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/**
/** @file
Module produce EFI_PEI_READ_ONLY_VARIABLE_PPI on top of EFI_PEI_READ_ONLY_VARIABLE2_PPI.
UEFI PI Spec supersedes Intel's Framework Specs.
# EFI_PEI_READ_ONLY_VARIABLE_PPI defined in Intel Framework Pkg is replaced by EFI_PEI_READ_ONLY_VARIABLE2_PPI
@ -8,6 +8,8 @@ UEFI PI Spec supersedes Intel's Framework Specs.
# 1) Framework module consumes EFI_PEI_READ_ONLY_VARIABLE_PPI is present.
# 2) The platform has a PI module that only produces EFI_PEI_READ_ONLY_VARIABLE2_PPI.
This module can't be used together with ReadOnlyVariable2ToReadOnlyVariableThunk module.
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -23,7 +25,9 @@ Module Name:
#include <PiPei.h>
#include <Ppi/ReadOnlyVariable.h>
#include <Ppi/ReadOnlyVariable2.h>
#include <Ppi/ReadOnlyVariableThunkPresent.h>
#include <Library/DebugLib.h>
#include <Library/PeiServicesLib.h>
//
// Function Prototypes
@ -86,6 +90,16 @@ Returns:
--*/
{
VOID *Interface;
EFI_STATUS Status;
//
// Make sure ReadOnlyVariableToReadOnlyVariable2 module is not present. If so, the call chain will form a
// infinite loop: ReadOnlyVariable -> ReadOnlyVariable2 -> ReadOnlyVariable -> ....
//
Status = PeiServicesLocatePpi (&gPeiReadonlyVariableThunkPresentPpiGuid, 0, NULL, &Interface);
ASSERT (Status == EFI_NOT_FOUND);
//
// Publish the variable capability to other modules
//

View File

@ -8,6 +8,8 @@
# This module is used on platform when both of these two conditions are true:
# 1) Framework module consumes EFI_PEI_READ_ONLY_VARIABLE_PPI is present.
# 2) The platform has a PI module that only produces EFI_PEI_READ_ONLY_VARIABLE2_PPI.
# This module can't be used together with ReadOnlyVariable2ToReadOnlyVariableThunk module.
#
# Copyright (c) 2006 - 2007, Intel Corporation
#
@ -43,15 +45,18 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
[LibraryClasses]
PeimEntryPoint
DebugLib
PeiServicesLib
[Ppis]
gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED
gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_PRODUCED
gPeiReadonlyVariableThunkPresentPpiGuid
[Depex]
gEfiPeiReadOnlyVariable2PpiGuid