On Sat, Sep 11, 2010 at 04:42:19PM +0200, Andreas Färber wrote: > Am 11.09.2010 um 16:09 schrieb Edgar E. Iglesias: > > > Improve the emulation of the BookE MMU to be able to boot linux > > on virtex5 boards. > > > > Signed-off-by: Edgar E. Iglesias <edgar.igles...@gmail.com> > > --- > > target-ppc/helper.c | 46 +++++++++++++++++++++++++++++++++++++++ > > +------ > > 1 files changed, 40 insertions(+), 6 deletions(-) > > > > diff --git a/target-ppc/helper.c b/target-ppc/helper.c > > index a7ec1f4..4c810d1 100644 > > --- a/target-ppc/helper.c > > +++ b/target-ppc/helper.c > [...] > > @@ -1445,7 +1452,10 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, > > target_ulong address, int rw, > > break; > > case POWERPC_MMU_BOOKE: > > /* XXX: TODO */ > > Is this TODO still valid now? If yes, could you please fill in what > needs to be done there. > > > - cpu_abort(env, "BookE MMU model is not > > implemented\n"); > > + env->exception_index = POWERPC_EXCP_ITLB; > > + env->error_code = 0; > > + env->spr[SPR_BOOKE_DEAR] = address; > > + env->spr[SPR_BOOKE_ESR] = 0x00000000; > > return -1; > > case POWERPC_MMU_BOOKE_FSL: > > /* XXX: TODO */ > [...] > > @@ -1557,7 +1571,14 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, > > target_ulong address, int rw, > > break; > > case POWERPC_MMU_BOOKE: > > /* XXX: TODO */ > > Same here. > > > - cpu_abort(env, "BookE MMU model is not > > implemented\n"); > > + env->exception_index = POWERPC_EXCP_DTLB; > > + env->error_code = 0; > > + env->spr[SPR_BOOKE_DEAR] = address; > > + if (rw) { > > + env->spr[SPR_BOOKE_ESR] = 0x00800000; > > + } else { > > + env->spr[SPR_BOOKE_ESR] = 0x00000000; > > + } > > return -1; > > case POWERPC_MMU_BOOKE_FSL: > > /* XXX: TODO */ > [...] > > @@ -1848,8 +1876,7 @@ void ppc_tlb_invalidate_all (CPUPPCState *env) > > cpu_abort(env, "MPC8xx MMU model is not implemented\n"); > > break; > > case POWERPC_MMU_BOOKE: > > - /* XXX: TODO */ > > Here you removed it, for comparison.
OK, I've removed the XXX comments. Thanks