mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
Kernel: Use the pre-image kernel memory range introduced by KASLR
This ensures we don't just waste the memory range between the default base load address and the actual load address that was shifted by the KASLR offset.
This commit is contained in:
parent
d850e483f7
commit
e18632660f
5 changed files with 11 additions and 3 deletions
|
@ -22,6 +22,7 @@ struct [[gnu::packed]] BootInfo {
|
|||
u32 end_of_prekernel_image;
|
||||
u64 physical_to_virtual_offset;
|
||||
u64 kernel_mapping_base;
|
||||
u64 default_kernel_load_base;
|
||||
u64 kernel_load_base;
|
||||
# if ARCH(X86_64)
|
||||
u32 gdt64ptr;
|
||||
|
|
|
@ -184,6 +184,7 @@ extern "C" [[noreturn]] void init()
|
|||
info.end_of_prekernel_image = (PhysicalPtr)end_of_prekernel_image;
|
||||
info.physical_to_virtual_offset = kernel_load_base - kernel_physical_base;
|
||||
info.kernel_mapping_base = kernel_mapping_base;
|
||||
info.default_kernel_load_base = default_kernel_load_base;
|
||||
info.kernel_load_base = kernel_load_base;
|
||||
#if ARCH(X86_64)
|
||||
info.gdt64ptr = (PhysicalPtr)gdt64ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue