[U-Boot] [PATCH V2 2/3] mx7: psci: add basic psci support

Li Frank Frank.Li at freescale.com
Tue Oct 20 16:29:46 CEST 2015



> -----Original Message-----
> From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
> Sent: Tuesday, October 20, 2015 9:25 AM
> To: Li Frank-B20596 <Frank.Li at freescale.com>
> Cc: Fan Peng-B51431 <Peng.Fan at freescale.com>; u-boot at lists.denx.de;
> Estevam Fabio-R49496 <Fabio.Estevam at freescale.com>
> Subject: Re: [U-Boot] [PATCH V2 2/3] mx7: psci: add basic psci support
> 
> Hello Li,
> 
> On Tue, 20 Oct 2015 14:05:45 +0000, Li Frank <Frank.Li at freescale.com>
> wrote:
> >
> >
> > > -----Original Message-----
> > > From: Peng Fan [mailto:Peng.Fan at freescale.com]
> > > Sent: Tuesday, October 20, 2015 1:00 AM
> > > To: u-boot at lists.denx.de
> > > Cc: Fan Peng-B51431 <Peng.Fan at freescale.com>; Li Frank-B20596
> > > <Frank.Li at freescale.com>; Stefano Babic <sbabic at denx.de>; Estevam
> > > Fabio-
> > > R49496 <Fabio.Estevam at freescale.com>
> > > Subject: [PATCH V2 2/3] mx7: psci: add basic psci support
> > >
> > > 1. add basic psci support for imx7 chip.
> > > 2. support cpu_on and cpu_off.
> > > 3. switch to non-secure mode when boot linux kernel.
> > > 4. set csu allow accessing all peripherial register in non-secure mode.
> > >
> > > Signed-off-by: Frank Li <Frank.Li at freescale.com>
> > > Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
> > > Cc: Stefano Babic <sbabic at denx.de>
> > > Cc: Fabio Estevam <fabio.estevam at freescale.com>
> > > ---
> > >
> > > Changes V2:
> > >  Refine commit msg.
> > >
> > >  arch/arm/cpu/armv7/mx7/Makefile   |  4 ++
> > >  arch/arm/cpu/armv7/mx7/psci-mx7.c | 78
> > > +++++++++++++++++++++++++++++++++++++++
> > >  arch/arm/cpu/armv7/mx7/psci.S     | 54 +++++++++++++++++++++++++++
> > >  arch/arm/cpu/armv7/mx7/soc.c      |  9 +++++
> > >  4 files changed, 145 insertions(+)
> > >  create mode 100644 arch/arm/cpu/armv7/mx7/psci-mx7.c  create mode
> > > 100644 arch/arm/cpu/armv7/mx7/psci.S
> > >
> > > diff --git a/arch/arm/cpu/armv7/mx7/Makefile
> > > b/arch/arm/cpu/armv7/mx7/Makefile index e6ecef0..f25461c 100644
> > > --- a/arch/arm/cpu/armv7/mx7/Makefile
> > > +++ b/arch/arm/cpu/armv7/mx7/Makefile
> > > @@ -6,3 +6,7 @@
> > >  #
> > >
> > >  obj-y	:= soc.o clock.o clock_slice.o
> > > +
> > > +ifdef CONFIG_ARMV7_PSCI
> > > +obj-y  += psci.o psci-mx7.o
> >
> > Obj-y += psci-mx7.o psci.o
> > The otherwise psci_text_end will not be last one.
> 
> I don't like this object module order sensitivity.
> 
> The object module order of secure code modules should not affect the resulting
> binary to the point of possibly preventing it from working -- after all, the object
> module order of 'vanilla' image code does not matter (1). We don't have this
> kind of problem when defining the image start and end, why would we have it
> with the secure code start and end?

Secure code use psci_text_end to calculate stack top point. 

> 
> IOW, psci_text_end could (and should) be defined in the linker script, not in an
> object module.

I agree.  The other platform put psci_text_end to object module. 

Best regards
Frank Li

> 
> (1) except for start.S, which *must* be linked first, and even that is not done
> through object order but through linker script section order.
> 
> > Best regards
> > Frank Li
> 
> Amicalement,
> --
> Albert.


More information about the U-Boot mailing list