summaryrefslogtreecommitdiff
path: root/Kernel/Heap
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-17 19:59:20 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-17 22:34:26 +0100
commite362b56b4fd73db86eb8bf62baa8963eec0a967b (patch)
tree38ff10b38b7a8f843c436b629cc8184b2e5f0287 /Kernel/Heap
parentcee597a728c89c0d7217a646aea84b14b534e200 (diff)
downloadserenity-e362b56b4fd73db86eb8bf62baa8963eec0a967b.zip
Kernel: Move kernel above the 3GB virtual address mark
The kernel and its static data structures are no longer identity-mapped in the bottom 8MB of the address space, but instead move above 3GB. The first 8MB above 3GB are pseudo-identity-mapped to the bottom 8MB of the physical address space. But things don't have to stay this way! Thanks to Jesse who made an earlier attempt at this, it was really easy to get device drivers working once the page tables were in place! :^) Fixes #734.
Diffstat (limited to 'Kernel/Heap')
-rw-r--r--Kernel/Heap/kmalloc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp
index c54ab38a00..6d5b6fec75 100644
--- a/Kernel/Heap/kmalloc.cpp
+++ b/Kernel/Heap/kmalloc.cpp
@@ -20,11 +20,11 @@ struct [[gnu::packed]] allocation_t
size_t nchunk;
};
-#define BASE_PHYSICAL (4 * MB)
+#define BASE_PHYSICAL (0xc0000000 + (4 * MB))
#define CHUNK_SIZE 8
#define POOL_SIZE (3 * MB)
-#define ETERNAL_BASE_PHYSICAL (2 * MB)
+#define ETERNAL_BASE_PHYSICAL (0xc0000000 + (2 * MB))
#define ETERNAL_RANGE_SIZE (2 * MB)
static u8 alloc_map[POOL_SIZE / CHUNK_SIZE / 8];