]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
Make initial stack setup consistent with per-thread stack setup
authorMartin Lucina <martin@lucina.net>
Tue, 13 Jan 2015 17:20:32 +0000 (18:20 +0100)
committerMartin Lucina <martin@lucina.net>
Tue, 13 Jan 2015 17:20:32 +0000 (18:20 +0100)
Push an "end of backtrace" marker onto the stack and zero BP. For x86_64
additionally push an extra 0 to ensure correct stack alignment as per
the ABI.

Signed-off-by: Martin Lucina <martin@lucina.net>
xen/arch/x86/x86_32.S
xen/arch/x86/x86_64.S

index 5d5202da8b6ce286b9ac045d274efc59c3e6d2eb..a5ca322162f502d40a1ae65cb61d92e2965614d1 100644 (file)
@@ -23,6 +23,8 @@ _start:
         cld
         lss stack_start,%esp
         andl $(~(__STACK_SIZE-1)), %esp
+        pushl $0
+        xorl %ebp,%ebp
         push %esi 
         call _minios_start_kernel
 
index bee757f59364daebdccb9c6432c61dcd3beb1d24..4a57241aa1f1ac8e8ad4022f67aac5d6aa755131 100644 (file)
@@ -23,6 +23,9 @@ _start:
         cld
         movq stack_start(%rip),%rsp
         andq $(~(__STACK_SIZE-1)), %rsp
+        pushq $0
+        pushq $0
+        xorq %rbp,%rbp
         movq %rsi,%rdi
         call _minios_start_kernel