Commit 4e80effcf961b0ce3b794d239225aacb7f48f38c
1 parent
7a3a6927
Implement exception prefix feature for PowerPC 601.
Fix PowerPC 601 hardware reset vector. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3352 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
8 additions
and
7 deletions
target-ppc/helper.c
... | ... | @@ -1996,16 +1996,17 @@ int do_store_msr (CPUPPCState *env, target_ulong value) |
1996 | 1996 | tlb_flush(env, 1); |
1997 | 1997 | env->interrupt_request |= CPU_INTERRUPT_EXITTB; |
1998 | 1998 | } |
1999 | -#if 0 | |
2000 | - if (loglevel != 0) { | |
2001 | - fprintf(logfile, "%s: T0 %08lx\n", __func__, value); | |
2002 | - } | |
2003 | -#endif | |
1999 | +#if !defined (CONFIG_USER_ONLY) | |
2004 | 2000 | if (unlikely((env->flags & POWERPC_FLAG_TGPR) && |
2005 | 2001 | ((value >> MSR_TGPR) & 1) != msr_tgpr)) { |
2006 | 2002 | /* Swap temporary saved registers with GPRs */ |
2007 | 2003 | swap_gpr_tgpr(env); |
2008 | 2004 | } |
2005 | + if (unlikely((value >> MSR_EP) & 1) != msr_ep) { | |
2006 | + /* Change the exception prefix on PowerPC 601 */ | |
2007 | + env->excp_prefix = ((value >> MSR_EP) & 1) * 0xFFF00000; | |
2008 | + } | |
2009 | +#endif | |
2009 | 2010 | #if defined (TARGET_PPC64) |
2010 | 2011 | msr_sf = (value >> MSR_SF) & 1; |
2011 | 2012 | msr_isf = (value >> MSR_ISF) & 1; |
... | ... | @@ -2899,7 +2900,7 @@ void cpu_ppc_reset (void *opaque) |
2899 | 2900 | #endif |
2900 | 2901 | msr_ap = 0; /* TO BE CHECKED */ |
2901 | 2902 | msr_sa = 0; /* TO BE CHECKED */ |
2902 | - msr_ip = 0; /* TO BE CHECKED */ | |
2903 | + msr_ep = 1; | |
2903 | 2904 | #if defined (DO_SINGLE_STEP) && 0 |
2904 | 2905 | /* Single step trace mode */ |
2905 | 2906 | msr_se = 1; | ... | ... |
target-ppc/translate_init.c
... | ... | @@ -2322,7 +2322,7 @@ static void init_excp_601 (CPUPPCState *env) |
2322 | 2322 | env->excp_vectors[POWERPC_EXCP_RUNM] = 0x00002000; |
2323 | 2323 | env->excp_prefix = 0xFFF00000; |
2324 | 2324 | /* Hardware reset vector */ |
2325 | - env->hreset_vector = 0xFFFFFFFCUL; | |
2325 | + env->hreset_vector = 0x00000100UL; | |
2326 | 2326 | #endif |
2327 | 2327 | } |
2328 | 2328 | ... | ... |