diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-26 19:48:05 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-26 19:48:05 +0000 |
commit | 1ef59d0acf7c71e9b863bff904ceac74ce9bd107 (patch) | |
tree | b30d2c5559af20a46f31001190fbca5d0bc38c3a /target-ppc/helper.c | |
parent | 7fd7b91fac396fcc3d72ecadbcb49f5736755d23 (diff) | |
download | qemu-1ef59d0acf7c71e9b863bff904ceac74ce9bd107.zip qemu-1ef59d0acf7c71e9b863bff904ceac74ce9bd107.tar.gz qemu-1ef59d0acf7c71e9b863bff904ceac74ce9bd107.tar.bz2 |
ppc fixes (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@765 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/helper.c')
-rw-r--r-- | target-ppc/helper.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/target-ppc/helper.c b/target-ppc/helper.c index ccfd2ea..dc2737e 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -163,7 +163,6 @@ static int get_bat (CPUState *env, uint32_t *real, int *prot, *BATu, *BATl, BEPIu, BEPIl, bl); } #endif - env->spr[DAR] = virtual; } /* No hit */ return ret; @@ -543,12 +542,12 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, access_type = env->access_type; if (env->user_mode_only) { /* user mode only emulation */ - ret = -1; + ret = -2; goto do_fault; } /* NASTY BUG workaround */ if (access_type == ACCESS_CODE && rw) { - // printf("%s: ERROR WRITE CODE ACCESS\n", __func__); + printf("%s: ERROR WRITE CODE ACCESS\n", __func__); access_type = ACCESS_INT; } ret = get_physical_address(env, &physical, &prot, @@ -674,10 +673,10 @@ uint32_t _load_msr (CPUState *env) void _store_msr (CPUState *env, uint32_t value) { - if (((T0 >> MSR_IR) & 0x01) != msr_ir || - ((T0 >> MSR_DR) & 0x01) != msr_dr) { + if (((value >> MSR_IR) & 0x01) != msr_ir || + ((value >> MSR_DR) & 0x01) != msr_dr) { /* Flush all tlb when changing translation mode or privilege level */ - do_tlbia(); + tlb_flush(env, 1); } msr_pow = (value >> MSR_POW) & 0x03; msr_ile = (value >> MSR_ILE) & 0x01; @@ -931,7 +930,7 @@ void do_interrupt (CPUState *env) env->nip = excp << 8; env->exception_index = EXCP_NONE; /* Invalidate all TLB as we may have changed translation mode */ - do_tlbia(); + tlb_flush(env, 1); /* ensure that no TB jump will be modified as the program flow was changed */ #ifdef __sparc__ |