diff options
author | Hendiadyoin1 <leon2002.la@gmail.com> | 2021-06-28 18:43:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-28 19:26:06 +0200 |
commit | 65566d68683ecbfc2a10b4fb544d5e6f362ae230 (patch) | |
tree | 4fa9d70730e3659702bb654142a8790400cb226b /Kernel/VM/Region.h | |
parent | 8b44aa788589d919962ce953ac847433f073ad49 (diff) | |
download | serenity-65566d68683ecbfc2a10b4fb544d5e6f362ae230.zip |
Kernel: Make and use KERNEL_BASE
This is to make the 0xc0000000 less a magic number, and will make it
easier in the future to move the Kernel around
Diffstat (limited to 'Kernel/VM/Region.h')
-rw-r--r-- | Kernel/VM/Region.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/VM/Region.h b/Kernel/VM/Region.h index 2522742f5c..7fe7612a10 100644 --- a/Kernel/VM/Region.h +++ b/Kernel/VM/Region.h @@ -13,6 +13,7 @@ #include <Kernel/Arch/x86/PageFault.h> #include <Kernel/Heap/SlabAllocator.h> #include <Kernel/KString.h> +#include <Kernel/Sections.h> #include <Kernel/VM/PageFaultResponse.h> #include <Kernel/VM/PurgeablePageRanges.h> #include <Kernel/VM/RangeAllocator.h> @@ -87,7 +88,7 @@ public: void set_mmap(bool mmap) { m_mmap = mmap; } bool is_user() const { return !is_kernel(); } - bool is_kernel() const { return vaddr().get() < 0x00800000 || vaddr().get() >= 0xc0000000; } + bool is_kernel() const { return vaddr().get() < 0x00800000 || vaddr().get() >= KERNEL_BASE; } PageFaultResponse handle_fault(const PageFault&, ScopedSpinLock<RecursiveSpinLock>&); |