Reviewed-by: Liming Gao <liming....@intel.com> -----Original Message----- From: Zeng, Star Sent: Monday, May 18, 2015 2:48 PM To: edk2-devel@lists.sourceforge.net Cc: Yao, Jiewen; Gao, Liming Subject: [PATCH 1/2] MdeModulePkg Variable: Prevent BS variable update in legacy OS runtime.
Cc: Jiewen Yao <jiewen....@intel.com> Cc: Liming Gao <liming....@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.z...@intel.com> --- .../Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c index 3a87298..0e0a7c5 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c @@ -997,6 +997,7 @@ VariableSmmRuntimeInitialize ( VOID *SmmVariableWriteRegistration; EFI_EVENT OnReadyToBootEvent; EFI_EVENT ExitBootServiceEvent; + EFI_EVENT LegacyBootEvent; EfiInitializeLock (&mVariableServicesLock, TPL_NOTIFY); @@ -1065,6 +1066,17 @@ VariableSmmRuntimeInitialize ( ); // + // 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. // gBS->CreateEventEx ( -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel