]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm: Correctly implement ACTLR2, HACTLR2
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Feb 2020 17:51:16 +0000 (17:51 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Feb 2020 16:07:02 +0000 (16:07 +0000)
commitf6287c24c66d6b9187c1c2887e1c7cfa4d304b0c
tree2158afddaa15dbd24bad7d5b5e117abe2b6d1e0e
parentb3a816f6ce1ec184ab6072f50bbe4479fc5116c3
target/arm: Correctly implement ACTLR2, HACTLR2

The ACTLR2 and HACTLR2 AArch32 system registers didn't exist in ARMv7
or the original ARMv8.  They were later added as optional registers,
whose presence is signaled by the ID_MMFR4.AC2 field.  From ARMv8.2
they are mandatory (ie ID_MMFR4.AC2 must be non-zero).

We implemented HACTLR2 in commit 0e0456ab8895a5e85, but we
incorrectly made it exist for all v8 CPUs, and we didn't implement
ACTLR2 at all.

Sort this out by implementing both registers only when they are
supposed to exist, and setting the ID_MMFR4 bit for -cpu max.

Note that this removes HACTLR2 from our Cortex-A53, -A47 and -A72
CPU models; this is correct, because those CPUs do not implement
this register.

Fixes: 0e0456ab8895a5e85
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200214175116.9164-22-peter.maydell@linaro.org
target/arm/cpu.c
target/arm/cpu.h
target/arm/cpu64.c
target/arm/helper.c