[U-Boot] [PATCH v2 00/13] ARMv7: add PSCI support to u-boot
Albert ARIBAUD
albert.u.boot at aribaud.net
Thu Feb 13 11:11:30 CET 2014
Hi Marc,
On Sat, 7 Dec 2013 11:19:05 +0000, Marc Zyngier <marc.zyngier at arm.com>
wrote:
> 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.
>
> 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 4 parts:
> - the first four patches are just bug fixes
> - the next three refactor the HYP/non-secure code to allow relocation
> in secure memory
> - the next three contain the generic PSCI code and DT infrastructure
> - the last three implement the CPU_ON method of the Allwinner A20 (aka sun7i).
>
> I realize the A20 u-boot code is not upstream yet (BTW is anyone
> actively working on that?), but hopefully that should give a good idea
> of how things are structured so far. The patches are against the sunxi
> u-boot tree as of today, and the first 10 patches will directly apply
> to mainline u-boot.
>
> As for using this code, it goes like this:
> sun7i# ext2load mmc 0:1 0x40008000 zImage ; ext2load mmc 0:1 0x60000000 sun7i-a20-cubietruck.dtb
> 2270120 bytes read in 117 ms (18.5 MiB/s)
> 9138 bytes read in 3 ms (2.9 MiB/s)
> sun7i# fdt addr 0x60000000 ; fdt resize ; fdt set ethernet0 mac-address "[5a fe b0 07 b0 07]"
> sun7i# setenv bootargs console=ttyS0,115200 earlyprintk ip=dhcp root=/dev/nfs nfsroot=/backup/a20_root,tcp
> sun7i# bootz 0x40008000 - 0x60000000
>
> The kernel now boots in HYP mode, finds its secondary CPU without any
> SMP code present in the kernel, and runs KVM out of the box.
> Hopefully, the Xen/ARM guys can do the same fairly easily.
>
> 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.
>
> I'm wildly cross-posting this patch series, including to lists I'm not
> subscribed to. Please keep me on Cc for any comment you may have.
>
> Cheers,
>
> M.
There are comments re 01/13 an 07/13. Should I expect a V3 on the
U-Boot ML?
Amicalement,
--
Albert.
More information about the U-Boot
mailing list