From f56ee10a13b932eb97b47d8f8e20ff42745d1808 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 18 Jul 2021 02:49:47 +0200 Subject: [PATCH] Kernel: Hand out 64-bit addresses to userspace --- Kernel/Sections.h | 2 +- Kernel/VM/PageDirectory.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Sections.h b/Kernel/Sections.h index ead6350855..37ca06d994 100644 --- a/Kernel/Sections.h +++ b/Kernel/Sections.h @@ -24,4 +24,4 @@ extern "C" FlatPtr kernel_base; #define KERNEL_QUICKMAP_PD (KERNEL_PT1024_BASE + 0x7000) #define KERNEL_QUICKMAP_PER_CPU_BASE (KERNEL_PT1024_BASE + 0x8000) -#define USER_RANGE_CEILING 0xBE000000 +#define USER_RANGE_CEILING (kernel_base - 0x2000000) diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/VM/PageDirectory.cpp index 9fd461d1a4..09c1ea133a 100644 --- a/Kernel/VM/PageDirectory.cpp +++ b/Kernel/VM/PageDirectory.cpp @@ -69,7 +69,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 = USER_RANGE_CEILING; + FlatPtr userspace_range_ceiling = USER_RANGE_CEILING; ScopedSpinLock lock(s_mm_lock); if (parent_range_allocator) {