Hi,
Is it possible to have a piece of code like this in user space? I mean is it possible to read/write co-processor register in user space in Netbsd / Linux?
XYZ]# cat pmc.c
static inline int
arm11_pmc_ctrl_read(void)
{
unsigned int val;
__asm volatile ("mrc p15, 0, %0, c15, c12, 0" : "=r" (val));
return val;
}
int main(){
unsigned int ctrl;
ctrl = arm11_pmc_ctrl_read();
}