From owner-svn-src-projects@FreeBSD.ORG Tue Mar 16 15:50:32 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 507061065672; Tue, 16 Mar 2010 15:50:32 +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 25B448FC1B; Tue, 16 Mar 2010 15:50:32 +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 o2GFoWFF026014; Tue, 16 Mar 2010 15:50:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2GFoWwS026011; Tue, 16 Mar 2010 15:50:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201003161550.o2GFoWwS026011@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 16 Mar 2010 15:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205211 - projects/ppc64/sys/powerpc/aim X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 15:50:32 -0000 Author: nwhitehorn Date: Tue Mar 16 15:50:31 2010 New Revision: 205211 URL: http://svn.freebsd.org/changeset/base/205211 Log: After rereading the manual, realize that slbia invalidates only SLB slots 1-63, leaving slot 0 intact. This could trigger an SLB parity error, which is why the kernel could not boot before. Follow slbia with explicit invalidation of SLB slot 0. While here, remove the other source of machine checks by fixing a typo that made large pages running off the ends of the large pages not actually marked guarded. Modified: projects/ppc64/sys/powerpc/aim/mmu_oea64.c projects/ppc64/sys/powerpc/aim/trap_subr64.S Modified: projects/ppc64/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- projects/ppc64/sys/powerpc/aim/mmu_oea64.c Tue Mar 16 15:27:58 2010 (r205210) +++ projects/ppc64/sys/powerpc/aim/mmu_oea64.c Tue Mar 16 15:50:31 2010 (r205211) @@ -723,12 +723,8 @@ moea64_cpu_bootstrap(mmu_t mmup, int ap) slbia(); for (i = 0; i < 64; i++) { - /* - * Note: set all SLB entries. Apparently, slbia() - * is not quite sufficient to make the CPU - * forget about bridge-mode mappings mode by OFW - * on the PPC 970. - */ + if (!(kernel_pmap->pm_slb[i].slbe & SLBE_VALID)) + continue; __asm __volatile ("slbmte %0, %1" :: "r"(kernel_pmap->pm_slb[i].slbv), @@ -868,7 +864,7 @@ moea64_setup_direct_map(mmu_t mmup, vm_o moea64_pvo_enter(kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, pa, pa, - LPTE_M, PVO_WIRED | PVO_LARGE | + pte_lo, PVO_WIRED | PVO_LARGE | VM_PROT_EXECUTE); } } @@ -2287,7 +2283,10 @@ tlbia(void) static void slbia(void) { + register_t seg0; + __asm __volatile ("slbia"); + __asm __volatile ("slbmfee %0,%1; slbie %0;" : "=r"(seg0) : "r"(0)); } #endif Modified: projects/ppc64/sys/powerpc/aim/trap_subr64.S ============================================================================== --- projects/ppc64/sys/powerpc/aim/trap_subr64.S Tue Mar 16 15:27:58 2010 (r205210) +++ projects/ppc64/sys/powerpc/aim/trap_subr64.S Tue Mar 16 15:50:31 2010 (r205211) @@ -50,14 +50,16 @@ */ restoresrs: - slbia; - li %r29, 0; /* Set the counter to zero */ + li %r29, 0 /* Set the counter to zero */ + + slbia + slbmfee %r31,%r29 + slbie %r31 instslb: ld %r31, PM_SLB+8(%r28); /* Load SLBE */ cmpli 0, %r31, 0; /* If SLBE is not valid, get the next */ beq nslb; - ld %r30, PM_SLB(%r28) /* Load SLBV */ slbmte %r30, %r31; /* Install SLB entry */