qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Silverstone <dsilvers@simtec.co.uk>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ARM CP14 trivial support
Date: Mon, 13 Oct 2008 11:42:32 +0100	[thread overview]
Message-ID: <1223894552.30000.30.camel@petitemort> (raw)

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hi,

Continuing the patch series aiming at supporting Simtec's development
boards and other Samsung SoC based systems, attached is a patch which
provides trivial coprocessor 14 support.

Regards,

Daniel.

-- 
Daniel Silverstone                              http://www.simtec.co.uk/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895


[-- Attachment #2: Trivial CP14 support patch --]
[-- Type: text/x-patch, Size: 1437 bytes --]

ARM9 CP14 support

The ARM coprocessor number 14, in part, is responsible for describing
CPU features. It is also the interface to the JTAG DCC channel which
some systems use to control early-boot-time debugging. All this patch
does is provide enough support that reading/writing cp14 won't fault
the emulation.

Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>

 translate.c |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

=== modified file 'target-arm/translate.c'
--- target-arm/translate.c	2008-09-22 00:52:42 +0000
+++ target-arm/translate.c	2008-10-13 10:33:00 +0000
@@ -2643,6 +2643,19 @@
     return 0;
 }
 
+static int disas_cp14_insn(CPUState *env, DisasContext *s, uint32_t insn)
+{
+    uint32_t rd = (insn >> 12) & 0xf;
+    if (insn & (1<<20)) {
+        gen_op_movl_T0_im(0);
+        gen_movl_reg_T0(s, rd);
+    } else {
+        /* Nothing to do on writes to cp14 */
+    }
+    gen_lookup_tb(s);
+    return 0;
+}
+
 #define VFP_REG_SHR(x, n) (((n) > 0) ? (x) >> (n) : (x) << -(n))
 #define VFP_SREG(insn, bigbit, smallbit) \
   ((VFP_REG_SHR(insn, bigbit - 1) & 0x1e) | (((insn) >> (smallbit)) & 1))
@@ -5567,7 +5580,9 @@
 	return 1;
     case 10:
     case 11:
-	return disas_vfp_insn (env, s, insn);
+        return disas_vfp_insn (env, s, insn);
+    case 14:
+        return disas_cp14_insn (env, s, insn);
     case 15:
 	return disas_cp15_insn (env, s, insn);
     default:


             reply	other threads:[~2008-10-13 10:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13 10:42 Daniel Silverstone [this message]
2008-10-13 12:39 ` [Qemu-devel] [PATCH] ARM CP14 trivial support Paul Brook
2008-10-13 12:50 ` andrzej zaborowski
2008-10-13 13:20   ` Paul Brook
2008-10-13 14:30     ` andrzej zaborowski
2008-10-13 14:36       ` Paul Brook
2008-10-13 14:57         ` andrzej zaborowski

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=1223894552.30000.30.camel@petitemort \
    --to=dsilvers@simtec.co.uk \
    --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).