ARM: Add PSCI support
This patch contains the barebox implementation for the ARM
"Power State Coordination Interface" (PSCI).

The interface is aimed at the generalization of code in the following
power management scenarios:
* Core idle management.
* Dynamic addition and removal of cores, and secondary core boot.
* big.LITTLE migration.
* System shutdown and reset.

In practice, all that's currently implemented is a way to enable the
secondary core one some SoCs.

With PSCI the Kernel is either started in nonsecure or in Hypervisor
mode and PSCI is used to apply power to the secondary cores.

The start mode is passed in the global.bootm.secure_state variable. This
enum can contain "secure" (Kernel is started in secure mode, means no
PSCI), "nonsecure" (Kernel is started in nonsecure mode, PSCI available)
or "hyp" (Kernel is started in hyp mode, meaning it can support
virtualization).

We currently only support putting the secure monitor code into SDRAM,
which means we always steal some amount of memory from the Kernel.
To keep things simple for now we simply keep the whole barebox binary in
memory

The PSCI support has been tested on i.MX7 only so far. The only
supported operations are CPU_ON and CPU_OFF.

The PSCI and secure monitor code is based on the corresponding U-Boot
code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent cdf33e6 commit cc407b41135d4a427dfb09fb6e32b831e6c98a31
@Sascha Hauer Sascha Hauer authored on 6 Feb 2017
Showing 17 changed files
View
arch/arm/Kconfig
View
arch/arm/cpu/Makefile
View
arch/arm/cpu/psci.c 0 → 100644
View
arch/arm/cpu/sm.c 0 → 100644
View
arch/arm/cpu/sm_as.S 0 → 100644
View
arch/arm/include/asm/armlinux.h
View
arch/arm/include/asm/gic.h 0 → 100644
View
arch/arm/include/asm/psci.h 0 → 100644
View
arch/arm/include/asm/ptrace.h
View
arch/arm/include/asm/secure.h 0 → 100644
View
arch/arm/lib/bootm.c
View
arch/arm/lib/bootu.c
View
arch/arm/lib32/armlinux.c
View
arch/arm/lib32/barebox.lds.S
View
arch/arm/lib32/bootz.c
View
arch/arm/lib64/armlinux.c
View
arch/arm/mach-imx/imx7.c