diff options
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r-- | ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c | 14 | ||||
-rw-r--r-- | ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c index 48c8735a22..286d37fb47 100644 --- a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c +++ b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c @@ -25,6 +25,18 @@ #include <IndustryStandard/ArmStdSmc.h>
+STATIC UINT32 mArmPsciMethod;
+
+RETURN_STATUS
+EFIAPI
+ArmPsciResetSystemLibConstructor (
+ VOID
+ )
+{
+ mArmPsciMethod = PcdGet32 (PcdArmPsciMethod);
+ return RETURN_SUCCESS;
+}
+
/**
Resets the entire platform.
@@ -69,7 +81,7 @@ LibResetSystem ( return EFI_UNSUPPORTED;
}
- switch (PcdGet32 (PcdArmPsciMethod)) {
+ switch (mArmPsciMethod) {
case 1:
ArmCallHvc (&ArmHvcArgs);
break;
diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf index bcea0aeb31..1a5bb6d10d 100644 --- a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf +++ b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.inf @@ -21,6 +21,7 @@ MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = EfiResetSystemLib
+ CONSTRUCTOR = ArmPsciResetSystemLibConstructor
[Sources]
ArmPsciResetSystemLib.c
|