[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCHv4 36/43] plat/common: Implement CPU reset for arm64



Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien.grall@xxxxxxxxxx>
> Sent: 2018年7月16日 21:50
> To: Wei Chen <Wei.Chen@xxxxxxx>; minios-devel@xxxxxxxxxxxxxxxxxxxx;
> simon.kuenzer@xxxxxxxxx
> Cc: Kaly Xin <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv4 36/43] plat/common: Implement
> CPU reset for arm64
> 
> Hi Wei,
> 
> On 06/07/18 10:03, Wei Chen wrote:
> > Using PSCI despatch function to call PSCI_CPU_RESET
> > function to reset CPU.
> >
> > Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
> > ---
> >   plat/common/arm/cpu_native.c        | 8 ++++++++
> >   plat/common/include/arm/arm64/cpu.h | 1 +
> >   2 files changed, 9 insertions(+)
> >
> > diff --git a/plat/common/arm/cpu_native.c b/plat/common/arm/cpu_native.c
> > index 07548bf..177cbd8 100644
> > --- a/plat/common/arm/cpu_native.c
> > +++ b/plat/common/arm/cpu_native.c
> > @@ -42,3 +42,11 @@ void halt(void)
> >     else if (psci_method == PSCI_METHOD_SMC)
> >             psci_smc_call(PSCI_FNID_CPU_SUSPEND);
> >   }
> > +
> > +void reset(void)
> > +{
> > +   if (psci_method == PSCI_METHOD_HVC)
> > +           psci_hvc_call(PSCI_FNID_SYSTEM_RESET);
> > +   else if (psci_method == PSCI_METHOD_SMC)
> > +           psci_smc_call(PSCI_FNID_SYSTEM_RESET);
> 
> See my remark in the previous patch about if/else if and missing
> non-PSCI case.

Ok.

> 
> Also, on PSCI 0.1, this will not be supported. Do you plan to support 0.1?

NO, I want to support PSCI from 0.2. I only parse 0.2 and 1.0 PSCI nodes
from DTB. I think I'd better to write some comments and commit message to
mention it.

> 
> > +}
> > diff --git a/plat/common/include/arm/arm64/cpu.h
> b/plat/common/include/arm/arm64/cpu.h
> > index 1fd5c72..c744ed6 100644
> > --- a/plat/common/include/arm/arm64/cpu.h
> > +++ b/plat/common/include/arm/arm64/cpu.h
> > @@ -73,6 +73,7 @@
> >
> >   /* CPU native APIs */
> >   void halt(void);
> > +void reset(void);
> >
> >   /* PSCI conduit method to call functions */
> >   extern int psci_method;
> >
> 
> Cheers,
> 
> --
> Julien Grall
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.