qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Cc: Alexander Graf <alex@csgraf.de>
Subject: [Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hreset
Date: Sat, 28 Feb 2009 15:46:43 +0100	[thread overview]
Message-ID: <1235832403-29902-1-git-send-email-agraf@suse.de> (raw)

The 970 doesn't set exception prefix values by default. According to
the ISA it just jumps to real mode with nip=vector.

Because of that the current hreset_vector is rendered invalid. Before,
it would go to excp_prefix (ROM base) + 0x100 (reset vector) and get
into the firmware.

But with the corrected excp_prefix, we now have to jump to the real
entry point, which is at 0xFFFFFFFC.

I can't imagine how any OS that does memory management itself could have
possibly worked with the code as it was.

Signed-off-by: Alexander Graf <alex@csgraf.de>
---
 target-ppc/translate_init.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 889708f..e20b1c9 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -3052,9 +3052,9 @@ static void init_excp_970 (CPUPPCState *env)
     env->excp_vectors[POWERPC_EXCP_MAINT]    = 0x00001600;
     env->excp_vectors[POWERPC_EXCP_VPUA]     = 0x00001700;
     env->excp_vectors[POWERPC_EXCP_THERM]    = 0x00001800;
-    env->excp_prefix   = 0x00000000FFF00000ULL;
+    env->excp_prefix   = 0x0000000000000000ULL;
     /* Hardware reset vector */
-    env->hreset_vector = 0x0000000000000100ULL;
+    env->hreset_vector = 0x00000000FFFFFFFCULL;
 #endif
 }
 #endif
-- 
1.5.3.1

             reply	other threads:[~2009-02-28 14:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 14:46 Alexander Graf [this message]
2009-02-28 15:21 ` [Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hreset Blue Swirl
2009-02-28 15:27   ` Alexander Graf
2009-02-28 15:32   ` Alexander Graf
2009-02-28 15:49     ` Blue Swirl

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=1235832403-29902-1-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=alex@csgraf.de \
    --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).