summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpu/x86/sipi_vector.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S
index b40ea76f76..bd60c65a88 100644
--- a/src/cpu/x86/sipi_vector.S
+++ b/src/cpu/x86/sipi_vector.S
@@ -114,6 +114,8 @@ _start:
movl stack_top, %edx
subl %eax, %edx
mov %edx, %esp
+ andl $0xfffffff0, %esp /* ensure stack alignment */
+
/* Save CPU number. */
mov %ecx, %esi
@@ -192,7 +194,8 @@ load_msr:
mov %eax, %cr4
#endif
- /* c_handler(cpu_num) */
+ /* c_handler(cpu_num), preserve proper stack alignment */
+ sub $12, %esp
push %esi /* cpu_num */
mov c_handler, %eax
call *%eax