summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/pmap.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2008-07-08 22:59:17 +0000
committeralc <alc@FreeBSD.org>2008-07-08 22:59:17 +0000
commit12ebfa7cd90079ef782a97aec6c5abba52700845 (patch)
tree8cc32967fcd7e837ef624231eb9b31b48a9b8385 /sys/amd64/include/pmap.h
parente29b848dd447e7c791c8ca334ba68cfba40dc1f1 (diff)
downloadFreeBSD-src-12ebfa7cd90079ef782a97aec6c5abba52700845.zip
FreeBSD-src-12ebfa7cd90079ef782a97aec6c5abba52700845.tar.gz
Eliminate pmap_growkernel()'s dependence on create_pagetables() preallocating
page directory pages from VM_MIN_KERNEL_ADDRESS through the end of the kernel's bss. Specifically, the dependence was in pmap_growkernel()'s one- time initialization of kernel_vm_end, not in its main body. (I could not, however, resist the urge to optimize the main body.) Reduce the number of preallocated page directory pages to just those needed to support NKPT page table pages. (In fact, this allows me to revert a couple of my earlier changes to create_pagetables().)
Diffstat (limited to 'sys/amd64/include/pmap.h')
-rw-r--r--sys/amd64/include/pmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index 049922b..332c281 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -115,7 +115,7 @@
#endif
#define NKPML4E 1 /* number of kernel PML4 slots */
-#define NKPDPE 6 /* number of kernel PDP slots */
+#define NKPDPE howmany(NKPT, NPDEPG)/* number of kernel PDP slots */
#define NUPML4E (NPML4EPG/2) /* number of userland PML4 pages */
#define NUPDPE (NUPML4E*NPDPEPG)/* number of userland PDP pages */
@@ -131,7 +131,7 @@
#define KPML4I (NPML4EPG-1) /* Top 512GB for KVM */
#define DMPML4I (KPML4I-1) /* Next 512GB down for direct map */
-#define KPDPI (NPDPEPG-7) /* kernel map starts at -7GB */
+#define KPDPI (NPDPEPG-2) /* kernbase at -2GB */
/*
* XXX doesn't really belong here I guess...
OpenPOWER on IntegriCloud