diff options
author | Star Zeng <star.zeng@intel.com> | 2015-06-11 10:24:36 +0000 |
---|---|---|
committer | lzeng14 <lzeng14@Edk2> | 2015-06-11 10:24:36 +0000 |
commit | aa2868b3f142b8c5a5c55626696ff985ed55c3b0 (patch) | |
tree | aa9f1b6460a00954f272c18efc7e19a6bbda0ae2 /MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | |
parent | fe9dfae5149af20c08127fb5849dbb0ae44c71ae (diff) | |
download | edk2-platforms-aa2868b3f142b8c5a5c55626696ff985ed55c3b0.tar.xz |
MdeModulePkg Variable: Move VariableLock install into SmmVariableReady().
VariableLock in VariableSmmRuntimeDxe.c is installed in EntryPoint now.
It works based on SMM variable handler by SMM communication with
payload buffer. But the payload buffer and SMM variable handler will
be not ready in EntryPoint before SmmVariableReady() call back.
VarCheck in VariableSmmRuntimeDxe.c has the same issue,
so move VarCheck install into SmmVariableReady() also.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17626 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c index 0e0a7c5c3b..30fb5df6c0 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c @@ -935,6 +935,26 @@ SmmVariableReady ( NULL
);
ASSERT_EFI_ERROR (Status);
+
+ mVariableLock.RequestToLock = VariableLockRequestToLock;
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &mHandle,
+ &gEdkiiVariableLockProtocolGuid,
+ &mVariableLock,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ mVarCheck.RegisterSetVariableCheckHandler = VarCheckRegisterSetVariableCheckHandler;
+ mVarCheck.VariablePropertySet = VarCheckVariablePropertySet;
+ mVarCheck.VariablePropertyGet = VarCheckVariablePropertyGet;
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &mHandle,
+ &gEdkiiVarCheckProtocolGuid,
+ &mVarCheck,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
}
@@ -992,7 +1012,6 @@ VariableSmmRuntimeInitialize ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
VOID *SmmVariableRegistration;
VOID *SmmVariableWriteRegistration;
EFI_EVENT OnReadyToBootEvent;
@@ -1001,26 +1020,6 @@ VariableSmmRuntimeInitialize ( EfiInitializeLock (&mVariableServicesLock, TPL_NOTIFY);
- mVariableLock.RequestToLock = VariableLockRequestToLock;
- Status = gBS->InstallMultipleProtocolInterfaces (
- &mHandle,
- &gEdkiiVariableLockProtocolGuid,
- &mVariableLock,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
- mVarCheck.RegisterSetVariableCheckHandler = VarCheckRegisterSetVariableCheckHandler;
- mVarCheck.VariablePropertySet = VarCheckVariablePropertySet;
- mVarCheck.VariablePropertyGet = VarCheckVariablePropertyGet;
- Status = gBS->InstallMultipleProtocolInterfaces (
- &mHandle,
- &gEdkiiVarCheckProtocolGuid,
- &mVarCheck,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
//
// Smm variable service is ready
//
|