/** @file\r
Reset Architectural and Reset Notification protocols implementation.\r
\r
- Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
It initializes the Reset Architectural Protocol.\r
\r
- @param[in] ImageHandle The firmware allocated handle for the EFI image. \r
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
@param[in] SystemTable A pointer to the EFI System Table.\r
- \r
+\r
@retval EFI_SUCCESS The entry point is executed successfully.\r
@retval other Cannot install ResetArch protocol.\r
\r
//\r
// Hook the runtime service table\r
//\r
- gRT->ResetSystem = ResetSystem;\r
+ gRT->ResetSystem = RuntimeServiceResetSystem;\r
\r
//\r
// Now install the Reset RT AP on a new handle\r
return Status;\r
}\r
\r
-/**\r
- Put the system into S3 power state. \r
-**/\r
-VOID\r
-DoS3 (\r
- VOID\r
- )\r
-{\r
- EnterS3WithImmediateWake ();\r
-\r
- //\r
- // Should not return\r
- //\r
- CpuDeadLoop ();\r
-}\r
-\r
/**\r
Resets the entire platform.\r
\r
**/\r
VOID\r
EFIAPI\r
-ResetSystem (\r
+RuntimeServiceResetSystem (\r
IN EFI_RESET_TYPE ResetType,\r
IN EFI_STATUS ResetStatus,\r
IN UINTN DataSize,\r
IN VOID *ResetData OPTIONAL\r
)\r
{\r
- EFI_STATUS Status;\r
- UINTN Size;\r
- UINTN CapsuleDataPtr;\r
LIST_ENTRY *Link;\r
RESET_NOTIFY_ENTRY *Entry;\r
\r
//\r
- // Only do REPORT_STATUS_CODE() on first call to ResetSystem()\r
+ // Only do REPORT_STATUS_CODE() on first call to RuntimeServiceResetSystem()\r
//\r
if (mResetNotifyDepth == 0) {\r
//\r
}\r
\r
mResetNotifyDepth++;\r
- DEBUG ((DEBUG_INFO, "DXE ResetSystem2: Reset call depth = %d.\n", mResetNotifyDepth));\r
+ DEBUG ((\r
+ DEBUG_INFO, "DXE ResetSystem2: ResetType %s, Call Depth = %d.\n",\r
+ mResetTypeStr[ResetType], mResetNotifyDepth\r
+ ));\r
\r
if (mResetNotifyDepth <= MAX_RESET_NOTIFY_DEPTH) {\r
if (!EfiAtRuntime ()) {\r
Entry->ResetNotify (ResetType, ResetStatus, DataSize, ResetData);\r
}\r
//\r
- // call reset notification functions registered through the \r
+ // call reset notification functions registered through the\r
// EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL.\r
//\r
for ( Link = GetFirstNode (&mPlatformSpecificResetHandler.ResetNotifies)\r
switch (ResetType) {\r
case EfiResetWarm:\r
\r
- //\r
- //Check if there are pending capsules to process\r
- //\r
- Size = sizeof (CapsuleDataPtr);\r
- Status = EfiGetVariable (\r
- EFI_CAPSULE_VARIABLE_NAME,\r
- &gEfiCapsuleVendorGuid,\r
- NULL,\r
- &Size,\r
- (VOID *) &CapsuleDataPtr\r
- );\r
-\r
- if (Status == EFI_SUCCESS) {\r
- //\r
- //Process capsules across a system reset.\r
- //\r
- DoS3();\r
- }\r
-\r
ResetWarm ();\r
break;\r
\r