install mReadOnlyVariableThunkPresent PPI to insure that only one ReadOnlyVariable thunk driver can be present in the platform.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5337 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-06-10 07:21:00 +00:00
parent 185be2e02b
commit f21c37708d
2 changed files with 14 additions and 2 deletions

View File

@ -73,7 +73,7 @@ EFI_PEI_PPI_DESCRIPTOR mReadOnlyVariableThunkPresent = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gPeiReadonlyVariableThunkPresentPpiGuid, &gPeiReadonlyVariableThunkPresentPpiGuid,
NULL NULL
}; };
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
@ -109,7 +109,9 @@ Returns:
Status = PeiServicesLocatePpi (&gPeiReadonlyVariableThunkPresentPpiGuid, 0, NULL, &Interface); Status = PeiServicesLocatePpi (&gPeiReadonlyVariableThunkPresentPpiGuid, 0, NULL, &Interface);
ASSERT (Status == EFI_NOT_FOUND); ASSERT (Status == EFI_NOT_FOUND);
PeiServicesInstallPpi (&mReadOnlyVariableThunkPresent); Status = PeiServicesInstallPpi (&mReadOnlyVariableThunkPresent);
ASSERT_EFI_ERROR (Status);
// //
// Publish the variable capability to other modules // Publish the variable capability to other modules
// //

View File

@ -66,6 +66,13 @@ EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = {
&mVariablePpi &mVariablePpi
}; };
EFI_PEI_PPI_DESCRIPTOR mReadOnlyVariableThunkPresent = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gPeiReadonlyVariableThunkPresentPpiGuid,
NULL
};
/** /**
Standard entry point of a PEIM. Standard entry point of a PEIM.
@ -92,6 +99,9 @@ PeimInitializeReadOnlyVariable (
Status = PeiServicesLocatePpi (&gPeiReadonlyVariableThunkPresentPpiGuid, 0, NULL, &Interface); Status = PeiServicesLocatePpi (&gPeiReadonlyVariableThunkPresentPpiGuid, 0, NULL, &Interface);
ASSERT (Status == EFI_NOT_FOUND); ASSERT (Status == EFI_NOT_FOUND);
Status = PeiServicesInstallPpi (&mReadOnlyVariableThunkPresent);
ASSERT_EFI_ERROR (Status);
// //
// Publish the variable capability to other modules // Publish the variable capability to other modules
// //