Rev 180333, ``Change create_pagetables() and pmap_init() so that many fewer
page table pages have to be preallocated ...'', violates an assumption made by minidumpsys(): kernel_vm_end is the highest virtual address that has ever been used by the kernel. Now, however, the kernel code, data, and bss may reside at addresses beyond kernel_vm_end. This revision modifies the upper bound on minidumpsys()'s two page table traversals to account for this possibility.
This commit is contained in:
parent
ce489a99f0
commit
6d2005e71a
@ -206,7 +206,8 @@ minidumpsys(struct dumperinfo *di)
|
||||
/* Walk page table pages, set bits in vm_page_dump */
|
||||
ptesize = 0;
|
||||
pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys);
|
||||
for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) {
|
||||
for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR,
|
||||
kernel_vm_end); va += NBPDR) {
|
||||
i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1);
|
||||
/*
|
||||
* We always write a page, even if it is zero. Each
|
||||
@ -312,7 +313,8 @@ minidumpsys(struct dumperinfo *di)
|
||||
|
||||
/* Dump kernel page table pages */
|
||||
pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys);
|
||||
for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) {
|
||||
for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR,
|
||||
kernel_vm_end); va += NBPDR) {
|
||||
i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1);
|
||||
/* We always write a page, even if it is zero */
|
||||
if ((pdp[i] & PG_V) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user