VOID *SmmVariableWriteRegistration;\r
EFI_EVENT OnReadyToBootEvent;\r
EFI_EVENT ExitBootServiceEvent;\r
+ EFI_EVENT LegacyBootEvent;\r
\r
EfiInitializeLock (&mVariableServicesLock, TPL_NOTIFY);\r
\r
&ExitBootServiceEvent\r
); \r
\r
+ //\r
+ // Register the event to inform SMM variable that it is at runtime for legacy boot.\r
+ // Reuse OnExitBootServices() here.\r
+ //\r
+ EfiCreateEventLegacyBootEx(\r
+ TPL_NOTIFY,\r
+ OnExitBootServices,\r
+ NULL,\r
+ &LegacyBootEvent\r
+ );\r
+\r
//\r
// Register the event to convert the pointer for runtime.\r
//\r