diff mbox

[edk2,09/21] ArmVirtPkg/VirtFdtDxe: drop detection of PSCI method

Message ID 1459959319-19293-10-git-send-email-ard.biesheuvel@linaro.org
State Superseded
Headers show

Commit Message

Ard Biesheuvel April 6, 2016, 4:15 p.m. UTC
The detection of the PSCI method has been moved to the EfiResetSystemLib
implementation, so drop the handling from VirtFdtDxe. Since no users
remain of gArmVirtTokenSpaceGuid.PcdArmPsciMethod, remove that as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirtPkg.dec            |  8 --------
 ArmVirtPkg/ArmVirtQemu.dsc           |  2 --
 ArmVirtPkg/ArmVirtQemuKernel.dsc     |  2 --
 ArmVirtPkg/ArmVirtXen.dsc            |  2 --
 ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c   | 19 +------------------
 ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf |  1 -
 6 files changed, 1 insertion(+), 33 deletions(-)

-- 
2.5.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec
index adbd5e319a09..73136adf62c6 100644
--- a/ArmVirtPkg/ArmVirtPkg.dec
+++ b/ArmVirtPkg/ArmVirtPkg.dec
@@ -60,14 +60,6 @@  [PcdsFixedAtBuild, PcdsPatchableInModule]
   gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x00000007
 
 [PcdsDynamic, PcdsFixedAtBuild]
-  #
-  # ARM PSCI function invocations can be done either through hypervisor
-  # calls (HVC) or secure monitor calls (SMC).
-  # PcdArmPsciMethod == 1 : use HVC
-  # PcdArmPsciMethod == 2 : use SMC
-  #
-  gArmVirtTokenSpaceGuid.PcdArmPsciMethod|0|UINT32|0x00000003
-
   gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0|UINT64|0x00000004
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0|UINT64|0x00000005
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0|UINT64|0x00000009
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 6dbd6571fbee..dac37c90f96b 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -221,8 +221,6 @@  [PcdsDynamicDefault.common]
   gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0
 
-  gArmVirtTokenSpaceGuid.PcdArmPsciMethod|0
-
   gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index c36de5cc4294..6d0946776f76 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -206,8 +206,6 @@  [PcdsDynamicDefault.common]
   gArmPlatformTokenSpaceGuid.PcdPciMmio32Size|0x0
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x0
 
-  gArmVirtTokenSpaceGuid.PcdArmPsciMethod|0
-
   gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress|0x0
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index 72bc4745309b..9cf51d5554ea 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -146,8 +146,6 @@  [PcdsDynamicDefault.common]
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress|0x0
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress|0x0
 
-  gArmVirtTokenSpaceGuid.PcdArmPsciMethod|0
-
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
 
 ################################################################################
diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
index 0e308497e79e..4a4713cf6ad8 100644
--- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
+++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.c
@@ -46,7 +46,6 @@  typedef enum {
   PropertyTypeVirtio,
   PropertyTypeUart,
   PropertyTypeTimer,
-  PropertyTypePsci,
   PropertyTypeFwCfg,
   PropertyTypePciHost,
   PropertyTypeXen,
@@ -63,7 +62,6 @@  STATIC CONST PROPERTY CompatibleProperties[] = {
   { PropertyTypeUart,    "arm,pl011"             },
   { PropertyTypeTimer,   "arm,armv7-timer"       },
   { PropertyTypeTimer,   "arm,armv8-timer"       },
-  { PropertyTypePsci,    "arm,psci-0.2"          },
   { PropertyTypeFwCfg,   "qemu,fw-cfg-mmio"      },
   { PropertyTypePciHost, "pci-host-ecam-generic" },
   { PropertyTypeXen,     "xen,xen"               },
@@ -292,7 +290,6 @@  InitializeVirtFdtDxe (
   UINT64                         RegBase;
   CONST INTERRUPT_PROPERTY       *InterruptProp;
   INT32                          SecIntrNum, IntrNum, VirtIntrNum, HypIntrNum;
-  CONST CHAR8                    *PsciMethod;
   UINT64                         FwCfgSelectorAddress;
   UINT64                         FwCfgSelectorSize;
   UINT64                         FwCfgDataAddress;
@@ -342,8 +339,7 @@  InitializeVirtFdtDxe (
     // TODO use #cells root properties instead
     //
     RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
-    ASSERT ((RegProp != NULL) || (PropType == PropertyTypeTimer) ||
-      (PropType == PropertyTypePsci));
+    ASSERT ((RegProp != NULL) || (PropType == PropertyTypeTimer));
 
     switch (PropType) {
     case PropertyTypePciHost:
@@ -479,19 +475,6 @@  InitializeVirtFdtDxe (
       PcdSet32 (PcdArmArchTimerHypIntrNum, HypIntrNum);
       break;
 
-    case PropertyTypePsci:
-      PsciMethod = fdt_getprop (DeviceTreeBase, Node, "method", &Len);
-
-      if (PsciMethod && AsciiStrnCmp (PsciMethod, "hvc", 3) == 0) {
-        PcdSet32 (PcdArmPsciMethod, 1);
-      } else if (PsciMethod && AsciiStrnCmp (PsciMethod, "smc", 3) == 0) {
-        PcdSet32 (PcdArmPsciMethod, 2);
-      } else {
-        DEBUG ((EFI_D_ERROR, "%a: Unknown PSCI method \"%a\"\n", __FUNCTION__,
-          PsciMethod));
-      }
-      break;
-
     case PropertyTypeXen:
       ASSERT (Len == 16);
 
diff --git a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
index 628b14501f45..5526fd19250e 100644
--- a/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
+++ b/ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
@@ -50,7 +50,6 @@  [Guids]
   gFdtHobGuid
 
 [Pcd]
-  gArmVirtTokenSpaceGuid.PcdArmPsciMethod
   gArmVirtTokenSpaceGuid.PcdFwCfgSelectorAddress
   gArmVirtTokenSpaceGuid.PcdFwCfgDataAddress
   gArmVirtTokenSpaceGuid.PcdFwCfgDmaAddress