Klaus Kuehnhammer

rdtsc equivalent on v4?

Discussion created by Klaus Kuehnhammer on Nov 12, 2008
Latest reply on Feb 8, 2012 by TomE

does anyone have an idea how to best get something equivalent to the x86 rdtsc instruction on a v4 core (mcf548x specifically) for reading out a cycle count?

I was considering using the second slice timer to count down from ffffffff, read the SCNT register  use the inverted value. The problem with that is that this is supposed to work from userspace, and the MBAR region is locked down to kernel accesses.