mirror of https://github.com/acidanthera/audk.git
As variable area is not reliable in recovery path, then we should not produce ReadonlyVariable2 ppi at the point. This way causes other Pei module wanted to access to variable will fail
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7183 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
54656366f9
commit
721dfef39e
|
@ -53,9 +53,21 @@ PeimInitializeVariableServices (
|
||||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_BOOT_MODE BootMode;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Publish the variable capability to other modules
|
// Check if this is recovery boot path. If no, publish the variable access capability
|
||||||
|
// to other modules. If yes, the content of variable area is not reliable. Therefore,
|
||||||
|
// in this case we should not provide variable service to other pei modules.
|
||||||
//
|
//
|
||||||
|
Status = (*PeiServices)->GetBootMode (PeiServices, &BootMode);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
if (BootMode == BOOT_IN_RECOVERY_MODE) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
return PeiServicesInstallPpi (&mPpiListVariable);
|
return PeiServicesInstallPpi (&mPpiListVariable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue