SecurityPkg 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@17468 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Star Zeng 2015-05-19 01:33:25 +00:00 committed by lzeng14
parent d3460bcbdc
commit c7b897519e
1 changed files with 12 additions and 0 deletions

View File

@ -1019,6 +1019,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);
@ -1086,6 +1087,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.
// //