Make preparations for increasing the size of the kernel virtual
address space on the amd64 architecture. The amd64 architecture requires kernel code and global variables to reside in the highest 2GB of the 64-bit virtual address space. Thus, KERNBASE cannot change. However, KERNBASE is sometimes used as the start of the kernel virtual address space. Henceforth, VM_MIN_KERNEL_ADDRESS should be used instead. Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same address, there should be no visible effect from this change (yet). That said, kris@ has tested crash dumps under the full patch that increases the kernel virtual address space on amd64 to 6GB. Tested by: kris@
This commit is contained in:
parent
7e7a4e1d18
commit
948c5cc27e
@ -206,7 +206,7 @@ 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 = KERNBASE; va < kernel_vm_end; va += NBPDR) {
|
||||
for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) {
|
||||
i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1);
|
||||
/*
|
||||
* We always write a page, even if it is zero. Each
|
||||
@ -278,7 +278,7 @@ minidumpsys(struct dumperinfo *di)
|
||||
mdhdr.msgbufsize = msgbufp->msg_size;
|
||||
mdhdr.bitmapsize = vm_page_dump_size;
|
||||
mdhdr.ptesize = ptesize;
|
||||
mdhdr.kernbase = KERNBASE;
|
||||
mdhdr.kernbase = VM_MIN_KERNEL_ADDRESS;
|
||||
mdhdr.dmapbase = DMAP_MIN_ADDRESS;
|
||||
mdhdr.dmapend = DMAP_MAX_ADDRESS;
|
||||
|
||||
@ -312,7 +312,7 @@ minidumpsys(struct dumperinfo *di)
|
||||
|
||||
/* Dump kernel page table pages */
|
||||
pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys);
|
||||
for (va = KERNBASE; va < kernel_vm_end; va += NBPDR) {
|
||||
for (va = VM_MIN_KERNEL_ADDRESS; va < 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