x86: fix stack pointer after call
Since setup_multiboot has a C calling convention, the stack pointer must
be adjusted after the call. Without this change, the bottom of the
percpu area would be 4 bytes below the bottom of the stack and overlap
the top 4 bytes of CPU 1's stack.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/x86/cstart.S b/x86/cstart.S
index a3c7931..1714986 100644
--- a/x86/cstart.S
+++ b/x86/cstart.S
@@ -112,6 +112,7 @@
mov $stacktop, %esp
push %ebx
call setup_multiboot
+ addl $4, %esp
call setup_libcflat
mov mb_cmdline(%ebx), %eax
mov %eax, __args