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>
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 { \
*/
#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)