diff --git a/Kernel/Sections.h b/Kernel/Sections.h index dede1e7462f..61b5d57e294 100644 --- a/Kernel/Sections.h +++ b/Kernel/Sections.h @@ -19,3 +19,5 @@ #define KERNEL_QUICKMAP_PD (KERNEL_PT1024_BASE + 0x7000) #define KERNEL_QUICKMAP_PER_CPU_BASE (KERNEL_PT1024_BASE + 0x8000) #define KERNEL_PHYSICAL_PAGES_BASE (KERNEL_BASE + KERNEL_PD_OFFSET) + +#define USER_RANGE_CEILING 0xBE000000 diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h index 2be1fb9db88..16d695e7c24 100644 --- a/Kernel/VM/MemoryManager.h +++ b/Kernel/VM/MemoryManager.h @@ -278,7 +278,7 @@ void VMObject::for_each_region(Callback callback) inline bool is_user_address(VirtualAddress vaddr) { - return vaddr.get() < KERNEL_BASE; + return vaddr.get() < USER_RANGE_CEILING; } inline bool is_user_range(VirtualAddress vaddr, size_t size) diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/VM/PageDirectory.cpp index 3fd515697f4..08897da286c 100644 --- a/Kernel/VM/PageDirectory.cpp +++ b/Kernel/VM/PageDirectory.cpp @@ -63,7 +63,7 @@ UNMAP_AFTER_INIT void PageDirectory::allocate_kernel_directory() PageDirectory::PageDirectory(const RangeAllocator* parent_range_allocator) { constexpr FlatPtr userspace_range_base = 0x00800000; - constexpr FlatPtr userspace_range_ceiling = 0xbe000000; + constexpr FlatPtr userspace_range_ceiling = USER_RANGE_CEILING; ScopedSpinLock lock(s_mm_lock); if (parent_range_allocator) {