diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-30 21:11:55 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-30 21:11:55 +0200 |
| commit | d65e85588388bf8c2e0dc8f6b106947110c0e815 (patch) | |
| tree | ff47e09a00e7752ee4e31bee48bd51588abfd604 | |
| parent | 43bac17a2986ac2ea86e9d70c61268fa7e90ca4e (diff) | |
Worked on it, fixing the MP backend code.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
| -rw-r--r-- | dev/ZKA/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx | 2 | ||||
| -rw-r--r-- | dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm | 23 |
2 files changed, 2 insertions, 23 deletions
diff --git a/dev/ZKA/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx b/dev/ZKA/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx index 4566a710..88f77ba9 100644 --- a/dev/ZKA/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx +++ b/dev/ZKA/HALKit/AMD64/HalCoreMultiProcessingAMD64.cxx @@ -168,8 +168,6 @@ namespace Kernel::HAL fBlocks[ProcessScheduler::The().CurrentProcess().Leak().ProcessId % cMaxPCBBlocks].f_PHB = &ProcessScheduler::The().CurrentProcess().Leak(); fBlocks[ProcessScheduler::The().CurrentProcess().Leak().ProcessId % cMaxPCBBlocks].f_Frame = stack_frame; - mp_do_context_switch(stack_frame); - semaphore_process.Unlock(); ke_stop(RUNTIME_CHECK_FAILED); } diff --git a/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm b/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm index 965d7d07..10114289 100644 --- a/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm +++ b/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm @@ -49,27 +49,8 @@ mp_do_context_switch: fldcw word [r9 + (8 * 21)] mov r9, [r9 + (8 * 12)] - - ; User code selector is 0x20 btw (Amlal). - - mov ax, 0x23 - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - - push 0x23 - push rsp - - pushfq - pop rax - or rax, 0x200 - push rax - - push 0x20 - push rbp - - iretq + + ret ;; gets the current stack frame. rt_get_current_context: |
