From owner-freebsd-ppc@FreeBSD.ORG Sun Jun 20 17:00:14 2010 Return-Path: Delivered-To: freebsd-ppc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26363106566B for ; Sun, 20 Jun 2010 17:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1527B8FC17 for ; Sun, 20 Jun 2010 17:00:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5KH0Dgg029858 for ; Sun, 20 Jun 2010 17:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5KH0D88029857; Sun, 20 Jun 2010 17:00:13 GMT (envelope-from gnats) Date: Sun, 20 Jun 2010 17:00:13 GMT Message-Id: <201006201700.o5KH0D88029857@freefall.freebsd.org> To: freebsd-ppc@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: powerpc/148003: commit references a PR X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2010 17:00:14 -0000 The following reply was made to PR powerpc/148003; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: powerpc/148003: commit references a PR Date: Sun, 20 Jun 2010 16:56:57 +0000 (UTC) Author: nwhitehorn Date: Sun Jun 20 16:56:48 2010 New Revision: 209369 URL: http://svn.freebsd.org/changeset/base/209369 Log: Temporarily disable instruction relocation while setting up the kernel's IBAT entry in early boot in order to prevent possible faults from races between the instruction cache and the MMU. PR: powerpc/148003 MFC after: 3 days Modified: head/sys/powerpc/aim/mmu_oea.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Sun Jun 20 16:24:22 2010 (r209368) +++ head/sys/powerpc/aim/mmu_oea.c Sun Jun 20 16:56:48 2010 (r209369) @@ -672,6 +672,7 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k vm_size_t size, physsz, hwphyssz; vm_offset_t pa, va, off; void *dpcpu; + register_t msr; /* * Set up BAT0 to map the lowest 256 MB area @@ -702,12 +703,16 @@ moea_bootstrap(mmu_t mmup, vm_offset_t k /* * Use an IBAT and a DBAT to map the bottom segment of memory - * where we are. + * where we are. Turn off instruction relocation temporarily + * to prevent faults while reprogramming the IBAT. */ + msr = mfmsr(); + mtmsr(msr & ~PSL_IR); __asm (".balign 32; \n" "mtibatu 0,%0; mtibatl 0,%1; isync; \n" "mtdbatu 0,%0; mtdbatl 0,%1; isync" :: "r"(battable[0].batu), "r"(battable[0].batl)); + mtmsr(msr); /* map pci space */ __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu)); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"