{\r
EFI_STATUS Status;\r
EFI_HANDLE SmmHandle;\r
- EFI_SMM_SX_DISPATCH2_PROTOCOL *SxDispatch;\r
- EFI_SMM_SX_REGISTER_CONTEXT EntryRegisterContext;\r
- EFI_HANDLE S3EntryHandle;\r
\r
//\r
// Install SMM Ready To Boot protocol.\r
\r
SmiHandlerUnRegister (DispatchHandle);\r
\r
- //\r
- // Locate SmmSxDispatch2 protocol.\r
- //\r
- Status = SmmLocateProtocol (\r
- &gEfiSmmSxDispatch2ProtocolGuid,\r
- NULL,\r
- (VOID **)&SxDispatch\r
- );\r
- if (!EFI_ERROR (Status) && (SxDispatch != NULL)) {\r
- //\r
- // Register a S3 entry callback function to\r
- // determine if it will be during S3 resume.\r
- //\r
- EntryRegisterContext.Type = SxS3;\r
- EntryRegisterContext.Phase = SxEntry;\r
- Status = SxDispatch->Register (\r
- SxDispatch,\r
- SmmS3EntryCallBack,\r
- &EntryRegisterContext,\r
- &S3EntryHandle\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
- }\r
-\r
- return EFI_SUCCESS;\r
+ return Status;\r
}\r
\r
/**\r
IN OUT UINTN *CommBufferSize OPTIONAL\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_HANDLE SmmHandle;\r
+ EFI_STATUS Status;\r
+ EFI_HANDLE SmmHandle;\r
+ EFI_SMM_SX_DISPATCH2_PROTOCOL *SxDispatch;\r
+ EFI_SMM_SX_REGISTER_CONTEXT EntryRegisterContext;\r
+ EFI_HANDLE S3EntryHandle;\r
\r
DEBUG ((EFI_D_INFO, "SmmEndOfDxeHandler\n"));\r
+\r
//\r
// Install SMM EndOfDxe protocol\r
//\r
EFI_NATIVE_INTERFACE,\r
NULL\r
);\r
- return Status;\r
+\r
+ //\r
+ // Locate SmmSxDispatch2 protocol.\r
+ //\r
+ Status = SmmLocateProtocol (\r
+ &gEfiSmmSxDispatch2ProtocolGuid,\r
+ NULL,\r
+ (VOID **)&SxDispatch\r
+ );\r
+ if (!EFI_ERROR (Status) && (SxDispatch != NULL)) {\r
+ //\r
+ // Register a S3 entry callback function to\r
+ // determine if it will be during S3 resume.\r
+ //\r
+ EntryRegisterContext.Type = SxS3;\r
+ EntryRegisterContext.Phase = SxEntry;\r
+ Status = SxDispatch->Register (\r
+ SxDispatch,\r
+ SmmS3EntryCallBack,\r
+ &EntryRegisterContext,\r
+ &S3EntryHandle\r
+ );\r
+ ASSERT_EFI_ERROR (Status);\r
+ }\r
+\r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r
ASSERT_EFI_ERROR (Status);\r
\r
mDuringS3Resume = FALSE;\r
-\r
return Status;\r
}\r
\r