/** @file\r
Reset Architectural Protocol implementation\r
\r
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2017, 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
#include "ResetSystem.h"\r
\r
-//\r
-// The handle onto which the Reset Architectural Protocol is installed\r
-//\r
-EFI_HANDLE mResetHandle = NULL;\r
-\r
/**\r
The driver's entry point.\r
\r
)\r
{\r
EFI_STATUS Status;\r
+ EFI_HANDLE Handle;\r
\r
//\r
// Make sure the Reset Architectural Protocol is not already installed in the system\r
//\r
// Now install the Reset RT AP on a new handle\r
//\r
+ Handle = NULL;\r
Status = gBS->InstallMultipleProtocolInterfaces (\r
- &mResetHandle,\r
+ &Handle,\r
&gEfiResetArchProtocolGuid,\r
NULL,\r
NULL\r
\r
@param[in] ResetType The type of reset to perform.\r
@param[in] ResetStatus The status code for the reset.\r
- @param[in] DataSize The size, in bytes, of WatchdogData.\r
+ @param[in] DataSize The size, in bytes, of ResetData.\r
@param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or\r
EfiResetShutdown the data buffer starts with a Null-terminated\r
string, optionally followed by additional binary data.\r
-\r
+ The string is a description that the caller may use to further\r
+ indicate the reason for the system reset. ResetData is only\r
+ valid if ResetStatus is something other than EFI_SUCCESS\r
+ unless the ResetType is EfiResetPlatformSpecific\r
+ where a minimum amount of ResetData is always required.\r
**/\r
VOID\r
EFIAPI\r
EFI_STATUS Status;\r
UINTN Size;\r
UINTN CapsuleDataPtr;\r
+ \r
+ //\r
+ // Indicate reset system runtime service is called.\r
+ //\r
+ REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_RS_PC_RESET_SYSTEM));\r
\r
switch (ResetType) {\r
case EfiResetWarm:\r
ResetShutdown ();\r
return ;\r
\r
+ case EfiResetPlatformSpecific:\r
+ ResetPlatformSpecific (DataSize, ResetData);\r
+ return;\r
+\r
default:\r
return ;\r
}\r