1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

Kernel/aarch64: Add pre_init function for that sets up the CPU and MMU

This is a separate file that behaves similar to the Prekernel for
x86_64, and makes sure the CPU is dropped to EL1, the MMU is enabled,
and makes sure the CPU is running in high virtual memory. This code then
jumps to the usual init function of the kernel.
This commit is contained in:
Timon Kruiper 2023-01-06 16:01:47 +01:00 committed by Linus Groh
parent 5e00bb0b9f
commit ebdb899d3d
5 changed files with 63 additions and 6 deletions

View file

@ -156,9 +156,6 @@ extern "C" [[noreturn]] void init()
new (&bootstrap_processor()) Processor();
bootstrap_processor().install(0);
// We want to enable the MMU as fast as possible to make the boot faster.
init_page_tables();
// We call the constructors of kmalloc.cpp separately, because other constructors in the Kernel
// might rely on being able to call new/kmalloc in the constructor. We do have to run the
// kmalloc constructors, because kmalloc_init relies on that.