/** @file\r
Support ResetSystem Runtime call using PSCI calls\r
\r
+ Note: A similar library is implemented in\r
+ ArmVirtPkg/Library/ArmVirtualizationPsciResetSystemLib\r
+ So similar issues might exist in this implementation too.\r
+\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- Copyright (c) 2013, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>\r
Copyright (c) 2014, Linaro Ltd. 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
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
#include <Library/DebugLib.h>\r
#include <Library/EfiResetSystemLib.h>\r
#include <Library/ArmSmcLib.h>\r
-#include <Library/ArmHvcLib.h>\r
\r
#include <IndustryStandard/ArmStdSmc.h>\r
\r
)\r
{\r
ARM_SMC_ARGS ArmSmcArgs;\r
- ARM_HVC_ARGS ArmHvcArgs;\r
\r
switch (ResetType) {\r
-\r
case EfiResetPlatformSpecific:\r
// Map the platform specific reset as reboot\r
case EfiResetWarm:\r
case EfiResetCold:\r
// Send a PSCI 0.2 SYSTEM_RESET command\r
ArmSmcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_RESET;\r
- ArmHvcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_RESET;\r
break;\r
case EfiResetShutdown:\r
// Send a PSCI 0.2 SYSTEM_OFF command\r
ArmSmcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_OFF;\r
- ArmHvcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_OFF;\r
break;\r
default:\r
ASSERT (FALSE);\r
return EFI_UNSUPPORTED;\r
}\r
\r
- switch (PcdGet32 (PcdArmPsciMethod)) {\r
- case 1:\r
- ArmCallHvc (&ArmHvcArgs);\r
- break;\r
-\r
- case 2:\r
- ArmCallSmc (&ArmSmcArgs);\r
- break;\r
-\r
- default:\r
- DEBUG ((EFI_D_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));\r
- return EFI_UNSUPPORTED;\r
- }\r
+ ArmCallSmc (&ArmSmcArgs);\r
\r
// We should never be here\r
DEBUG ((EFI_D_ERROR, "%a: PSCI Reset failed\n", __FUNCTION__));\r