On 16 Jun 2014, at 21:29, Mark R V Murray <ma...@freebsd.org> wrote:
> > On 16 Jun 2014, at 20:25, Michael Tuexen <tue...@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 > > _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"