Reboot on ArmV8
Stefan Kalkowski
stefan.kalkowski at genode-labs.com
Thu Jun 30 13:34:45 CEST 2022
Hello Shashank,
On Tue, Jun 28, 2022 at 04:04:16PM +0200, Shashank Anand wrote:
> Hi Genodians,
>
> On x86, the acipica component enables shutdown and reboot of the device. I
> was however unable to find any related component in the genode repo for
> power management on ArmV8
Exactly, there is no generic way to do so on ARMv8, it's strongly
dependent on the target. However, we do not have implemented poweroff
or reset for any ARM device yet.
>
> The PSCI functions are a convenient way for power management in ArmV8. The
> base-hw kernel already provides a PSCI implementation of cpu_on and cpu_off
> and it is trivial to implement the other PSCI functions as well. I am
> particularly interested in system reset.
>
> I would like to perform a system reset from a user space component, however
> PSCI requires kernel privileges. Would it be possible to expose the PSCI
> system reset service to a specific component? How feasible is this
> modification with respect to the structure of base-hw?
The intended component to implement system reset or poweroff would be
the platform driver. There is already an example for the i.MX 8MQ SoC,
where its platform driver uses the privileged `managing_system` call of the
PD session interface to do PSCI calls via the kernel (to control
certain power domains).
The `managing_system` call is implemented architecture-wise. It is
restricted to components that own the 'managing_system' privilege
given at PD construction time. In a Genode component tree, your
component, e.g. the platform driver, needs the to have the right
attribute in the init configuration in place:
<start name="platform_drv" managing_system="yes">
...
</start>
If you have nested sub-trees, every parent-component of the
corresponding one needs the managing_system privilege to hand it down
to its children.
The `managing_system` call on ARMv8 corresponds to a PSCI call. You
provide a register set, which fulfills the PSCI calling convention.
Have a look at file:
https://github.com/genodelabs/genode-imx/blob/master/src/drivers/platform/imx8mq/gpc.h
for some example code.
Best regards
Stefan
>
> Regards,
>
> Shashank
pub RSA 4096/4B2A8203 2022-06-14 Shashank Anand <shashank.anand at gapfruit.com>
> sub RSA 4096/A21B2861 2022-06-14
> >
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users
--
Stefan Kalkowski
Genode labs
https://github.com/skalk | https://genode.org
More information about the users
mailing list