From: Martin Lucina Date: Tue, 13 Jan 2015 17:20:32 +0000 (+0100) Subject: Make initial stack setup consistent with per-thread stack setup X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5c716e22bdb0d6f62e22b6ad97dd7048c29db4ca;p=rumpuser-xen.git Make initial stack setup consistent with per-thread stack setup 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 --- diff --git a/xen/arch/x86/x86_32.S b/xen/arch/x86/x86_32.S index 5d5202d..a5ca322 100644 --- a/xen/arch/x86/x86_32.S +++ b/xen/arch/x86/x86_32.S @@ -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 diff --git a/xen/arch/x86/x86_64.S b/xen/arch/x86/x86_64.S index bee757f..4a57241 100644 --- a/xen/arch/x86/x86_64.S +++ b/xen/arch/x86/x86_64.S @@ -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