Revision 1ef59d0a target-ppc/helper.c

b/target-ppc/helper.c
163 163
                   *BATu, *BATl, BEPIu, BEPIl, bl);
164 164
        }
165 165
#endif
166
        env->spr[DAR] = virtual;
167 166
    }
168 167
    /* No hit */
169 168
    return ret;
......
543 542
    access_type = env->access_type;
544 543
    if (env->user_mode_only) {
545 544
        /* user mode only emulation */
546
        ret = -1;
545
        ret = -2;
547 546
        goto do_fault;
548 547
    }
549 548
    /* NASTY BUG workaround */
550 549
    if (access_type == ACCESS_CODE && rw) {
551
	//	printf("%s: ERROR WRITE CODE ACCESS\n", __func__);
550
	printf("%s: ERROR WRITE CODE ACCESS\n", __func__);
552 551
	access_type = ACCESS_INT;
553 552
    }
554 553
    ret = get_physical_address(env, &physical, &prot,
......
674 673

  
675 674
void _store_msr (CPUState *env, uint32_t value)
676 675
{
677
    if (((T0 >> MSR_IR) & 0x01) != msr_ir ||
678
        ((T0 >> MSR_DR) & 0x01) != msr_dr) {
676
    if (((value >> MSR_IR) & 0x01) != msr_ir ||
677
        ((value >> MSR_DR) & 0x01) != msr_dr) {
679 678
        /* Flush all tlb when changing translation mode or privilege level */
680
        do_tlbia();
679
	tlb_flush(env, 1);
681 680
    }
682 681
    msr_pow = (value >> MSR_POW) & 0x03;
683 682
    msr_ile = (value >> MSR_ILE) & 0x01;
......
931 930
    env->nip = excp << 8;
932 931
    env->exception_index = EXCP_NONE;
933 932
    /* Invalidate all TLB as we may have changed translation mode */
934
    do_tlbia();
933
    tlb_flush(env, 1);
935 934
    /* ensure that no TB jump will be modified as
936 935
       the program flow was changed */
937 936
#ifdef __sparc__

Also available in: Unified diff