1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

Kernel: Make the kernel independent from specific physical addresses

Previously the kernel relied on a fixed offset between virtual and
physical addresses based on the kernel's load address. This allows us
to specify an independent offset.
This commit is contained in:
Gunnar Beutner 2021-07-22 13:05:04 +02:00 committed by Andreas Kling
parent c4887882cc
commit 3c616ae00f
5 changed files with 7 additions and 2 deletions

View file

@ -150,6 +150,7 @@ extern "C" [[noreturn]] void init()
BootInfo info;
info.start_of_prekernel_image = (PhysicalPtr)start_of_prekernel_image;
info.end_of_prekernel_image = (PhysicalPtr)end_of_prekernel_image;
info.physical_to_virtual_offset = kernel_load_base;
info.kernel_base = kernel_load_base;
info.multiboot_info_ptr = (FlatPtr)adjust_by_load_base(multiboot_info_ptr);
#if ARCH(X86_64)