diff options
| author | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-13 17:41:19 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-13 17:41:19 +0200 |
| commit | 349fe48baf941b2d1b571d3a5d0d796823bae312 (patch) | |
| tree | 6258abfbede227d0a7806530ccbf3cdf3ca3699c /Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | |
| parent | 70ae21935c7c68ed8a380611481b553b94cee657 (diff) | |
MHR-31: New systemcall/kernelcall architecture.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
Diffstat (limited to 'Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp')
| -rw-r--r-- | Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index b70649ee..e2520332 100644 --- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -159,23 +159,10 @@ namespace NewOS::HAL EXTERN_C Void hal_apic_acknowledge_cont(Void) { - kcout << "newoskrnl: finish kernel init... \r"; + /// TODO: better init code. + KeMain(); - if (cProgramInitialized && - *cProgramInitialized) - { - *cProgramInitialized = false; - - kcout << "newoskrnl: putting thread to sleep...\r"; - - KeMain(); - - _hal_spin_core(); - } - else - { - _hal_spin_core(); - } + _hal_spin_core(); } EXTERN_C StackFramePtr _hal_leak_current_context(Void) @@ -196,6 +183,7 @@ namespace NewOS::HAL STATIC Void hal_switch_context(HAL::StackFramePtr stackFrame) { Semaphore sem; + while (sem.IsLocked()) { } @@ -205,7 +193,7 @@ namespace NewOS::HAL cFramePtr = stackFrame; /// yes the exception field contains the core id. - hal_send_start_ipi(stackFrame->Exception, 0x40, cBaseAddressAPIC); + hal_send_start_ipi(stackFrame->Rcx, 0x40, cBaseAddressAPIC); sem.Unlock(); } |
