Performance Counters on i.MX53

Stefan Kalkowski stefan.kalkowski at ...1...
Mon Oct 20 11:53:46 CEST 2014

On 10/20/2014 11:41 AM, Stefan Kalkowski wrote:
> Hi,
> On 10/20/2014 11:28 AM, David Goltzsche wrote:
>> Hi list!
>> I want to use performance Counters on the i.MX QSB for measuring the
>> trustzone world switch. My setup is based on the tz_vmm runscript.
>> In the non-secure (Linux) world, the performance counter works. However,
>> Genode stops with the warning "undefined instruction". Both the MCR and
>> MRC instruction seem to be undefined. I tested my own assembler lines as
>> well as the perf_counter implementation in the base-hw kernel. 
>> So, how do I use the instructions mentionend above?
> please provide a complete setup, as well as complete output of the
> scenario that fails! For instance the statement "Genode stops with the
> warning..." is not that precise for me. Do you read or write the
> performance counter? Where do cou call the instruction in a user task,
> in core, or the kernel?
> It is much easier to reproduce your problem, if you can simply provide a
> branch with your setup, and the complete log file.
> Regards
> Stefan

Ok, I didn't had on my radar that the performance counter's unprivileged
usage is enabled only if you add the SPEC variable "perf_counter" to
your build. Simply do the following in your build directory:

  echo "SPECS += perf_counter" >> etc/specs.conf

After that re-build your scenario.

My suggestion for providing complete information for reproduction, is
nevertheless recommended for the future ;-)


>> Thanks!
>> David
>> ------------------------------------------------------------------------------
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push notifications.
>> Take corrective actions from your mobile device.
>> _______________________________________________
>> genode-main mailing list
>> genode-main at

Stefan Kalkowski
Genode Labs ยท

More information about the users mailing list