From 679ae6af818142372f8dac56e364f000e6811ad6 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 16 Jul 2021 22:29:54 +0200 Subject: [PATCH] Kernel: Remove some more hardcoded addresses --- Kernel/Sections.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Kernel/Sections.h b/Kernel/Sections.h index 55081f8153..98a0d9c8c0 100644 --- a/Kernel/Sections.h +++ b/Kernel/Sections.h @@ -13,11 +13,15 @@ #define KERNEL_BASE 0xC0000000 #define KERNEL_PD_OFFSET 0x3000000 -#define KERNEL_PD_END 0xF1000000 -#define KERNEL_PT1024_BASE 0xFFE00000 +#define KERNEL_PD_END (KERNEL_BASE + 0x31000000) +#define KERNEL_PT1024_BASE (KERNEL_BASE + 0x3FE00000) #define KERNEL_QUICKMAP_PT (KERNEL_PT1024_BASE + 0x6000) #define KERNEL_QUICKMAP_PD (KERNEL_PT1024_BASE + 0x7000) #define KERNEL_QUICKMAP_PER_CPU_BASE (KERNEL_PT1024_BASE + 0x8000) #define KERNEL_PHYSICAL_PAGES_BASE (KERNEL_BASE + KERNEL_PD_OFFSET) +#ifdef __cplusplus +static_assert(KERNEL_BASE % 0x1000000 == 0); +#endif + #define USER_RANGE_CEILING 0xBE000000