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; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"