On Thu, 2016-08-25 at 11:31 +1000, Benjamin Herrenschmidt wrote: > > Interesting, the problem is only with 603, not 604. I think I might > have broken something with the 603 SW TLB loading stuff which is > a bit weird, I'll have a look. Thanks.
This fixes it to some extent... It gets to "press enter to activate this console" but from there things don't work properly unless I emulate a 604. I suspect there are still issues with the 603 SW TLB mode. --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -959,8 +959,13 @@ static inline void do_rfi(CPUPPCState *env, target_ulong nip, target_ulong msr) { CPUState *cs = CPU(ppc_env_get_cpu(env)); - /* MSR:POW cannot be set by any form of rfi */ - msr &= ~(1ULL << MSR_POW); + /* These bits cannot be set by RFI on non-BookE systems and so must + * be filtered out. 6xx and 7xxx with SW TLB management will put + * TLB related junk in there among other things. + */ + if (env->excp_model &= POWERPC_EXCP_BOOKE) { + msr &= ~(target_ulong)0xf0000; + } #if defined(TARGET_PPC64) /* Switching to 32-bit ? Crop the nip */ @@ -990,7 +995,6 @@ void helper_rfi(CPUPPCState *env) do_rfi(env, env->spr[SPR_SRR0], env->spr[SPR_SRR1] & 0xfffffffful); } -#define MSR_BOOK3S_MASK #if defined(TARGET_PPC64) void helper_rfid(CPUPPCState *env) {