mirror of https://github.com/acidanthera/audk.git
MdeModulePkg Variable: Prevent BS variable update in legacy OS runtime.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17467 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
54ae9c08e8
commit
d3460bcbdc
|
@ -997,6 +997,7 @@ VariableSmmRuntimeInitialize (
|
||||||
VOID *SmmVariableWriteRegistration;
|
VOID *SmmVariableWriteRegistration;
|
||||||
EFI_EVENT OnReadyToBootEvent;
|
EFI_EVENT OnReadyToBootEvent;
|
||||||
EFI_EVENT ExitBootServiceEvent;
|
EFI_EVENT ExitBootServiceEvent;
|
||||||
|
EFI_EVENT LegacyBootEvent;
|
||||||
|
|
||||||
EfiInitializeLock (&mVariableServicesLock, TPL_NOTIFY);
|
EfiInitializeLock (&mVariableServicesLock, TPL_NOTIFY);
|
||||||
|
|
||||||
|
@ -1064,6 +1065,17 @@ VariableSmmRuntimeInitialize (
|
||||||
&ExitBootServiceEvent
|
&ExitBootServiceEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Register the event to inform SMM variable that it is at runtime for legacy boot.
|
||||||
|
// Reuse OnExitBootServices() here.
|
||||||
|
//
|
||||||
|
EfiCreateEventLegacyBootEx(
|
||||||
|
TPL_NOTIFY,
|
||||||
|
OnExitBootServices,
|
||||||
|
NULL,
|
||||||
|
&LegacyBootEvent
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Register the event to convert the pointer for runtime.
|
// Register the event to convert the pointer for runtime.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue