diff options
author | Alistair Francis <alistair.francis@xilinx.com> | 2014-08-29 15:00:29 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-29 15:00:29 +0100 |
commit | 87124fdea443322924be00eb79430a6243cf0747 (patch) | |
tree | b6fb52400982f50390caa72501ccc9bad0278fb8 | |
parent | 8521466b391f92681d64eabfeeca17de9b03585d (diff) |
target-arm: Add arm_ccnt_enabled function
Include a helper function to determine if the CCNT counter
is enabled.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: e1a64f17a756e06c8bda8238ad4826d705049f7a.1409025949.git.peter.crosthwaite@xilinx.com
[ PC changes
* Remove EL based checks
]
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target-arm/helper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 13507f778b..e6c82ab0b8 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -548,6 +548,18 @@ static CPAccessResult pmreg_access(CPUARMState *env, const ARMCPRegInfo *ri) } #ifndef CONFIG_USER_ONLY + +static inline bool arm_ccnt_enabled(CPUARMState *env) +{ + /* This does not support checking PMCCFILTR_EL0 register */ + + if (!(env->cp15.c9_pmcr & PMCRE)) { + return false; + } + + return true; +} + static void pmcr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { |