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.
This commit is contained in:
Alan Cox 2008-06-22 04:54:27 +00:00
parent c1f02198d1
commit 5cfa90e902
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179923

View File

@ -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);
}