Date: Tue, 16 Mar 2010 15:50:32 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r205211 - projects/ppc64/sys/powerpc/aim Message-ID: <201003161550.o2GFoWwS026011@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003161550.o2GFoWwS026011>