Hi everyone,
I still use my setup based on the tz_vmm runscript.
I want to obtain the current cpu frequency in both secure and normal world.
In linux, the sysfs directories for the cpu are empty. How can i read the current CPU frequency in genode?
Maybe dynamic frequency scaling in unsupported and I can assume the CPU to always run at max frequency (1GHz in this case)?
thanks!
David
Hi David,
first off, cpu frequency scaling for the i.MX53 SoC isn't implemented in Genode by now.
Controlling cpu frequency, power management, and the global clock module directly from secure and normal world isn't possible without fatal interferences. All those functionality should be given as a whole either to the secure, or non-secure side. They are assigned to one and the same slot within the central security unit of the i.MX53 SoC (CSL slot 9). That means: exclusive control can be given only as a whole.
If you want the secure world to stay active and alive, you can't give control of that combined functionality to the normal world. Imagine the normal world turns off power of devices that are under control of the secure side. If the corresponding driver doesn't recognize, it will fail to service. Moreover, if the cpu is turned into deep sleep, the secure side can't do anything against it.
Nevertheless, within Genode's current _example_ setup we allow the normal world to access those devices, so that Linux can use e.g. the global clock module directly without the need to implement all that drivers on the Genode side, and to support para-virtualized devices within Linux. Furthermore, to circumvent interferences between the Linux kernel, and the secure side, certain power saving functions are disabled in the modified Linux code, and cpu frequency scaling was disabled in the example's Linux configuration.
If you need cpu frequency scaling, you can either implement a corresponding driver on the Genode side, you might use the platform driver of the Arndale board (repos/src/drivers/platform/arndale) as a template, provide a hypercall interface to the normal world, and implement a para-virtual cpu frequency driver in Linux. Alternatively, if denial of service attacks doesn't matter in your scenario, you can leave the assignment of the clocking, power, frequency scaling to the normal world as it is, re-enable cpu frequency scaling within Linux, and check whether it negatively interferences with the devices on the secure side (e.g.: timers). If you encounter problems, you might cooperatively inform the secure side about changed settings to circumvent interferences. The same applies to changed power settings, e.g. you can inform the secure world before disabling certain devices, as well as after re-enabling them.
I hope that clarifies your questions.
Regards Stefan
On 11/06/2014 12:18 PM, David Goltzsche wrote:
Hi everyone,
I still use my setup based on the tz_vmm runscript.
I want to obtain the current cpu frequency in both secure and normal world.
In linux, the sysfs directories for the cpu are empty. How can i read the current CPU frequency in genode?
Maybe dynamic frequency scaling in unsupported and I can assume the CPU to always run at max frequency (1GHz in this case)?
thanks!
David
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main