aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedorov <s.fedorov@samsung.com>2013-12-10 10:41:49 +0400
committerPeter Maydell <peter.maydell@linaro.org>2013-12-10 13:28:50 +0000
commit74f1c6ddec8dc7566d9b75574bb006214cc7d3b4 (patch)
tree1b47961cab29209d0bf40ff19ecb1343b33bf5ac
parent09f7813522238555b77ec2b9f2d3bc20d6e3c796 (diff)
downloadqemu-arm-pull-target-arm-20131210.tar.gz
target-arm: fix TTBCR write maskingpull-target-arm-20131210
Current implementation is not accurate according to ARMv7-AR reference manual. See "B4.1.153 TTBCR, Translation Table Base Control Register, VMSA | TTBCR format when using the Long-descriptor translation table format". When LPAE feature is supported, EAE, bit[31] selects translation descriptor format and, therefore, TTBCR format. Signed-off-by: Sergey Fedorov <s.fedorov@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386657709-23399-1-git-send-email-s.fedorov@samsung.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target-arm/helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 8ec4cb1cd1..5e5e5aad2b 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1173,7 +1173,7 @@ static int vmsa_ttbcr_raw_write(CPUARMState *env, const ARMCPRegInfo *ri,
{
int maskshift = extract32(value, 0, 3);
- if (arm_feature(env, ARM_FEATURE_LPAE)) {
+ if (arm_feature(env, ARM_FEATURE_LPAE) && (value & (1 << 31))) {
value &= ~((7 << 19) | (3 << 14) | (0xf << 3));
} else {
value &= 7;