summaryrefslogtreecommitdiff
path: root/src/cpu/x86/sipi_vector.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/sipi_vector.S')
-rw-r--r--src/cpu/x86/sipi_vector.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S
index ba1ecb7de6..bda49cc029 100644
--- a/src/cpu/x86/sipi_vector.S
+++ b/src/cpu/x86/sipi_vector.S
@@ -192,11 +192,24 @@ load_msr:
mov %eax, %cr4
#endif
+#ifdef __x86_64__
+ /* entry64.inc preserves ebx. */
+#include <cpu/x86/64bit/entry64.inc>
+
+ mov %rsi, %rdi /* cpu_num */
+
+ movl c_handler, %eax
+ call *%rax
+#else
/* c_handler(cpu_num), preserve proper stack alignment */
sub $12, %esp
push %esi /* cpu_num */
+
mov c_handler, %eax
call *%eax
+#endif
+
+
halt_jump:
hlt
jmp halt_jump