diff options
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2016-04-22 13:51:48 +0100 |
---|---|---|
committer | Mark Rutland <mark.rutland@arm.com> | 2016-06-14 17:48:39 +0100 |
commit | 988b01a8eabdee19866a472a7b290a2b5ac1e3e3 (patch) | |
tree | 418f6b8b0d841afd16233faaedd32fa63fe8d3d2 | |
parent | 26a17ad59544f026878efdb0524ce66b7a314784 (diff) | |
download | boot-wrapper-aarch64-988b01a8eabdee19866a472a7b290a2b5ac1e3e3.tar.gz |
Clean up PSCI function IDs
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>
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | psci.S | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 0c174e6..4f5bfdd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 { \ @@ -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) |