Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Failed to access PMCCNTR_EL0 on RK3399 Board

https://github.com/jerinjacobk/armv8_pmu_cycle_counter_el0

I got that  application in user-space can not access "PMCCNTR_EL0" commonly. So, I cross-compiled kernel-space code in github project above and insmod gennerated ko file on my rk3399 board.

However, I still could not access PMCCNTR_EL0 regsiter after that. I wonder that how could I fix it?

Parents
  • Thanks for your reply ! When I disable all core couidle like below

    for X in $(seq 0 3); do for Y in $(seq 1 6); do echo 1 > /sys/devices/system/cpu/cpu$X/cpuidle/state$Y/disable ; done ; done

    "asm volatile("mrs %0, pmccntr_el0" : "=r"(time_start))" will not lead to illegal instruction

    What I want to know is does PMCCNTR_EL0 register being shared with each cpu core and will increment it self if any cpu core active? If that, how should I use PMCCNTR_EL0 ?

Reply
  • Thanks for your reply ! When I disable all core couidle like below

    for X in $(seq 0 3); do for Y in $(seq 1 6); do echo 1 > /sys/devices/system/cpu/cpu$X/cpuidle/state$Y/disable ; done ; done

    "asm volatile("mrs %0, pmccntr_el0" : "=r"(time_start))" will not lead to illegal instruction

    What I want to know is does PMCCNTR_EL0 register being shared with each cpu core and will increment it self if any cpu core active? If that, how should I use PMCCNTR_EL0 ?

Children