From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAnMJ-0006xe-7d for qemu-devel@nongnu.org; Sat, 08 May 2010 12:58:35 -0400 Received: from [140.186.70.92] (port=40687 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAnMH-0006wE-Lw for qemu-devel@nongnu.org; Sat, 08 May 2010 12:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAnMG-0007sc-1B for qemu-devel@nongnu.org; Sat, 08 May 2010 12:58:33 -0400 Received: from ey-out-1920.google.com ([74.125.78.146]:10845) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAnMF-0007sN-R4 for qemu-devel@nongnu.org; Sat, 08 May 2010 12:58:31 -0400 Received: by ey-out-1920.google.com with SMTP id 5so412736eyb.14 for ; Sat, 08 May 2010 09:58:30 -0700 (PDT) From: Lars Munch Date: Sat, 8 May 2010 18:58:11 +0200 Message-Id: <1273337891-20342-1-git-send-email-lars@segv.dk> Subject: [Qemu-devel] [PATCH v2] linux-user: fix running programs with iwmmxt List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Lars Munch CP0 and/or CP1 needs to be accessible when using linux-user for emulating a pxa270 cpu with code using iwmmxt instructions. This patch inits the cpu to have CP0 and/or CP1 accessible if in linux-user mode. Signed-off-by: Lars Munch --- target-arm/helper.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 99e0394..d3731bb 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -168,6 +168,9 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) /* JTAG_ID is ((id << 28) | 0x09265013) */ env->cp15.c0_cachetype = 0xd172172; env->cp15.c1_sys = 0x00000078; +#if defined (CONFIG_USER_ONLY) + env->cp15.c15_cpar = 0x00000001; +#endif break; case ARM_CPUID_PXA270_A0: case ARM_CPUID_PXA270_A1: @@ -181,6 +184,9 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->iwmmxt.cregs[ARM_IWMMXT_wCID] = 0x69051000 | 'Q'; env->cp15.c0_cachetype = 0xd172172; env->cp15.c1_sys = 0x00000078; +#if defined (CONFIG_USER_ONLY) + env->cp15.c15_cpar = 0x00000003; +#endif break; default: cpu_abort(env, "Bad CPU ID: %x\n", id); -- 1.7.1