]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
Clean up PSCI function IDs
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Fri, 22 Apr 2016 12:51:48 +0000 (13:51 +0100)
committerMark Rutland <mark.rutland@arm.com>
Tue, 14 Jun 2016 16:48:39 +0000 (17:48 +0100)
The boot-wrapper allows to boot secondary CPUs through a PSCI interface.
This implementation is incomplete, and only understands two SMC calls,
CPU_ON and CPU_OFF. Since PSCI versions >=0.2 require to implement a few
more functions (VERSION, SUSPEND, SYSTEM_OFF...), we implement PSCI 0.1,
which doesn't specify what SMC numbers to use. An implementation needs
to advertise its SMC numbers to the kernel through device-tree nodes.

Our current SMC numbers are inconsistent with the rest of the world:

                 |  B-W (0.1)   | U-boot (0.1) |     v0.2
  ---------------+--------------+--------------+--------------
         CPU_OFF |  0x84000001  |  0x95c1ba5f  |  0x84000002
  64-bit CPU_ON  |  0x84000002  |  0x95c1ba60  |  0xc4000003

This is a problem when testing systems like Jailhouse, that currently
don't read the device-tree but hard-code PSCI IDs. To align with the
rest of the world, switch to PSCI 0.2 IDs.

Note: this patch does *not* add PSCI 0.2 compatibility to the
boot-wrapper. We still advertise as 0.1.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Makefile.am
psci.S

index 0c174e6c86e0a4837b8241df8f49d127a1fa3b1a..4f5bfddab23e9f8e8bd395f69a7e78094a338483 100644 (file)
@@ -25,8 +25,8 @@ BOOTMETHOD    := psci.o
 PSCI_NODE      := psci {                               \
                        compatible = \"arm,psci\";      \
                        method = \"smc\";               \
-                       cpu_on = <0x84000002>;          \
-                       cpu_off = <0x84000001>;         \
+                       cpu_on = <0xc4000003>;          \
+                       cpu_off = <0x84000002>;         \
                   };
 CPU_NODES      := $(shell $(top_srcdir)/gen-cpu-nodes.sh $(CPU_IDS))
 CPUS_NODE      := cpus {               \
diff --git a/psci.S b/psci.S
index 856095ba3eda333f96ffe3e41be27b6ff13963c1..8ad838ced9f0bd46868560d9c2410e14330cf918 100644 (file)
--- a/psci.S
+++ b/psci.S
@@ -8,8 +8,8 @@
  */
 #include "common.S"
 
-#define PSCI_CPU_OFF           0x84000001
-#define PSCI_CPU_ON            0x84000002
+#define PSCI_CPU_OFF           0x84000002
+#define PSCI_CPU_ON            0xc4000003
 
 #define PSCI_RET_SUCCESS       0
 #define PSCI_RET_NOT_IMPL      (-1)