aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_kern.c
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2008-06-22 04:54:27 +0000
committerAlan Cox <alc@FreeBSD.org>2008-06-22 04:54:27 +0000
commit5cfa90e90290900fd0d5fab5c67022da3abde07c (patch)
treec70aedda9eba9084b50cd07646477bf97fdcc1c8 /sys/vm/vm_kern.c
parentc1f02198d100b755d8072f734f353cbd75dba17a (diff)
downloadsrc-5cfa90e90290900fd0d5fab5c67022da3abde07c.tar.gz
src-5cfa90e90290900fd0d5fab5c67022da3abde07c.zip
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, the memory allocated during bootstrap, before the call to kmem_init(), starts at KERNBASE, which is not necessarily the same as VM_MIN_KERNEL_ADDRESS on amd64.
Notes
Notes: svn path=/head/; revision=179923
Diffstat (limited to 'sys/vm/vm_kern.c')
-rw-r--r--sys/vm/vm_kern.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c
index fc27e9013362..81ca681e0b66 100644
--- a/sys/vm/vm_kern.c
+++ b/sys/vm/vm_kern.c
@@ -497,8 +497,12 @@ kmem_init(start, end)
/* N.B.: cannot use kgdb to debug, starting with this assignment ... */
kernel_map = m;
(void) vm_map_insert(m, NULL, (vm_ooffset_t) 0,
- VM_MIN_KERNEL_ADDRESS, start, VM_PROT_ALL, VM_PROT_ALL,
- MAP_NOFAULT);
+#ifdef __amd64__
+ KERNBASE,
+#else
+ VM_MIN_KERNEL_ADDRESS,
+#endif
+ start, VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT);
/* ... and ending with the completion of the above `insert' */
vm_map_unlock(m);
}