summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c')
-rw-r--r--ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
index 286d37fb4..df4e113c0 100644
--- a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
+++ b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c
@@ -1,8 +1,12 @@
/** @file
Support ResetSystem Runtime call using PSCI calls
+ Note: A similar library is implemented in
+ ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPsciResetSystemLib
+ So similar issues might exist in this implementation too.
+
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
- Copyright (c) 2013, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
This program and the accompanying materials
@@ -21,22 +25,9 @@
#include <Library/DebugLib.h>
#include <Library/EfiResetSystemLib.h>
#include <Library/ArmSmcLib.h>
-#include <Library/ArmHvcLib.h>
#include <IndustryStandard/ArmStdSmc.h>
-STATIC UINT32 mArmPsciMethod;
-
-RETURN_STATUS
-EFIAPI
-ArmPsciResetSystemLibConstructor (
- VOID
- )
-{
- mArmPsciMethod = PcdGet32 (PcdArmPsciMethod);
- return RETURN_SUCCESS;
-}
-
/**
Resets the entire platform.
@@ -58,10 +49,8 @@ LibResetSystem (
)
{
ARM_SMC_ARGS ArmSmcArgs;
- ARM_HVC_ARGS ArmHvcArgs;
switch (ResetType) {
-
case EfiResetPlatformSpecific:
// Map the platform specific reset as reboot
case EfiResetWarm:
@@ -69,31 +58,17 @@ LibResetSystem (
case EfiResetCold:
// Send a PSCI 0.2 SYSTEM_RESET command
ArmSmcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_RESET;
- ArmHvcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_RESET;
break;
case EfiResetShutdown:
// Send a PSCI 0.2 SYSTEM_OFF command
ArmSmcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_OFF;
- ArmHvcArgs.Arg0 = ARM_SMC_ID_PSCI_SYSTEM_OFF;
break;
default:
ASSERT (FALSE);
return EFI_UNSUPPORTED;
}
- switch (mArmPsciMethod) {
- case 1:
- ArmCallHvc (&ArmHvcArgs);
- break;
-
- case 2:
- ArmCallSmc (&ArmSmcArgs);
- break;
-
- default:
- DEBUG ((EFI_D_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));
- return EFI_UNSUPPORTED;
- }
+ ArmCallSmc (&ArmSmcArgs);
// We should never be here
DEBUG ((EFI_D_ERROR, "%a: PSCI Reset failed\n", __FUNCTION__));