Files
bsb2/kernel/memory/config.h
Niklas Gollenstede 174fe17e89 Handout
2025-10-31 22:37:36 +01:00

21 lines
736 B
C

#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;