public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 00/10] ARMv7: add PSCI support to U-Boot
@ 2014-04-26 12:17 Marc Zyngier
  2014-04-26 12:17 ` [U-Boot] [PATCH v4 01/10] ARM: HYP/non-sec: move switch to non-sec to the last boot phase Marc Zyngier
                   ` (13 more replies)
  0 siblings, 14 replies; 34+ messages in thread
From: Marc Zyngier @ 2014-04-26 12:17 UTC (permalink / raw)
  To: u-boot

PSCI is an ARM standard that provides a generic interface that
supervisory software can use to manage power in the following
situations:
- Core idle management
- CPU hotplug
- big.LITTLE migration models
- System shutdown and reset

It basically allows the kernel to offload these tasks to the firmware,
and rely on common kernel side code that just calls into PSCI.

More importantly, it gives a way to ensure that CPUs enter the kernel
at the appropriate exception level (ie HYP mode, to allow the use of
the virtualization extensions), even across events like CPUs being
powered off/on or suspended.

The main idea here is to turn some of the existing U-Boot code into a
separate section that can live in secure RAM (or a reserved page of
memory), containing a secure monitor that will implement the PSCI
operations. This code will still be alive when U-Boot is long gone,
hence the need for a piece of memory that will not be touched by the
OS.

This patch series contains 3 parts:
- the first four patches are just bug fixes
- the next two refactor the HYP/non-secure code to allow relocation
  in secure memory
- the last four contain the generic PSCI code and DT infrastructure

This implements the original 0.1 spec, as nobody implements the new
0.2 version so far. I plan to update this support to 0.2 once there is
an official binding available (and support in the kernel).

Most of the development has been done on an Allwinner A20 SoC, which
is the main user of this code at the moment. I hope new SoCs will be
using this method in the future (my primary goal for this series being
to avoid more stupid SMP code from creeping up in the Linux
kernel). As instructed, I've removed the A20 support code and made it
a separate series, as there is now an effort to mainline this code
(see Ian Campbell patch series).

With these three series applied, the A20 now boots in HYP mode, Linux
finds the secondary CPU without any SMP code present in the kernel,
and runs KVM out of the box. The Xen/ARM guys managed to do the same
fairly easily, as did at least one XVizor user.

This code has also been tested on a VExpress TC2, running KVM with all
5 CPUs, in order to make sure there was no obvious regression.

The code is also available at:
git://git.kernel.org/pub/scm/linux/kernel/git/maz/u-boot.git wip/psci-v4

A fully merged branch with the A20 support is in the wip/psci-v4-a20
branch of the same repo.

Cheers,

        M.

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2014-06-10  9:11 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-26 12:17 [U-Boot] [PATCH v4 00/10] ARMv7: add PSCI support to U-Boot Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 01/10] ARM: HYP/non-sec: move switch to non-sec to the last boot phase Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 02/10] ARM: HYP/non-sec: add a barrier after setting SCR.NS==1 Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 03/10] ARM: non-sec: reset CNTVOFF to zero Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 04/10] ARM: add missing HYP mode constant Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 05/10] ARM: HYP/non-sec: add separate section for secure code Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 06/10] ARM: HYP/non-sec: allow relocation to secure RAM Marc Zyngier
2014-05-02 20:30   ` Jon Loeliger
2014-05-02 21:03     ` Jon Loeliger
2014-05-07  7:05       ` Marc Zyngier
2014-05-07 14:28         ` Jon Loeliger
2014-05-07  6:51     ` Marc Zyngier
2014-05-07 14:30       ` Jon Loeliger
2014-06-09 19:06   ` Albert ARIBAUD
2014-04-26 12:17 ` [U-Boot] [PATCH v4 07/10] ARM: HYP/non-sec: add generic ARMv7 PSCI code Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 08/10] ARM: HYP/non-sec: add the option for a second-stage monitor Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 09/10] ARM: convert arch_fixup_memory_node to a generic FDT fixup function Marc Zyngier
2014-04-26 12:17 ` [U-Boot] [PATCH v4 10/10] ARM: HYP/non-sec/PSCI: emit DT nodes Marc Zyngier
2014-04-26 17:34   ` [U-Boot] DA850EVM with USE_NAND config does not pad the AIS file Tom Taylor
2014-05-05 13:09     ` Tom Rini
2014-05-02 20:13   ` [U-Boot] [PATCH v4 10/10] ARM: HYP/non-sec/PSCI: emit DT nodes Jon Loeliger
2014-05-07  6:38     ` Marc Zyngier
2014-04-26 14:24 ` [U-Boot] [PATCH v4 00/10] ARMv7: add PSCI support to U-Boot Dennis Gilmore
2014-04-26 16:31   ` Marc Zyngier
2014-04-26 21:34     ` Dennis Gilmore
2014-05-05 14:34 ` Jon Loeliger
2014-05-07  7:08   ` Marc Zyngier
2014-05-25 14:08 ` Albert ARIBAUD
2014-06-08  7:57   ` Albert ARIBAUD
2014-06-09  8:12     ` Marc Zyngier
2014-06-09  9:34       ` Albert ARIBAUD
2014-06-10  8:36 ` Albert ARIBAUD
2014-06-10  9:06   ` [U-Boot] [PATCH v4 00/10] ARMv7: add PSCI support to U-Boot - *not* applied Albert ARIBAUD
2014-06-10  9:11     ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox