From 0266d8058990a496b935abd76417abcfe4e9cffd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 18 May 2025 15:15:52 +0200 Subject: dev(sched): Improvements and work in progress fixes. what? - The main algorithm got improved for real time tasks, and SMP usage. - The SMP usage was present before, I just reintroduced it after realizing that it won't scale well from what I have right now. - Also removed weird implementations quirks from previous sketch. - Such as the core 0 being reserved for the boot core. - Also moved FS init code after IDT initalization. - To avoid weird FS format behavior. - Wrap HPET signature in a macro. next? - Work on the HAL's userspace transition mechanism. Signed-off-by: Amlal El Mahrouss --- dev/kernel/HALKit/AMD64/HalKernelMain.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'dev/kernel/HALKit/AMD64/HalKernelMain.cc') diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc index 581af60a..f4585835 100644 --- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc +++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc @@ -110,24 +110,25 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) noexcept { Kernel::HAL::mp_init_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr); - Kernel::HAL::Register64 idt_reg; - idt_reg.Base = reinterpret_cast(kInterruptVectorTable); - - Kernel::HAL::IDTLoader idt_loader; - - idt_loader.Load(idt_reg); - #ifdef __FSKIT_INCLUDES_HEFS__ if (Kernel::HeFS::fs_init_hefs()) { goto hal_spin_kernel; } #endif + if (!Kernel::NeFS::fs_init_nefs()) { kout << "NeFS cannot be formated on the disk. Aborting\r"; dbg_break_point(); } hal_spin_kernel: + Kernel::HAL::Register64 idt_reg; + idt_reg.Base = reinterpret_cast(kInterruptVectorTable); + + Kernel::HAL::IDTLoader idt_loader; + + idt_loader.Load(idt_reg); + while (YES) ; } -- cgit v1.2.3