qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hreset
@ 2009-02-28 14:46 Alexander Graf
  2009-02-28 15:21 ` Blue Swirl
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2009-02-28 14:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexander Graf

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-28 15:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28 14:46 [Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hreset Alexander Graf
2009-02-28 15:21 ` Blue Swirl
2009-02-28 15:27   ` Alexander Graf
2009-02-28 15:32   ` Alexander Graf
2009-02-28 15:49     ` Blue Swirl

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).