From owner-svn-src-all@FreeBSD.ORG Wed Jun 23 13:47:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D095106566C; Wed, 23 Jun 2010 13:47:28 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD468FC1C; Wed, 23 Jun 2010 13:47:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5NDlRlZ082582; Wed, 23 Jun 2010 13:47:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5NDlRUZ082580; Wed, 23 Jun 2010 13:47:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201006231347.o5NDlRUZ082580@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 23 Jun 2010 13:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209465 - releng/8.1/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2010 13:47:28 -0000 Author: nwhitehorn Date: Wed Jun 23 13:47:27 2010 New Revision: 209465 URL: http://svn.freebsd.org/changeset/base/209465 Log: MFC r209369: 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 Approved by: re (kib) Modified: releng/8.1/sys/powerpc/aim/mmu_oea.c Directory Properties: releng/8.1/sys/ (props changed) releng/8.1/sys/amd64/include/xen/ (props changed) releng/8.1/sys/cddl/contrib/opensolaris/ (props changed) releng/8.1/sys/contrib/dev/acpica/ (props changed) releng/8.1/sys/contrib/pf/ (props changed) releng/8.1/sys/dev/ixgbe/ (props changed) releng/8.1/sys/dev/xen/xenpci/ (props changed) releng/8.1/sys/geom/sched/ (props changed) Modified: releng/8.1/sys/powerpc/aim/mmu_oea.c ============================================================================== --- releng/8.1/sys/powerpc/aim/mmu_oea.c Wed Jun 23 13:13:14 2010 (r209464) +++ releng/8.1/sys/powerpc/aim/mmu_oea.c Wed Jun 23 13:47:27 2010 (r209465) @@ -670,6 +670,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 @@ -700,12 +701,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));