aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i386/intel/pmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 934ae7f4..cba7890e 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -753,8 +753,8 @@ void pmap_bootstrap(void)
kernel_virtual_end = kernel_virtual_start + VM_KERNEL_MAP_SIZE;
if (kernel_virtual_end < kernel_virtual_start
- || kernel_virtual_end > VM_MAX_KERNEL_ADDRESS)
- kernel_virtual_end = VM_MAX_KERNEL_ADDRESS;
+ || kernel_virtual_end > VM_MAX_KERNEL_ADDRESS - PAGE_SIZE)
+ kernel_virtual_end = VM_MAX_KERNEL_ADDRESS - PAGE_SIZE;
/*
* Allocate and clear a kernel page directory.