summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/model_dep.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 01d515d..bbdf9dc 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -381,20 +381,17 @@ i386at_init(void)
pmap_bootstrap();
/*
- * Turn paging on.
* We'll have to temporarily install a direct mapping
* between physical memory and low linear memory,
* until we start using our new kernel segment descriptors.
- * Also, set the WP bit so that on 486 or better processors
- * page-level write protection works in kernel mode.
*/
-#if VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
- delta = VM_MIN_KERNEL_ADDRESS - LINEAR_MIN_KERNEL_ADDRESS;
+#if INIT_VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
+ delta = INIT_VM_MIN_KERNEL_ADDRESS - LINEAR_MIN_KERNEL_ADDRESS;
if ((vm_offset_t)(-delta) < delta)
delta = (vm_offset_t)(-delta);
nb_direct = delta >> PDESHIFT;
for (i = 0; i < nb_direct; i++)
- kernel_page_dir[lin2pdenum(VM_MIN_KERNEL_ADDRESS) + i] =
+ kernel_page_dir[lin2pdenum(INIT_VM_MIN_KERNEL_ADDRESS) + i] =
kernel_page_dir[lin2pdenum(LINEAR_MIN_KERNEL_ADDRESS) + i];
#endif
@@ -416,7 +413,10 @@ i386at_init(void)
set_cr3((unsigned)_kvtophys(kernel_page_dir));
#endif /* PAE */
#ifndef MACH_HYP
- /* already set by Hypervisor */
+ /* Turn paging on.
+ * Also set the WP bit so that on 486 or better processors
+ * page-level write protection works in kernel mode.
+ */
set_cr0(get_cr0() | CR0_PG | CR0_WP);
set_cr0(get_cr0() & ~(CR0_CD | CR0_NW));
if (CPU_HAS_FEATURE(CPU_FEATURE_PGE))
@@ -443,7 +443,7 @@ i386at_init(void)
ldt_init();
ktss_init();
-#if VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
+#if INIT_VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
/* Get rid of the temporary direct mapping and flush it out of the TLB. */
for (i = 0 ; i < nb_direct; i++) {
#ifdef MACH_XEN
@@ -454,7 +454,7 @@ i386at_init(void)
#endif /* MACH_PSEUDO_PHYS */
printf("couldn't unmap frame %d\n", i);
#else /* MACH_XEN */
- kernel_page_dir[lin2pdenum(VM_MIN_KERNEL_ADDRESS) + i] = 0;
+ kernel_page_dir[lin2pdenum(INIT_VM_MIN_KERNEL_ADDRESS) + i] = 0;
#endif /* MACH_XEN */
}
#endif