]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
ArmPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPkg / Library / ArmPsciResetSystemLib / ArmPsciResetSystemLib.c
index 48c8735a227091e575a2ee70088e3ec51f1cc4a2..0a7c0c4c514094dab842e889834f1d25e0a7169d 100644 (file)
@@ -1,17 +1,15 @@
 /** @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
@@ -21,7 +19,6 @@
 #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
@@ -46,10 +43,8 @@ LibResetSystem (
   )\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
@@ -57,31 +52,17 @@ LibResetSystem (
   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