[U-Boot] [PATCH 0/9] ARMv7: add PSCI support to u-boot

Andre Przywara andre.przywara at linaro.org
Fri Dec 6 12:43:43 CET 2013


On 11/21/2013 09:59 AM, Marc Zyngier wrote:
> PSCI is an ARM standard that provides a generic interface that
> ...

Thanks again for posting this, I like the idea of adding PSCI handlers 
to u-boot for several platforms very much.

> This patch series contains 3 parts:
> - the first four patches are just bug fixes

Those are fine, I already acked those patches.

> - the next three contain the generic PSCI code and build infrastructure

As I heard you will rework these anyway, I will refrain from commenting 
in detail, just some generic comments on the approach:

* Is the creation of a top-level psci directory for holding the PSCI 
binaries really necessary? Should this mimic the spl approach?
Can you consider to move this at least into the arch/arm directory, as 
PSCI is ARM specific? Or add it to the SPL directory, as this serves a 
similar purpose? But maybe your new approach renders this all moot.

* Can you keep the SMP bringup code in place and re-use it from the PSCI 
handlers instead of "#ifndef PSCI"ing it? So maybe rename 
arch/arm/cpu/armv7/sunxi/psci.S to .../sunxi/smp.S?
My idea here is to make PSCI an option in addition to the current SMP 
HYP mode code. So that for instance on VExpress (or better: Arndale) you 
could either use the existing code using the kernel's platform SMP code 
or enable PSCI in u-boot and let the kernel use that, too.
I maybe ask too much for the first incarnation of the code, but that is 
how I would like to eventually see it. AFAIK Linux prefers PSCI over 
platform-defined SMP code, so this should work out of the box.

* Is the use of TPIDRPRW & Co. really safe? It looks like as we seem to 
be the only secure user (and they are banked), but I am just curious 
whether there is any "prior art" in using those registers temporarily.

> ...
> The kernel now boots in HYP mode, finds its secondary CPU without any
> additional SMP code, and runs KVM out of the box. Hopefully, the
> Xen/ARM guys can do the same fairly easily.

BTW: Yesterday my PSCI host patches for Xen have been committed, so Xen 
should be able to use that feature just like the kernel does.

Thanks!
Andre.



More information about the U-Boot mailing list