Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2019 04:26:19 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354527 - head/sys/powerpc/booke
Message-ID:  <201911080426.xA84QJrM046505@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@highest
+#else
+	lis	%r21, VM_MIN_KERNEL_ADDRESS@h
+	cmplw	cr0, %r31, %r21
+#endif
+	blt	search_failed
+
 search_kernel_pmap:
 	/* Load r26 with kernel_pmap address */
 	bl	1f



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911080426.xA84QJrM046505>