target-arm: Fix handling of SDCR for 32-bit code
commita8d64e735182cbbb5dcc98f41656b118c45e57cc
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 19 Feb 2016 14:39:43 +0000 (19 14:39 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 26 Feb 2016 15:09:42 +0000 (26 15:09 +0000)
tree9edbf5a50ab9951f181571a41ba77ec70fc8baca
parent10eacda787ac9990dc22d4437b289200c819712c
target-arm: Fix handling of SDCR for 32-bit code

Fix two issues with our implementation of the SDCR:
 * it is only present from ARMv8 onwards
 * it does not contain several of the trap bits present in its 64-bit
   counterpart the MDCR_EL3

Put the register description in the right place so that it does not
get enabled for ARMv7 and earlier, and give it a write function so that
we can mask out the bits which should not be allowed to have an effect
if EL3 is 32-bit.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1455892784-11328-2-git-send-email-peter.maydell@linaro.org
Reviewed-by: Sergey Fedorov <serge.fdrv@gmail.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
target-arm/cpu.h
target-arm/helper.c