diff options
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r-- | ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c | 37 | ||||
-rw-r--r-- | ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf | 6 |
2 files changed, 7 insertions, 36 deletions
diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c index 286d37f..df4e113 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__));
diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf index 1a5bb6d..9cdde1f 100644 --- a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf +++ b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf @@ -3,6 +3,7 @@ #
# Copyright (c) 2008, Apple Inc. All rights reserved.<BR>
# Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
+# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -21,7 +22,6 @@ MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = EfiResetSystemLib
- CONSTRUCTOR = ArmPsciResetSystemLibConstructor
[Sources]
ArmPsciResetSystemLib.c
@@ -35,7 +35,3 @@ DebugLib
BaseLib
ArmSmcLib
- ArmHvcLib
-
-[Pcd]
- gArmTokenSpaceGuid.PcdArmPsciMethod
|