1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

Kernel: Support loading the kernel at almost arbitrary virtual addresses

This enables further work on implementing KASLR by adding relocation
support to the pre-kernel and updating the kernel to be less dependent
on specific virtual memory layouts.
This commit is contained in:
Gunnar Beutner 2021-07-26 15:10:51 +02:00 committed by Andreas Kling
parent e3d2ca6bd2
commit 57417a3d6e
20 changed files with 123 additions and 87 deletions

View file

@ -12,7 +12,7 @@
# include <Kernel/VirtualAddress.h>
#endif
#define MAX_KERNEL_SIZE 0x3000000
#define MAX_KERNEL_SIZE 0x4000000
#ifdef __cplusplus
namespace Kernel {
@ -21,7 +21,8 @@ struct [[gnu::packed]] BootInfo {
u32 start_of_prekernel_image;
u32 end_of_prekernel_image;
u64 physical_to_virtual_offset;
u64 kernel_base;
u64 kernel_mapping_base;
u64 kernel_load_base;
# if ARCH(X86_64)
u32 gdt64ptr;
u16 code64_sel;