xref: /kvm-unit-tests/s390x/snippets/c/cstart.S (revision acc93cbf8d0afb5800c0874a61356b3d0ac2d6f2)
1#include <asm/sigp.h>
2
3.section .init
4	.globl start
5start:
6	/* XOR all registers with themselves to clear them fully. */
7	.irp i, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
8	xgr \i,\i
9	.endr
10	/* 0x3000 is the stack page for now */
11	lghi	%r15, 0x4000 - 160
12	sam64
13	brasl	%r14, main
14	/* For now let's only use cpu 0 in snippets so this will always work. */
15	xgr	%r0, %r0
16	sigp    %r2, %r0, SIGP_STOP
17