summary refs log tree commit diff stats
path: root/linux-user/arm/cpu_loop.c
diff options
context:
space:
mode:
authorLuc Michel <luc.michel@greensocs.com>2019-09-19 14:18:40 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-09-27 11:41:28 +0100
commitd56974afe980b2bb8d60b17729483d80a7692400 (patch)
treea4d0dd79184d6c630bba9b03b054563f7b00bdb7 /linux-user/arm/cpu_loop.c
parent1329132d28bf14b9508f7a1f04a2c63422bc3f99 (diff)
downloadfocaccia-qemu-d56974afe980b2bb8d60b17729483d80a7692400.tar.gz
focaccia-qemu-d56974afe980b2bb8d60b17729483d80a7692400.zip
target/arm: fix CBAR register for AArch64 CPUs
For AArch64 CPUs with a CBAR register, we have two views for it:
  - in AArch64 state, the CBAR_EL1 register (S3_1_C15_C3_0), returns the
    full 64 bits CBAR value
  - in AArch32 state, the CBAR register (cp15, opc1=1, CRn=15, CRm=3, opc2=0)
    returns a 32 bits view such that:
      CBAR = CBAR_EL1[31:18] 0..0 CBAR_EL1[43:32]

This commit fixes the current implementation where:
  - CBAR_EL1 was returning the 32 bits view instead of the full 64 bits
    value,
  - CBAR was returning a truncated 32 bits version of the full 64 bits
    one, instead of the 32 bits view
  - CBAR was declared as cp15, opc1=4, CRn=15, CRm=0, opc2=0, which is
    the CBAR register found in the ARMv7 Cortex-Ax CPUs, but not in
    ARMv8 CPUs.

Signed-off-by: Luc Michel <luc.michel@greensocs.com>
Message-id: 20190912110103.1417887-1-luc.michel@greensocs.com
[PMM: Added a comment about the two different kinds of CBAR]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/arm/cpu_loop.c')
0 files changed, 0 insertions, 0 deletions