target/arm: Implement new FEAT_ECV trap bits
commitdcdad2624b445f9ce1a3fdca6a0831d7a7abddd8
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Mar 2024 12:19:02 +0000 (7 12:19 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Mar 2024 12:19:02 +0000 (7 12:19 +0000)
treec52816b94aabae5f2c02a20af29584486be22095
parenta681d66e95f0eb5de014fbbc8f1d6286e0750bb5
target/arm: Implement new FEAT_ECV trap bits

The functionality defined by ID_AA64MMFR0_EL1.ECV == 1 is:
 * four new trap bits for various counter and timer registers
 * the CNTHCTL_EL2.EVNTIS and CNTKCTL_EL1.EVNTIS bits which control
   scaling of the event stream. This is a no-op for us, because we don't
   implement the event stream (our WFE is a NOP): all we need to do is
   allow CNTHCTL_EL2.ENVTIS to be read and written.
 * extensions to PMSCR_EL1.PCT, PMSCR_EL2.PCT, TRFCR_EL1.TS and
   TRFCR_EL2.TS: these are all no-ops for us, because we don't implement
   FEAT_SPE or FEAT_TRF.
 * new registers CNTPCTSS_EL0 and NCTVCTSS_EL0 which are
   "self-sychronizing" views of the CNTPCT_EL0 and CNTVCT_EL0, meaning
   that no barriers are needed around their accesses. For us these
   are just the same as the normal views, because all our sysregs are
   inherently self-sychronizing.

In this commit we implement the trap handling and permit the new
CNTHCTL_EL2 bits to be written.

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