From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdQSp-0007VS-2S for qemu-devel@nongnu.org; Sat, 28 Feb 2009 09:46:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdQSk-0007VE-SB for qemu-devel@nongnu.org; Sat, 28 Feb 2009 09:46:49 -0500 Received: from [199.232.76.173] (port=41923 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdQSk-0007VB-LD for qemu-devel@nongnu.org; Sat, 28 Feb 2009 09:46:46 -0500 Received: from mx2.suse.de ([195.135.220.15]:50337) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LdQSk-0008TC-7R for qemu-devel@nongnu.org; Sat, 28 Feb 2009 09:46:46 -0500 From: Alexander Graf Date: Sat, 28 Feb 2009 15:46:43 +0100 Message-Id: <1235832403-29902-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] PPC: Use correct values for 970 interrupts and hreset Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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