summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2008-06-20 20:59:31 +0000
committeralc <alc@FreeBSD.org>2008-06-20 20:59:31 +0000
commit8c14570d5e9f0ac2a2e707725b4f7befd41535fd (patch)
tree76188da0751a1862a74be9ce53a3f62000d4cae4
parenta8c357db8af10a39ad5ba715f7af6bd149f880bd (diff)
downloadFreeBSD-src-8c14570d5e9f0ac2a2e707725b4f7befd41535fd.zip
FreeBSD-src-8c14570d5e9f0ac2a2e707725b4f7befd41535fd.tar.gz
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@
-rw-r--r--sys/amd64/amd64/minidump_machdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c
index 4c3333d..6775bca 100644
--- a/sys/amd64/amd64/minidump_machdep.c
+++ b/sys/amd64/amd64/minidump_machdep.c
@@ -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) {
OpenPOWER on IntegriCloud