mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +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:
parent
dd42093b93
commit
be795d5812
6 changed files with 58 additions and 59 deletions
|
@ -8,6 +8,8 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
# include <Kernel/Multiboot.h>
|
||||
# include <Kernel/PhysicalAddress.h>
|
||||
# include <Kernel/VirtualAddress.h>
|
||||
#endif
|
||||
|
||||
#define MAX_KERNEL_SIZE 0x3000000
|
||||
|
@ -16,20 +18,20 @@
|
|||
namespace Kernel {
|
||||
|
||||
struct [[gnu::packed]] BootInfo {
|
||||
u8 const* start_of_prekernel_image;
|
||||
u8 const* end_of_prekernel_image;
|
||||
FlatPtr kernel_base;
|
||||
multiboot_info* multiboot_info_ptr;
|
||||
u32 start_of_prekernel_image;
|
||||
u32 end_of_prekernel_image;
|
||||
u64 kernel_base;
|
||||
u64 multiboot_info_ptr;
|
||||
# if ARCH(X86_64)
|
||||
u32 gdt64ptr;
|
||||
u16 code64_sel;
|
||||
FlatPtr boot_pml4t;
|
||||
u32 boot_pml4t;
|
||||
# endif
|
||||
FlatPtr boot_pdpt;
|
||||
FlatPtr boot_pd0;
|
||||
FlatPtr boot_pd_kernel;
|
||||
FlatPtr boot_pd_kernel_pt1023;
|
||||
char const* kernel_cmdline;
|
||||
u32 boot_pdpt;
|
||||
u32 boot_pd0;
|
||||
u32 boot_pd_kernel;
|
||||
u64 boot_pd_kernel_pt1023;
|
||||
u64 kernel_cmdline;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue