29 |
|
|
30 |
/*****************************************************************************/ |
/*****************************************************************************/ |
31 |
/* PPC MMU emulation */ |
/* PPC MMU emulation */ |
|
int cpu_ppc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, |
|
|
int is_user, int is_softmmu); |
|
32 |
|
|
33 |
/* Perform BAT hit & translation */ |
/* Perform BAT hit & translation */ |
34 |
static int get_bat (CPUState *env, uint32_t *real, int *prot, |
static int get_bat (CPUState *env, uint32_t *real, int *prot, |
419 |
NULL, it means that the function was called in C code (i.e. not |
NULL, it means that the function was called in C code (i.e. not |
420 |
from generated code or from helper.c) */ |
from generated code or from helper.c) */ |
421 |
/* XXX: fix it to restore all registers */ |
/* XXX: fix it to restore all registers */ |
422 |
void tlb_fill(unsigned long addr, int is_write, int is_user, void *retaddr) |
void tlb_fill(target_ulong addr, int is_write, int is_user, void *retaddr) |
423 |
{ |
{ |
424 |
TranslationBlock *tb; |
TranslationBlock *tb; |
425 |
CPUState *saved_env; |
CPUState *saved_env; |
780 |
/* Store exception cause */ |
/* Store exception cause */ |
781 |
/* Get rS/rD and rA from faulting opcode */ |
/* Get rS/rD and rA from faulting opcode */ |
782 |
env->spr[DSISR] |= |
env->spr[DSISR] |= |
783 |
(ldl_code((void *)(env->nip - 4)) & 0x03FF0000) >> 16; |
(ldl_code((env->nip - 4)) & 0x03FF0000) >> 16; |
784 |
/* data location address has been stored |
/* data location address has been stored |
785 |
* when the fault has been detected |
* when the fault has been detected |
786 |
*/ |
*/ |