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

Kernel: Move boot info declarations to a header file

Instead of manually redeclaring those variables in various files this
now adds a header file for them.
This commit is contained in:
Gunnar Beutner 2021-07-19 17:54:51 +02:00 committed by Andreas Kling
parent b4600f2996
commit dd42093b93
8 changed files with 53 additions and 51 deletions

23
Kernel/BootInfo.h Normal file
View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2021, Gunnar Beutner <gbeutner@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <Kernel/VirtualAddress.h>
extern "C" u8 const* start_of_prekernel_image;
extern "C" u8 const* 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;
#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" const char* kernel_cmdline;