On Mon, 30 Aug 2010, stephane eranian wrote: > Vince, > > I am looking at removing any OS dependencies from libpfm4. > In particular, I'd like to get rid of pfmlib_getcpuinfo_attr() and > replace with a processor specific call , e.g., cpuid(). I noticed > that in the new arm code, you are relying on pfmlib_getcpuinfo_attr(). > I wonder if it would not be possible to add some cpuid()-style > calls to get to the same information. Would you know about this?
On further investigation it definitely is true that obtaining the ARM implementer/part information is not possible from userspace. The relevant register "c0 Main ID register" is privledged access only. As far as I can tell there's no way of obtaining the information without going through the operating system. Accessing the register from user space gives an illegal instruction exception. I think PowerPC has a similar restriction, but the Linux kernel traps on the illegal instruction and emulates it so that user space can access the data. As far as I know ARM does not do this. Vince ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel