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

Justin Hibbits jhibbits at FreeBSD.org
Wed Nov 29 01:26:08 UTC 2017


Author: jhibbits
Date: Wed Nov 29 01:26:07 2017
New Revision: 326354
URL: https://svnweb.freebsd.org/changeset/base/326354

Log:
  Only check the page tables if within the KVA.
  
  Devices aren't mapped within the KVA, and with the way 64-bit hashes the
  addresses pte_vatopa() may not return a 0 physical address for a device.
  
  MFC after:	1 week

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Wed Nov 29 00:46:36 2017	(r326353)
+++ head/sys/powerpc/booke/pmap.c	Wed Nov 29 01:26:07 2017	(r326354)
@@ -2091,10 +2091,11 @@ static vm_paddr_t
 mmu_booke_kextract(mmu_t mmu, vm_offset_t va)
 {
 	tlb_entry_t e;
-	vm_paddr_t p;
+	vm_paddr_t p = 0;
 	int i;
 
-	p = pte_vatopa(mmu, kernel_pmap, va);
+	if (va >= VM_MIN_KERNEL_ADDRESS && va <= VM_MAX_KERNEL_ADDRESS)
+		p = pte_vatopa(mmu, kernel_pmap, va);
 	
 	if (p == 0) {
 		/* Check TLB1 mappings */


More information about the svn-src-all mailing list