On 24.06.2018 21:09, Stefan Agner wrote: > From: Stefan Agner <stefan.ag...@toradex.com> > > A proper stack is required to safely use C code in psci_arch_cpu_entry.
Patrick, I prefer to have your ack on this since you introduced psci_arch_cpu_entry. As far as I can tell STM32MP1 uses C code in psci_arch_cpu_entry. The same function in i.MX 7's PSCI implementation the compiler actually pushed stuff on the (uninitialized) stack, which caused the newly brought up CPU to immediately crash. Not sure if in your case the stack pointer is already setup by some other means or your compiler does not use the stack. In any case, I think it is better to just setup the stack properly as done in this patch... Stefano, I think we really want patch 2/3 applied before the release since it fixes i.MX 7 PSCI. Right now the implementation is really broken and not PSCI 1.0 conformant. But patch 2/3 require this patch to be applied... Not sure how we should handle this. -- Stefan > > Fixes: 486daaa618e1 ("arm: psci: add a weak function psci_arch_cpu_entry") > Cc: Patrick Delaunay <patrick.delau...@st.com> > Signed-off-by: Stefan Agner <stefan.ag...@toradex.com> > --- > > arch/arm/cpu/armv7/psci.S | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/cpu/armv7/psci.S b/arch/arm/cpu/armv7/psci.S > index 08b5088675..983cd90442 100644 > --- a/arch/arm/cpu/armv7/psci.S > +++ b/arch/arm/cpu/armv7/psci.S > @@ -331,6 +331,8 @@ ENTRY(psci_cpu_entry) > > bl _nonsec_init > > + bl psci_stack_setup > + > bl psci_arch_cpu_entry > > bl psci_get_cpu_id @ CPU ID => r0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot