Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2020 03:58:20 +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: r361494 - head/sys/powerpc/booke
Message-ID:  <202005260358.04Q3wKFo020175@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Tue May 26 03:58:19 2020
New Revision: 361494
URL: https://svnweb.freebsd.org/changeset/base/361494

Log:
  powerpc/booke pmap: Fix iteration for 64-bit kernel page table creation
  
  Kernel page tables actually start at index 4096, given kernel base address
  of 0xc008000000000000, not index 0, which would yield 0xc000000000000000.
  Fix this by indexing at the real base, instead of the assumed base.

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

Modified: head/sys/powerpc/booke/pmap_64.c
==============================================================================
--- head/sys/powerpc/booke/pmap_64.c	Tue May 26 02:27:10 2020	(r361493)
+++ head/sys/powerpc/booke/pmap_64.c	Tue May 26 03:58:19 2020	(r361494)
@@ -553,7 +553,8 @@ kernel_pte_alloc(vm_offset_t data_end, vm_offset_t add
 	}
 
 	va = VM_MIN_KERNEL_ADDRESS;
-	for (i = 0; i < pdir_l1s; i++, l1_va += PAGE_SIZE) {
+	for (i = PG_ROOT_IDX(va); i < PG_ROOT_IDX(va) + pdir_l1s;
+	    i++, l1_va += PAGE_SIZE) {
 		kernel_pmap->pm_root[i] = (pte_t ***)l1_va;
 		for (j = 0;
 		    j < PDIR_L1_NENTRIES && va < VM_MAX_KERNEL_ADDRESS;



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