diff options
Diffstat (limited to 'dev/kernel/HALKit')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc | 6 | ||||
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalCommonAPI.asm | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc index 78db9b16..46ad8fd6 100644 --- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -112,12 +112,10 @@ EXTERN_C BOOL mp_register_process(HAL::StackFramePtr stack_frame, ProcessID thrd kHWThread[thrdid].mFramePtr = stack_frame; kHWThread[thrdid].mThreadID = thrdid; - STATIC HardwareTimer timer{rtl_milliseconds(1000)}; - - timer.Wait(); - HardwareThreadScheduler::The()[thrdid].Leak()->Busy(NO); + sched_jump_to_task(stack_frame); + return YES; } diff --git a/dev/kernel/HALKit/AMD64/HalCommonAPI.asm b/dev/kernel/HALKit/AMD64/HalCommonAPI.asm index a04aeb95..230f50ed 100644 --- a/dev/kernel/HALKit/AMD64/HalCommonAPI.asm +++ b/dev/kernel/HALKit/AMD64/HalCommonAPI.asm @@ -84,11 +84,16 @@ section .text global sched_jump_to_task -;; Jump to the task from its stack frame. sched_jump_to_task: push rbp mov rbp, rsp + mov ax, 0x20 + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov r8, [rcx + 0x10] mov r9, [rcx + 0x18] mov r10, [rcx + 0x20] @@ -101,11 +106,11 @@ sched_jump_to_task: mov rax, [rcx + 0x00] mov rsp, [rcx + 0x08] - jmp rax + o64 sysret int 3 ;; Never continue here. global sched_idle_task sched_idle_task: jmp $ - ret
\ No newline at end of file + ret |
