summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Private/HALKit/AMD64/HalInterruptRouting.asm5
-rw-r--r--Private/HALKit/AMD64/HalRoutines.s3
-rw-r--r--Private/HALKit/AMD64/HalSMPCoreManager.asm7
3 files changed, 7 insertions, 8 deletions
diff --git a/Private/HALKit/AMD64/HalInterruptRouting.asm b/Private/HALKit/AMD64/HalInterruptRouting.asm
index 33077e68..89f4be0f 100644
--- a/Private/HALKit/AMD64/HalInterruptRouting.asm
+++ b/Private/HALKit/AMD64/HalInterruptRouting.asm
@@ -17,14 +17,14 @@
%macro IntExp 1
HCoreInterrupt%1:
- cli
+ cld
push %1
call ke_handle_irq
%endmacro
%macro IntNormal 1
HCoreInterrupt%1:
- cli
+ cld
push 0
push %1
call ke_handle_irq
@@ -42,7 +42,6 @@ ke_handle_irq:
sti
iretq
-__IVT:
IntNormal 0
IntNormal 1
IntNormal 2
diff --git a/Private/HALKit/AMD64/HalRoutines.s b/Private/HALKit/AMD64/HalRoutines.s
index 80a6b122..bfe6ca29 100644
--- a/Private/HALKit/AMD64/HalRoutines.s
+++ b/Private/HALKit/AMD64/HalRoutines.s
@@ -32,5 +32,4 @@ rt_wait_for_io:
ret
rt_get_current_context:
- mov %rbp, %rax
- ret
+ retfq
diff --git a/Private/HALKit/AMD64/HalSMPCoreManager.asm b/Private/HALKit/AMD64/HalSMPCoreManager.asm
index 08f34517..97946098 100644
--- a/Private/HALKit/AMD64/HalSMPCoreManager.asm
+++ b/Private/HALKit/AMD64/HalSMPCoreManager.asm
@@ -14,7 +14,7 @@
section .text
rt_do_context_switch:
- mov rcx, r15
+ mov r15, rcx
mov [r15+0], rax
mov [r15+8], rbx
@@ -33,6 +33,7 @@ rt_do_context_switch:
mov [r15+112], r14
mov [r15+120], r15
- ;; Set APIC address of current core.
+ pop r15
+ pop rax
- ret
+ retfq