Browse Source

Kernel: Hand out 64-bit addresses to userspace

Gunnar Beutner 4 years ago
parent
commit
f56ee10a13
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Kernel/Sections.h
  2. 1 1
      Kernel/VM/PageDirectory.cpp

+ 1 - 1
Kernel/Sections.h

@@ -24,4 +24,4 @@ extern "C" FlatPtr kernel_base;
 #define KERNEL_QUICKMAP_PD (KERNEL_PT1024_BASE + 0x7000)
 #define KERNEL_QUICKMAP_PD (KERNEL_PT1024_BASE + 0x7000)
 #define KERNEL_QUICKMAP_PER_CPU_BASE (KERNEL_PT1024_BASE + 0x8000)
 #define KERNEL_QUICKMAP_PER_CPU_BASE (KERNEL_PT1024_BASE + 0x8000)
 
 
-#define USER_RANGE_CEILING 0xBE000000
+#define USER_RANGE_CEILING (kernel_base - 0x2000000)

+ 1 - 1
Kernel/VM/PageDirectory.cpp

@@ -69,7 +69,7 @@ UNMAP_AFTER_INIT void PageDirectory::allocate_kernel_directory()
 PageDirectory::PageDirectory(const RangeAllocator* parent_range_allocator)
 PageDirectory::PageDirectory(const RangeAllocator* parent_range_allocator)
 {
 {
     constexpr FlatPtr userspace_range_base = 0x00800000;
     constexpr FlatPtr userspace_range_base = 0x00800000;
-    constexpr FlatPtr userspace_range_ceiling = USER_RANGE_CEILING;
+    FlatPtr userspace_range_ceiling = USER_RANGE_CEILING;
 
 
     ScopedSpinLock lock(s_mm_lock);
     ScopedSpinLock lock(s_mm_lock);
     if (parent_range_allocator) {
     if (parent_range_allocator) {