On Tue, Sep 2, 2014 at 8:56 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 1 September 2014 23:41, Peter Crosthwaite > <peter.crosthwa...@xilinx.com> wrote: >> On Tue, Sep 2, 2014 at 3:15 AM, Peter Maydell <peter.mayd...@linaro.org> >> wrote: >>> On 19 August 2014 01:54, Peter Crosthwaite <peter.crosthwa...@xilinx.com> >>> wrote: >>>> Linux should boot in EL2 or EL1. If in EL3, jump down before handing >>>> off to Linux. >>>> >>>> Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> >>> >>> The other way we could do this would be to have the >>> do_cpu_reset() hook put the CPU into EL2 or EL1 before >>> starting the boot code. (This would be in line with how it >>> would work for KVM). >>> >> >> Tried that at first, and the problem we found was it introduced a >> reset order dep. The arm-boot and CPU race on who sets the EL. > > Surely there's already a reset order dependency, because > both the arm-boot reset hook and CPU reset proper want > to initialise the PC ? >
Yes. I had a PC specific solution to this though when it became a problem. I have another series that made the reset ordering a little less predictable (specifically implementation of CPU reset GPIOs). So i'm trying to reduce the footprint of this issue as much as possible. Regards, Peter >>> Have you thought about how this would work for >>> secondary CPUs (which boot via PSCI poweron)? > >> Not yet although I expect something similar. > > Hmm. I guess PSCI poweron won't even go through > the boot.c code, thinking a bit more about it. I need to > look at the TCG PSCI patches too. > > -- PMM >