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
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?
Regards,
Shashank
On 2022-06-28 16:04, 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
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?
Regards,
Shashank _______________________________________________ Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Hi Genodians,
Regarding resetting the IMX8MM board, I have found a better solution that does not require kernel privilege. The board can be reset by clearing the WDA bit of the Watchdog Control Register (WDOG1_WCR). Clearing the WDA bit triggers the WDOG_B signal which performs a system reset.
Regards,
Shashank
Hello Shashank,
On Wed, Jun 29, 2022 at 01:43:05PM +0200, Shashank Anand wrote:
Regarding resetting the IMX8MM board, I have found a better solution that does not require kernel privilege. The board can be reset by clearing the WDA bit of the Watchdog Control Register (WDOG1_WCR). Clearing the WDA bit triggers the WDOG_B signal which performs a system reset.
that is good to know. Again the platform driver seems the natural component to control the Watchdog Control Register.
Regards Stefan
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/im...
for some example code.
Best regards Stefan
Regards,
Shashank
pub RSA 4096/4B2A8203 2022-06-14 Shashank Anand shashank.anand@gapfruit.com
sub RSA 4096/A21B2861 2022-06-14
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users