Handout
This commit is contained in:
20
kernel/memory/config.h
Normal file
20
kernel/memory/config.h
Normal 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;
|
||||
Reference in New Issue
Block a user