qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lars Munch <lars@segv.dk>
To: qemu-devel@nongnu.org
Cc: Lars Munch <lars@segv.dk>
Subject: [Qemu-devel] [PATCH v2] linux-user: fix running programs with iwmmxt
Date: Sat,  8 May 2010 18:58:11 +0200	[thread overview]
Message-ID: <1273337891-20342-1-git-send-email-lars@segv.dk> (raw)

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 <lars@segv.dk>
---
 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

                 reply	other threads:[~2010-05-08 16:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1273337891-20342-1-git-send-email-lars@segv.dk \
    --to=lars@segv.dk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).