From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYg6N-0002xO-Rc for qemu-devel@nongnu.org; Sat, 23 Jan 2010 08:32:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYg6J-0002ub-2d for qemu-devel@nongnu.org; Sat, 23 Jan 2010 08:32:35 -0500 Received: from [199.232.76.173] (port=43952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYg6I-0002uV-Uy for qemu-devel@nongnu.org; Sat, 23 Jan 2010 08:32:30 -0500 Received: from 17.254.223.67.in-addr.arpa ([67.223.254.17]:51917 helo=l4dev.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYg6I-0004KF-Js for qemu-devel@nongnu.org; Sat, 23 Jan 2010 08:32:30 -0500 From: Bahadir Balban Date: Sat, 23 Jan 2010 15:09:17 +0200 Message-Id: <1264252158-17262-1-git-send-email-bbalban@b-labs.co.uk> Subject: [Qemu-devel] [PATCH 1/2] ARMv7: Initialize SCTLR on v7 so that it reads RAO bits as one. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Bahadir Balban If left uninitialized, read/update/write style access causes QEMU to interpret the architecture as non-v7 since bit 23 reads 0. Signed-off-by: Bahadir Balban --- target-arm/helper.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index b3aec99..0098053 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -101,6 +101,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->vfp.xregs[ARM_VFP_MVFR1] = 0x00011100; memcpy(env->cp15.c0_c1, cortexa8_cp15_c0_c1, 8 * sizeof(uint32_t)); memcpy(env->cp15.c0_c2, cortexa8_cp15_c0_c2, 8 * sizeof(uint32_t)); + env->cp15.c1_sys = (1 << 23) | (1 << 22) | (1 << 18) | (1 << 16) | (0xF << 3); env->cp15.c0_cachetype = 0x82048004; env->cp15.c0_clid = (1 << 27) | (2 << 24) | 3; env->cp15.c0_ccsid[0] = 0xe007e01a; /* 16k L1 dcache. */ @@ -123,6 +124,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->vfp.xregs[ARM_VFP_MVFR1] = 0x01111111; memcpy(env->cp15.c0_c1, cortexa9_cp15_c0_c1, 8 * sizeof(uint32_t)); memcpy(env->cp15.c0_c2, cortexa9_cp15_c0_c2, 8 * sizeof(uint32_t)); + env->cp15.c1_sys = (1 << 23) | (1 << 22) | (1 << 18) | (1 << 16) | (0xF << 3); env->cp15.c0_cachetype = 0x80038003; env->cp15.c0_clid = (1 << 27) | (1 << 24) | 3; env->cp15.c0_ccsid[0] = 0xe00fe015; /* 16k L1 dcache. */ -- 1.6.3.3