diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-18 04:03:44 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-18 04:03:44 +0100 |
| commit | 7be1cde4b2ddce81c9d339b1da5aef5711ab2598 (patch) | |
| tree | c40b775c83db98f633d50c73e23f735fb6bc5f82 /src/kernel/HALKit | |
| parent | d44be3b5e986af5e1dbc119990ef2ca3729c8664 (diff) | |
feat: kernel: stability and performance improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/HALKit')
| -rw-r--r-- | src/kernel/HALKit/AMD64/HalApplicationProcessor.cc | 4 | ||||
| -rw-r--r-- | src/kernel/HALKit/AMD64/HalInterruptAPI.asm | 2 | ||||
| -rw-r--r-- | src/kernel/HALKit/AMD64/HalKernelMain.cc | 21 |
3 files changed, 24 insertions, 3 deletions
diff --git a/src/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/src/kernel/HALKit/AMD64/HalApplicationProcessor.cc index 9286af57..0450c71c 100644 --- a/src/kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/src/kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -123,6 +123,8 @@ EXTERN_C BOOL mp_register_task(HAL::StackFramePtr stack_frame, ThreadID thrdid) kHWThread[thrdid].mThreadID = thrdid; kHWThread[thrdid].mFramePtr = stack_frame; + hal_send_ipi_msg(thrdid, kAPICLocales[thrdid], kSMPInterrupt + 32); + return YES; } @@ -209,8 +211,6 @@ Void mp_init_cores(VoidPtr vendor_ptr) { entry_ptr += length; } - - kSMPAware = kSMPCount > 1; } } } // namespace Kernel::HAL diff --git a/src/kernel/HALKit/AMD64/HalInterruptAPI.asm b/src/kernel/HALKit/AMD64/HalInterruptAPI.asm index be8675f8..ada65474 100644 --- a/src/kernel/HALKit/AMD64/HalInterruptAPI.asm +++ b/src/kernel/HALKit/AMD64/HalInterruptAPI.asm @@ -193,6 +193,7 @@ IntNormal 31 [extern idt_handle_scheduler] [extern kApicBaseAddress] +[global __NE_INT_33] __NE_INT_32: cli @@ -206,7 +207,6 @@ __NE_INT_32: o64 iret -global __NE_INT_33 __NE_INT_33: cli diff --git a/src/kernel/HALKit/AMD64/HalKernelMain.cc b/src/kernel/HALKit/AMD64/HalKernelMain.cc index cdf593cb..cf98a20a 100644 --- a/src/kernel/HALKit/AMD64/HalKernelMain.cc +++ b/src/kernel/HALKit/AMD64/HalKernelMain.cc @@ -149,6 +149,27 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) { if (ldr.IsLoaded()) rtl_create_user_process(ldr, UserProcess::ExecutableKind::kExecutableKind); + rtl_create_user_process( + []() { + while (YES) + ; + }, + "idle"); + + rtl_create_user_process( + []() { + while (YES) + ; + }, + "idle2"); + + rtl_create_user_process( + []() { + while (YES) + ; + }, + "idle3"); + HAL::mp_init_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr); HAL::Register64 idt_reg; |
