Commit Graph

6 Commits

Author SHA1 Message Date
Gunnar Beutner
57417a3d6e Kernel: Support loading the kernel at almost arbitrary virtual addresses
This enables further work on implementing KASLR by adding relocation
support to the pre-kernel and updating the kernel to be less dependent
on specific virtual memory layouts.
2021-07-27 13:15:16 +02:00
Gunnar Beutner
b10a86d463 Prekernel: Export some multiboot parameters in our own BootInfo struct
This allows us to specify virtual addresses for things the kernel should
access via virtual addresses later on. By doing this we can make the
kernel independent from specific physical addresses.
2021-07-27 13:15:16 +02:00
Gunnar Beutner
3c616ae00f 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.
2021-07-27 13:15:16 +02:00
Gunnar Beutner
5188185374 Kernel: Rename .boot_bss to .super_pages to better reflect what it is
This also removes the section attribute for kernel_base which had no
effect because the section wasn't included in the linker script.
2021-07-20 15:12:19 +02:00
Gunnar Beutner
be795d5812 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.
2021-07-20 15:12:19 +02:00
Gunnar Beutner
dd42093b93 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.
2021-07-20 15:12:19 +02:00