xref: /openbmc/qemu/tests/tcg/s390x/head64.S (revision ce799a04)
1/*
2 * Startup code for multiarch tests.
3 * Reuses the pc-bios/s390-ccw implementation.
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#define main main_pre
8#include "../../../pc-bios/s390-ccw/start.S"
9#undef main
10
11main_pre:
12    aghi %r15,-160                     /* reserve stack for C code */
13    brasl %r14,sclp_setup
14    brasl %r14,main
15    larl %r1,success_psw               /* check main() return code */
16    ltgr %r2,%r2
17    je 0f
18    larl %r1,failure_psw
190:
20    lpswe 0(%r1)
21
22    .align 8
23success_psw:
24    .quad 0x2000180000000,0xfff        /* see is_special_wait_psw() */
25failure_psw:
26    .quad 0x2000180000000,0            /* disabled wait */
27
28    .section .bss
29    .align 0x1000
30stack:
31    .skip 0x8000
32