svn commit: r266083 - in head/sys/arm: arm include

Michael Tuexen tuexen at freebsd.org
Mon Jun 16 19:38:09 UTC 2014


On 16 Jun 2014, at 21:29, Mark R V Murray <markm at FreeBSD.org> wrote:

> 
> On 16 Jun 2014, at 20:25, Michael Tuexen <tuexen at freebsd.org> wrote:
>>> Should print a whole lotta numbers, incrementing, unless you hit the wraparound.
>> Don't I need to compile a kernel with _PMC_USER_READ_WRITE_ being defined, since
>> without it a user process can't access the register. When running it on a kernel
>> not defining _PMC_USER_READ_WRITE_, I get a core with Illegal instruction.
> 
> No. That only enables _write_ access. That’s on ARMv7. What’s in ARMv6 may also work.
Hmm, the documentation reads
Access to the Cycle Counter Register in User mode depends on the V bit, see c15, Secure User and Non-secure Access Validation Control Register. The Cycle Counter Register is always accessible in Privileged modes. Table 3.139 lists the results of attempted access for each mode.

and the table shows read/write access for Secure Privileged and Non-secure Privileged,
but for User you need the V-bit. So in which modes are the user programs running?

One the normal kernel I get the Illegal Instruction error when I run the program.

Best regards
Michael
> 
>> Let me build a kernel with the above define and retest.
> 
> Please try without it.
> 
> M
> -- 
> Mark R V Murray
> 
> 



More information about the svn-src-all mailing list