All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Whitehorn <nwhitehorn@freebsd.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ppc: provide PIR register on all book-S CPUs
Date: Tue, 31 May 2011 09:52:51 -0500	[thread overview]
Message-ID: <4DE500C3.80408@freebsd.org> (raw)

The PIR register is architecturally specified on all PowerPC 
non-embedded CPUs, but currently is only available on the 604, 620, and 
G4. Add it to all 601-derived CPUs.

  target-ppc/translate_init.c |   20 +++++---------------
  1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index b511afa..1286ddf 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -670,6 +670,11 @@ static void gen_spr_ne_601 (CPUPPCState *env)
                   SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_sdr1,
                   0x00000000);
+    /* Processor identification */
+    spr_register(env, SPR_PIR, "PIR",
+                 SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_pir,
+                 env->cpu_index);
  }

  /* BATs 0-3 */
@@ -1019,11 +1024,6 @@ static void gen_spr_thrm (CPUPPCState *env)
  /* SPR specific to PowerPC 604 implementation */
  static void gen_spr_604 (CPUPPCState *env)
  {
-    /* Processor identification */
-    spr_register(env, SPR_PIR, "PIR",
-                 SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_pir,
-                 0x00000000);
      /* Breakpoints */
      /* XXX : not implemented */
      spr_register(env, SPR_IABR, "IABR",
@@ -1259,11 +1259,6 @@ static void gen_spr_601 (CPUPPCState *env)

  static void gen_spr_74xx (CPUPPCState *env)
  {
-    /* Processor identification */
-    spr_register(env, SPR_PIR, "PIR",
-                 SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_pir,
-                 0x00000000);
      /* XXX : not implemented */
      spr_register(env, SPR_MMCR2, "MMCR2",
                   SPR_NOACCESS, SPR_NOACCESS,
@@ -2118,11 +2113,6 @@ static void gen_spr_compress (CPUPPCState *env)
  /* SPR specific to PowerPC 620 */
  static void gen_spr_620 (CPUPPCState *env)
  {
-    /* Processor identification */
-    spr_register(env, SPR_PIR, "PIR",
-                 SPR_NOACCESS, SPR_NOACCESS,
- &spr_read_generic, &spr_write_pir,
-                 0x00000000);
      spr_register(env, SPR_ASR, "ASR",
                   SPR_NOACCESS, SPR_NOACCESS,
&spr_read_asr, &spr_write_asr,

             reply	other threads:[~2011-05-31 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 14:52 Nathan Whitehorn [this message]
2011-05-31 16:54 ` [Qemu-devel] [PATCH] ppc: provide PIR register on all book-S CPUs Alexander Graf
2011-06-12 15:50 ` [Qemu-devel] [PATCH2] " Nathan Whitehorn
2011-07-04 15:21   ` Alexander Graf
     [not found]     ` <4E11DF9B.1080702@freebsd.org>
2011-07-04 15:57       ` Alexander Graf

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=4DE500C3.80408@freebsd.org \
    --to=nwhitehorn@freebsd.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.