1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

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
This commit is contained in:
Hendiadyoin1 2021-06-28 18:43:18 +02:00 committed by Andreas Kling
parent 8b44aa7885
commit 65566d6868
7 changed files with 12 additions and 9 deletions

View file

@ -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>&);