1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

Kernel: Introduce stages in Aarch64 CPU initialization phase

Dropping to each exception level is now more explicit.
This commit is contained in:
konrad 2023-01-07 21:21:22 +01:00 committed by Jelle Raaijmakers
parent c08f059340
commit 0f81fb03f2
4 changed files with 33 additions and 28 deletions

View file

@ -18,8 +18,6 @@
#include <Kernel/Thread.h>
#include <Kernel/Time/TimeManagement.h>
extern "C" uintptr_t vector_table_el1;
namespace Kernel {
extern "C" void thread_context_first_enter(void);
@ -33,14 +31,7 @@ void Processor::initialize(u32 cpu)
{
VERIFY(g_current_processor == nullptr);
auto current_exception_level = static_cast<u64>(Aarch64::Asm::get_current_exception_level());
dbgln("CPU{} started in: EL{}", cpu, current_exception_level);
dbgln("Drop CPU{} to EL1", cpu);
drop_to_exception_level_1();
// Load EL1 vector table
Aarch64::Asm::el1_vector_table_install(&vector_table_el1);
initialize_exceptions(cpu);
g_current_processor = this;
}