svn commit: r354527 - head/sys/powerpc/booke

Justin Hibbits jhibbits at FreeBSD.org
Fri Nov 8 04:26:19 UTC 2019


Author: jhibbits
Date: Fri Nov  8 04:26:19 2019
New Revision: 354527
URL: https://svnweb.freebsd.org/changeset/base/354527

Log:
  powerpc/booke:  Only handle kernel page faults in KVA range
  
  The memory range between VM_MAXUSER_ADDRESS and VM_MIN_KERNEL_ADDRESS is
  reserved for devices currently, which are always mapped in TLB1, and
  therefore do not exist in the kernel page table.  Any page fault in this
  range is therefore automatically a fatal fault.

Modified:
  head/sys/powerpc/booke/trap_subr.S

Modified: head/sys/powerpc/booke/trap_subr.S
==============================================================================
--- head/sys/powerpc/booke/trap_subr.S	Fri Nov  8 03:45:13 2019	(r354526)
+++ head/sys/powerpc/booke/trap_subr.S	Fri Nov  8 04:26:19 2019	(r354527)
@@ -713,6 +713,15 @@ INTERRUPT(int_data_tlb_error)
 	mtcr	%r21
 	bt	17, search_failed	/* check MSR[PR] */
 
+#ifdef __powerpc64__
+	srdi	%r21, %r31, 48
+	cmpldi	cr0, %r21, VM_MIN_KERNEL_ADDRESS at highest
+#else
+	lis	%r21, VM_MIN_KERNEL_ADDRESS at h
+	cmplw	cr0, %r31, %r21
+#endif
+	blt	search_failed
+
 search_kernel_pmap:
 	/* Load r26 with kernel_pmap address */
 	bl	1f


More information about the svn-src-head mailing list