1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:37:34 +00:00

Prekernel: Use physical addresses for some of the BootInfo parameters

The kernel would just turn those virtual addresses into physical
addresses later on, so let's just use physical addresses right from the
start.
This commit is contained in:
Gunnar Beutner 2021-07-19 18:24:15 +02:00 committed by Andreas Kling
parent dd42093b93
commit be795d5812
6 changed files with 58 additions and 59 deletions

View file

@ -6,18 +6,20 @@
#pragma once
#include <Kernel/Arch/x86/PageDirectory.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/VirtualAddress.h>
extern "C" u8 const* start_of_prekernel_image;
extern "C" u8 const* end_of_prekernel_image;
extern "C" PhysicalAddress start_of_prekernel_image;
extern "C" PhysicalAddress end_of_prekernel_image;
extern "C" __attribute__((section(".boot_bss"))) FlatPtr kernel_base;
#if ARCH(X86_64)
extern "C" u32 gdt64ptr;
extern "C" u16 code64_sel;
extern "C" FlatPtr boot_pml4t;
extern "C" PhysicalAddress boot_pml4t;
#endif
extern "C" FlatPtr boot_pdpt;
extern "C" FlatPtr boot_pd0;
extern "C" FlatPtr boot_pd_kernel;
extern "C" FlatPtr boot_pd_kernel_pt1023;
extern "C" PhysicalAddress boot_pdpt;
extern "C" PhysicalAddress boot_pd0;
extern "C" PhysicalAddress boot_pd_kernel;
extern "C" Kernel::PageTableEntry* boot_pd_kernel_pt1023;
extern "C" const char* kernel_cmdline;