Date: Mon, 15 Jan 2018 16:08:35 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328004 - head/sys/powerpc/aim Message-ID: <201801151608.w0FG8Zw2031955@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Mon Jan 15 16:08:34 2018 New Revision: 328004 URL: https://svnweb.freebsd.org/changeset/base/328004 Log: Install the SLB miss trap-handling code in the SLB-based MMU driver set up, to which it is specific, rather than in the generic AIM startup code. This will be required to support the radix-table-based MMU introduced with POWER9. Modified: head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/aim_machdep.c ============================================================================== --- head/sys/powerpc/aim/aim_machdep.c Mon Jan 15 14:56:47 2018 (r328003) +++ head/sys/powerpc/aim/aim_machdep.c Mon Jan 15 16:08:34 2018 (r328004) @@ -150,7 +150,6 @@ extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern void *rstcode, *rstcodeend; extern void *trapcode, *trapcodeend; extern void *generictrap, *generictrap64; -extern void *slbtrap, *slbtrapend; extern void *alitrap, *aliend; extern void *dsitrap, *dsiend; extern void *decrint, *decrsize; @@ -332,9 +331,6 @@ aim_cpu_init(vm_offset_t toc) /* Set TOC base so that the interrupt code can get at it */ *((void **)TRAP_GENTRAP) = &generictrap; *((register_t *)TRAP_TOCBASE) = toc; - - bcopy(&slbtrap, (void *)EXC_DSE,(size_t)&slbtrapend - (size_t)&slbtrap); - bcopy(&slbtrap, (void *)EXC_ISE,(size_t)&slbtrapend - (size_t)&slbtrap); #else /* Set branch address for trap code */ if (cpu_features & PPC_FEATURE_64) Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Mon Jan 15 14:56:47 2018 (r328003) +++ head/sys/powerpc/aim/mmu_oea64.c Mon Jan 15 16:08:34 2018 (r328004) @@ -140,6 +140,8 @@ struct ofw_map { extern unsigned char _etext[]; extern unsigned char _end[]; +extern void *slbtrap, *slbtrapend; + /* * Map of physical memory regions. */ @@ -712,6 +714,12 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernels hw_direct_map = 1; else hw_direct_map = 0; + + /* Install trap handlers for SLBs */ + bcopy(&slbtrap, (void *)EXC_DSE,(size_t)&slbtrapend - (size_t)&slbtrap); + bcopy(&slbtrap, (void *)EXC_ISE,(size_t)&slbtrapend - (size_t)&slbtrap); + __syncicache((void *)EXC_DSE, 0x80); + __syncicache((void *)EXC_ISE, 0x80); #endif /* Get physical memory regions from firmware */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801151608.w0FG8Zw2031955>