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

Re: [Minios-devel] [UNIKRAFT PATCHv5 41/46] plat/common: Implement system off for arm64


  • To: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Wei Chen (Arm Technology China)" <Wei.Chen@xxxxxxx>
  • Date: Wed, 12 Sep 2018 05:35:18 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wei.Chen@xxxxxxx;
  • Cc: "Kaly Xin \(Arm Technology China\)" <Kaly.Xin@xxxxxxx>, nd <nd@xxxxxxx>
  • Delivery-date: Wed, 12 Sep 2018 05:35:27 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99
  • Thread-index: AQHUMHkx+ZaihwhQOEOh4t8jR7K7JKTruRoAgACZjBA=
  • Thread-topic: [Minios-devel] [UNIKRAFT PATCHv5 41/46] plat/common: Implement system off for arm64

Hi Simon,

> -----Original Message-----
> From: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> Sent: 2018年9月12日 4:22
> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: Re: [Minios-devel] [UNIKRAFT PATCHv5 41/46] plat/common: Implement
> system off for arm64
> 
> 
> 
> On 10.08.2018 09:08, Wei Chen wrote:
> > From: Wei Chen <Wei.Chen@xxxxxxx>
> >
> > Using PSCI despatch function to call PSCI_SYSTEM_OFF
> > function to shutdown system.
> >
> > Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
> > ---
> >   plat/common/arm/cpu_native.c        | 7 +++++++
> >   plat/common/include/arm/arm64/cpu.h | 1 +
> >   2 files changed, 8 insertions(+)
> >
> > diff --git a/plat/common/arm/cpu_native.c b/plat/common/arm/cpu_native.c
> > index 429b172..dc93115 100644
> > --- a/plat/common/arm/cpu_native.c
> > +++ b/plat/common/arm/cpu_native.c
> > @@ -50,3 +50,10 @@ void reset(void)
> >     UK_BUGON (!smcc_psci_call);
> >     smcc_psci_call(PSCI_FNID_SYSTEM_RESET, 0, 0, 0);
> >   }
> > +
> > +/* Systems support PSCI >= 0.2 can do system off from PSCI */
> > +void system_off(void)
> > +{
> > +   UK_BUGON (!smcc_psci_call);
> > +   smcc_psci_call(PSCI_FNID_SYSTEM_OFF, 0, 0, 0);
> 
> Maye we should have failed earlier during boot whenever we fail to
> detect the mode. You could then use UK_ASSERT() instead. What do you think?
> 

Can we just return if smcc_psci_call == NULL? If this system doesn't support
PSCI, we can think the system_off failed, then we can have other remedy?

For example, in shutdown.c, if system_off failed, we failed back to cpu_halt.

> > +}
> > diff --git a/plat/common/include/arm/arm64/cpu.h
> b/plat/common/include/arm/arm64/cpu.h
> > index c156fd3..0300c28 100644
> > --- a/plat/common/include/arm/arm64/cpu.h
> > +++ b/plat/common/include/arm/arm64/cpu.h
> > @@ -103,3 +103,4 @@ int32_t smcc_psci_smc_call(uint32_t, uint64_t, uint64_t,
> uint64_t);
> >   /* CPU native APIs */
> >   void halt(void);
> >   void reset(void);
> > +void system_off(void);
> >
_______________________________________________
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®.