summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_kern.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2008-06-22 04:54:27 +0000
committeralc <alc@FreeBSD.org>2008-06-22 04:54:27 +0000
commit9fe1756df85e1b11c091f8ab0cdcf473bd93553a (patch)
treec70aedda9eba9084b50cd07646477bf97fdcc1c8 /sys/vm/vm_kern.c
parentbec9e612d27d8768c6987d54d2a9500a834f4416 (diff)
downloadFreeBSD-src-9fe1756df85e1b11c091f8ab0cdcf473bd93553a.zip
FreeBSD-src-9fe1756df85e1b11c091f8ab0cdcf473bd93553a.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, 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.
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 fc27e90..81ca681 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);
}
OpenPOWER on IntegriCloud