This commit is contained in:
Niklas Gollenstede
2025-10-31 22:37:36 +01:00
commit 174fe17e89
197 changed files with 79558 additions and 0 deletions

20
kernel/memory/config.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include "../types.h"
// External symbols introduced by the linker with kernel start and end address
extern "C" void* ___KERNEL_START___;
extern "C" void* ___KERNEL_END___;
/*! \brief Lowest memory address we will make use of
* It seems wise to ignore everything below the first 1 MB
* since it is used by BIOS and memory mapped devices,
* and not every BIOS gives us a correct memory map.
*/
const uintptr_t KERNEL_SPACE = 0x100000;
/*! \brief Border between Kernel and User space
* Memory below this border (starting by MINIMUM) is for kernel (which is
* identity mapped), memory above for user space.
* Let's choose 64 MB since this should be enough for the kernel.
*/
const uintptr_t USER_SPACE = 0x4000000;