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.
This commit is contained in:
Justin Hibbits 2020-05-26 03:58:19 +00:00
parent 8ef0c667f4
commit 0aca9ecd85
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361494

View File

@ -553,7 +553,8 @@ kernel_pte_alloc(vm_offset_t data_end, vm_offset_t addr)
}
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;