OSDN Git Service

target/arm: Implement FEAT_PMUv3p5 cycle counter disable bits
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 22 Aug 2022 13:23:56 +0000 (14:23 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 14 Sep 2022 10:19:40 +0000 (11:19 +0100)
commit0b42f4fab9d3e994efa44e17cb76c15b269bcbda
treeca700a981fda9bba6f7e671f2f71890e9f63eb53
parenta793bcd0272d9d25c942184ee18c7ed4dc75dc0d
target/arm: Implement FEAT_PMUv3p5 cycle counter disable bits

FEAT_PMUv3p5 introduces new bits which disable the cycle
counter from counting:
 * MDCR_EL2.HCCD disables the counter when in EL2
 * MDCR_EL3.SCCD disables the counter when Secure

Add the code to support these bits.

(Note that there is a third documented counter-disable
bit, MDCR_EL3.MCCD, which disables the counter when in
EL3. This is not present until FEAT_PMUv3p7, so is
out of scope for now.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220822132358.3524971-9-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/arm/cpu.h
target/arm/helper.c