From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37171 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuRze-00082s-Ij for qemu-devel@nongnu.org; Sat, 11 Sep 2010 11:27:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuRzd-0005LI-Fw for qemu-devel@nongnu.org; Sat, 11 Sep 2010 11:27:54 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:57970) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuRzb-0005LA-VZ for qemu-devel@nongnu.org; Sat, 11 Sep 2010 11:27:53 -0400 Received: by eyf18 with SMTP id 18so2550665eyf.4 for ; Sat, 11 Sep 2010 08:27:51 -0700 (PDT) Date: Sat, 11 Sep 2010 17:27:48 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [PATCH 1/4] powerpc: Improve emulation of the BookE MMU Message-ID: <20100911152748.GD25515@laped.lan> References: <1284214197-27140-1-git-send-email-edgar.iglesias@gmail.com> <1284214197-27140-2-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: qemu-devel@nongnu.org, Alexander Graf 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 > > --- > > 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