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. 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. 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 # 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. # 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. # 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> Copyright (c) 2006 - 2008 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
@ -23,7 +25,9 @@ Module Name:
#include <PiPei.h> #include <PiPei.h>
#include <Ppi/ReadOnlyVariable.h> #include <Ppi/ReadOnlyVariable.h>
#include <Ppi/ReadOnlyVariable2.h> #include <Ppi/ReadOnlyVariable2.h>
#include <Ppi/ReadOnlyVariableThunkPresent.h>
#include <Library/DebugLib.h> #include <Library/DebugLib.h>
#include <Library/PeiServicesLib.h>
// //
// Function Prototypes // 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 // 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: # 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. # 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. # 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 # Copyright (c) 2006 - 2007, Intel Corporation
# #
@ -43,15 +45,18 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec IntelFrameworkPkg/IntelFrameworkPkg.dec
[LibraryClasses] [LibraryClasses]
PeimEntryPoint PeimEntryPoint
DebugLib DebugLib
PeiServicesLib
[Ppis] [Ppis]
gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED
gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_PRODUCED gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_PRODUCED
gPeiReadonlyVariableThunkPresentPpiGuid
[Depex] [Depex]
gEfiPeiReadOnlyVariable2PpiGuid gEfiPeiReadOnlyVariable2PpiGuid