qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hres


From: Alexander Graf
Subject: [Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hreset
Date: Sat, 28 Feb 2009 15:46:43 +0100

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 <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]